From 461324d36ed9ea513b8a1028f8742d50cac18a42 Mon Sep 17 00:00:00 2001 From: Arlo Breault Date: Mon, 4 Jan 2016 16:50:22 -0800 Subject: [PATCH] Update for this repo --- .gitignore | 3 +++ README.md | 10 ++++++---- torrc | 2 +- webrtc-client.go | 7 ++----- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 60ceebc..6c2eb4e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ *.swo *.swn ignore/ +datadir/ +snowflake +webrtc-client.log diff --git a/README.md b/README.md index 07eb81a..1006d70 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,12 @@ Open up four terminals: 1. tor -f torrc SOCKSPort auto 2. tail -F webrtc-client.log 3. cat > signal -4. ../demo/chat/chat +4. open proxy/snowflake.html -Look for the offer in terminal 2; copy and paste it into terminal 4. -Copy and paste the answer from terminal 4 to terminal 3. At this point -you should see some TLS garbage in the chat window. +Look for the offer in terminal 2; copy and paste it into the browswer window +opened from terminal 4. Copy and paste the answer from terminal 4 to terminal 3. +At this point you should see some TLS garbage in the chat window. + +### More More documentation on the way. diff --git a/torrc b/torrc index db48de7..8f081a1 100644 --- a/torrc +++ b/torrc @@ -1,5 +1,5 @@ UseBridges 1 DataDirectory datadir -ClientTransportPlugin webrtc exec ./webrtc-client +ClientTransportPlugin webrtc exec ./snowflake Bridge webrtc 0.0.3.0:1 diff --git a/webrtc-client.go b/webrtc-client.go index 981443c..ab17e90 100644 --- a/webrtc-client.go +++ b/webrtc-client.go @@ -57,11 +57,8 @@ func (c *webRTCConn) Read(b []byte) (int, error) { func (c *webRTCConn) Write(b []byte) (int, error) { log.Printf("webrtc Write %d %q", len(b), string(b)) - err := c.dc.Send(b) - if err != nil { - return 0, err - } - return len(b), err + c.dc.Send(b) + return len(b), nil } func (c *webRTCConn) Close() error {