From c4cfc7f8ba2a3be9dbccad6d6d7bab35cb7fb8f9 Mon Sep 17 00:00:00 2001 From: David Fifield Date: Sat, 26 Mar 2016 11:00:20 -0700 Subject: [PATCH] Move server to server-webrtc. To make room for the WebSocket server we're actually going to use as a primary server. Move server-webrtc docs to server-webrtc/README.md. --- .gitignore | 2 +- Makefile | 2 +- README.md | 37 ++++---------------------- server-webrtc/README.md | 26 ++++++++++++++++++ {server => server-webrtc}/http.go | 0 {server => server-webrtc}/snowflake.go | 0 {server => server-webrtc}/torrc | 0 7 files changed, 33 insertions(+), 34 deletions(-) create mode 100644 server-webrtc/README.md rename {server => server-webrtc}/http.go (100%) rename {server => server-webrtc}/snowflake.go (100%) rename {server => server-webrtc}/torrc (100%) diff --git a/.gitignore b/.gitignore index f9356ae..784e6c4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ .DS_Store datadir/ client/client -server/server +server-webrtc/server-webrtc snowflake.log proxy/test proxy/build diff --git a/Makefile b/Makefile index 688e273..fbf12ae 100644 --- a/Makefile +++ b/Makefile @@ -2,4 +2,4 @@ .PHONY: check check: ! gofmt -l . 2>&1 | read - go vet ./broker ./client ./server \ No newline at end of file + go vet ./broker ./client ./server-webrtc diff --git a/README.md b/README.md index f9f1b1f..db896e6 100644 --- a/README.md +++ b/README.md @@ -70,9 +70,6 @@ method (see `torrc-manual`): ClientTransportPlugin snowflake exec ./client --meek ``` -Also, it is possible to connect directly to the go-webrtc server plugin -(skipping all the browser snowflake / broker stuff - see appendix) - #### Building a Snowflake @@ -134,35 +131,6 @@ abundance of ephemeral and short-lived (and special!) volunteer proxies... ### Appendix -##### -- Testing directly via WebRTC Server -- - -Ordinarily, the WebRTC client plugin speaks with a Broker which helps -match and signal with a browser proxy, which ultimately speaks with a default -websocket server. - - -However, there is a WebRTC server plugin which uses an HTTP server that -simulates the interaction that a client would have with the broker, for -direct testing. - -Edit server/torrc and add "-http 127.0.0.1:8080" to the end of the -ServerTransportPlugin line: -``` -ServerTransportPlugin snowflake exec ./server -http 127.0.0.1:8080 -``` - -``` -cd server/ -go build -tor -f torrc -``` - -Edit client/torrc and add "-url http://127.0.0.1:8080" to the end of the -ClientTransportPlugin line: -``` -ClientTransportPlugin snowflake exec ./client -url http://127.0.0.1:8080/ -``` - ##### -- Testing Copy-Paste Via Browser Proxy -- Open a browser proxy, passing the `manual` parameter; e.g. @@ -183,6 +151,11 @@ Then, in the browser proxy: - Once WebRTC successfully connects, the browser terminal should turn green. Shortly after, the tor client should bootstrap to 100%. +##### -- Testing directly via WebRTC Server -- + +See server-webrtc/README.md for information on connecting directly to a +WebRTC server transport plugin, bypassing the Broker and browser proxy. + More documentation on the way. Also available at: diff --git a/server-webrtc/README.md b/server-webrtc/README.md new file mode 100644 index 0000000..53cad14 --- /dev/null +++ b/server-webrtc/README.md @@ -0,0 +1,26 @@ +Ordinarily, the WebRTC client plugin speaks with a Broker which helps +match and signal with a browser proxy, which ultimately speaks with a default +websocket server. + + +However, this directory contains a WebRTC server plugin which uses an +HTTP server that simulates the interaction that a client would have with +the broker, for direct testing. + +Edit server-webrtc/torrc and add "-http 127.0.0.1:8080" to the end of the +ServerTransportPlugin line: +``` +ServerTransportPlugin snowflake exec ./server-webrtc -http 127.0.0.1:8080 +``` + +``` +cd server-webrtc/ +go build +tor -f torrc +``` + +Edit client/torrc and add "-url http://127.0.0.1:8080" to the end of the +ClientTransportPlugin line: +``` +ClientTransportPlugin snowflake exec ./client -url http://127.0.0.1:8080/ +``` diff --git a/server/http.go b/server-webrtc/http.go similarity index 100% rename from server/http.go rename to server-webrtc/http.go diff --git a/server/snowflake.go b/server-webrtc/snowflake.go similarity index 100% rename from server/snowflake.go rename to server-webrtc/snowflake.go diff --git a/server/torrc b/server-webrtc/torrc similarity index 100% rename from server/torrc rename to server-webrtc/torrc