From 17f30d109157cbdbe6d87acb3533e6c0a0f258b6 Mon Sep 17 00:00:00 2001 From: Serene Han Date: Wed, 13 Jan 2016 11:25:08 -0800 Subject: [PATCH] README instructions for using browser snowflake --- README.md | 55 ++++++++++++++++++++++++++++++++++++++++---------- proxy/Cakefile | 7 ++++++- 2 files changed, 50 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index ee81bc4..b76efa9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/proxy/Cakefile b/proxy/Cakefile index 3179247..52e1bd0 100644 --- a/proxy/Cakefile +++ b/proxy/Cakefile @@ -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