mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
README instructions for using browser snowflake
This commit is contained in:
parent
487dfe697a
commit
17f30d1091
2 changed files with 50 additions and 12 deletions
55
README.md
55
README.md
|
@ -2,36 +2,69 @@
|
||||||
|
|
||||||
A Pluggable Transport using WebRTC
|
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
|
### 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/
|
cd client/
|
||||||
go build
|
go build
|
||||||
```
|
```
|
||||||
|
|
||||||
1. tor -f torrc SOCKSPort auto
|
A: tor -f torrc SOCKSPort auto
|
||||||
2. cat > signal
|
|
||||||
3. tail -F snowflake.log
|
|
||||||
|
|
||||||
**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/
|
cd server/
|
||||||
go build
|
go build
|
||||||
```
|
```
|
||||||
|
|
||||||
4. tor -f torrc
|
D: tor -f torrc
|
||||||
5. cat > signal
|
|
||||||
6. tail -F snowflake.log
|
|
||||||
|
|
||||||
Look for the offer in terminal 3; copy and paste it into terminal 5.
|
E: cat > signal
|
||||||
Copy and paste the answer in terminal 6 to terminal 2.
|
|
||||||
|
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%.
|
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
|
||||||
|
|
||||||
More documentation on the way.
|
More documentation on the way.
|
||||||
|
|
|
@ -2,7 +2,7 @@ fs = require 'fs'
|
||||||
|
|
||||||
{exec} = require 'child_process'
|
{exec} = require 'child_process'
|
||||||
|
|
||||||
task 'test', 'snowflake unit tests', () ->
|
task 'test', 'snowflake unit tests', ->
|
||||||
testFile = 'test/snowflake.bundle.coffee'
|
testFile = 'test/snowflake.bundle.coffee'
|
||||||
exec 'cat snowflake.coffee snowflake_test.coffee | cat > ' + testFile, (err, stdout, stderr) ->
|
exec 'cat snowflake.coffee snowflake_test.coffee | cat > ' + testFile, (err, stdout, stderr) ->
|
||||||
throw err if err
|
throw err if err
|
||||||
|
@ -10,3 +10,8 @@ task 'test', 'snowflake unit tests', () ->
|
||||||
exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) ->
|
exec 'coffee ' + testFile + ' -v', (err, stdout, stderr) ->
|
||||||
throw err if err
|
throw err if err
|
||||||
console.log stdout + stderr
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue