README instructions for using browser snowflake

This commit is contained in:
Serene Han 2016-01-13 11:25:08 -08:00
parent 487dfe697a
commit 17f30d1091
2 changed files with 50 additions and 12 deletions

View file

@ -2,36 +2,69 @@
A Pluggable Transport using WebRTC
### Status
- Successfully bootstraps over WebRTC, both directly to a server plugin,
as well as through the browser which proxies WebRTC to websocket.
- Needs work on signaling with the facilitator.
### Usage
Open up six terminals:
There are currently two ways to try this:
- Directly to the go-webrtc server plugin.
- Through a browser snowflake proxy.
**client:**
Setting up the client is the same in both cases.
Open up three terminals for the **client:**
```
cd client/
go build
```
1. tor -f torrc SOCKSPort auto
2. cat > signal
3. tail -F snowflake.log
A: tor -f torrc SOCKSPort auto
**server:**
B: cat > signal
C: tail -F snowflake.log
Now, to connect directly to a server plugin:
Open up another three terminals for the **server:**
```
cd server/
go build
```
4. tor -f torrc
5. cat > signal
6. tail -F snowflake.log
D: tor -f torrc
Look for the offer in terminal 3; copy and paste it into terminal 5.
Copy and paste the answer in terminal 6 to terminal 2.
E: cat > signal
F: tail -F snowflake.log
Look for the offer in terminal C; copy and paste it into terminal E.
Copy and paste the answer in terminal F to terminal B.
At this point the tor client should bootstrap to 100%.
#### Snowflake proxy
Otherwise, to connect through the WebRTC proxy in the browser, start a local
http server in the `proxy/` directory however you wish. For instance:
```
cd proxy/
python -m http.server
```
Open a browser tab to `0.0.0.0:8000/snowflake.html`.
The page will ask you to input a relay.
Input your desired relay address, or input nothing/gibberish which will cause
snowflake to use a default relay.
Look for the offer in terminal C; copy and paste it into the browser.
Copy and paste the answer generated in the browser back to terminal B.
At this point the tor client should bootstrap to 100%.
### More
More documentation on the way.

View file

@ -2,7 +2,7 @@ fs = require 'fs'
{exec} = require 'child_process'
task 'test', 'snowflake unit tests', () ->
task 'test', 'snowflake unit tests', ->
testFile = 'test/snowflake.bundle.coffee'
exec 'cat snowflake.coffee snowflake_test.coffee | cat > ' + testFile, (err, stdout, stderr) ->
throw err if err
@ -10,3 +10,8 @@ task 'test', 'snowflake unit tests', () ->
exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
task 'build', 'build the snowflake proxy', ->
exec 'coffee -o build -c snowflake.coffee', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr