[tor-dev] Testing flash proxy infrastructure
David Fifield
david at bamsoftware.com
Sun Sep 8 16:32:43 UTC 2013
George asked me for tips on testing flash proxy infrastructure.
You will need to run a websocket-server
(https://gitweb.torproject.org/flashproxy.git/tree/HEAD:/websocket-transport)
in front of a relay:
ServerTransportPlugin websocket exec /usr/local/bin/websocket-server --port 9901
Or you can just use the public one at 173.255.221.44:9901. Let's
say the websocket-server is listening at 127.0.0.1:9901.
You follow these instructions to set up your own facilitator.
https://gitweb.torproject.org/flashproxy.git/blob/HEAD:/doc/facilitator-howto.txt
It's fairly involved, and at the end you have an Apache serving a CGI,
plus some local daemons. For your own local testing, you can use a
self-signed certificate or even plain HTTP, and you probably don't want
to do the email poller because that's a process on its own.
In /etc/init.d/facilitator, edit the RELAY variable to point to your
chosen websocket-server.
Say your facilitator CGI is running at https://facilitator:8000/. You
point flashproxy-client to the faciltiator using the -f option.
./flashproxy-client -f https://facilitator:8000/ --external --register-methods=http --unsafe-logging
To run flashproxy-client in managed mode from torrc, remove --external.
The two rendezvous methods that don't require setting up a lot of stuff
are http and url. You can add a client registration like so:
./flashproxy-reg-http -f https://facilitator:8000/ --unsafe-logging
./flashproxy-reg-url -f https://facilitator:8000/ --facilitator-pubkey=reg-daemon.pub 127.0.0.1:9000
With flashproxy-reg-url, you will have to paste the URL it prints out
into a browser. flashproxy-client will automatically pass the -f option
to its registration helpers.
To run a local flash proxy, open a non-Tor browser to embed.html and
give it the custom facilitator URL:
file:///home/user/flashproxy/proxy/embed.html?debug&facilitator=https://facilitator:8000/&initial_facilitator_poll_interval=0
To bypass the facilitator and connect directly to a client and relay, do
this:
file:///home/user/flashproxy/proxy/embed.html?debug&client=127.0.0.1:9000&relay=127.0.0.1:9901
David Fifield
More information about the tor-dev
mailing list