Obfuscating, WebRTC-driven SOCKS proxy and other utilities for uProxy.
- NPM, which may be installed as part of Node.js.
- Grunt which may, once NPM has been installed, be installed with the command
npm install -g grunt-cli
First, to install required NPMs and configure the
build/ directory for TypeScript compilation, execute:
On Windows, replace
Then, to compile the TypeScript code and build the demo apps, execute:
Now, you should be able to run the demo apps.
Having problems? To clean up from a partial, broken, or extremely out-dated build, try executing this command before repeating the above steps:
After building, the apps can be found at
are a mix of web apps and browser extensions (Chrome and Firefox).
To run web apps:
- start a webserver, e.g.
python -m SimpleHTTPServer
- open the relevant HTML file in your browser, e.g. http://localhost:8000/build/dev/uproxy-lib/samples/simple-freedom-chat/main.html.
To run Chrome apps:
chrome://extensions, enable check Developer Mode, and load the unpacked extension from the relevant directory, e.g.
To run Firefox add-ons:
- install jpm via NPM, e.g.
npm install jpm -g,
cdto the relevant directory, e.g.
build/dev/uproxy-lib/samples/simple-socks-firefoxapp/, and execute
jpm run -b `which firefox`.
To run Node.js apps:
- Directly run
nodewith the entry point, e.g.
- Note: Until freedom-for-node supports core.rtcpeerconnection, this sample will not work
WebRTC-powered chat client, with both peers on the same page.
This is the simplest possible demo and test of
Simplest possible, distributed,
src/peerconnection demo in which text boxes
act as the signalling channel between two peers. Messages can be exchanged by
email, IM, shared doc, etc.
Starts a TCP echo server on port 9998. Run
telnet 127.0.0.1 9998 and then
type some stuff to verify that echo server echoes what you send it.
Press ctrl-D to have the echo server terminate the connection or press
ctrl-] then type
quit to exit telnet.
Simplest possible, single-page, demo of the SOCKS proxy (
This command may be used to test the proxy:
curl -x socks5h://localhost:9999 www.example.com
-h indicates that DNS requests are made through the proxy too, i.e. not resolved locally)
Alternatively, use an extension like SwitchyProxySharp
to set Chrome's proxy settings and then just browse stuff.
To see debugging output, open the background page.
Distributed SOCKS proxy with a telnet-based signalling channel.
Intended for use with our Docker-based integration testing.
If you're curious, try
telnet localhost 9000 or running
Guess-timates your NAT type.
Distributed SOCKS proxy demo. This is essentially uProxy without any
social network integration.
As simple-fredom-chat, except WebRTC traffic between the two peers is obfuscated.
Wireshark may be used to verify that the traffic is obfuscated; the endpoints
in use - along with a lot of debugging information - may be determined by
As copypaste-fredom-chat, except WebRTC traffic between the two peers is obfuscated.
Simplest possible demo of the TURN server.
The TURN "frontend" interacts directly with TURN clients, the "backend" manages
+-------------+ | | | ++ +-------> +-------------+ | ++ | | | | | TURN client +-----> | oo | <-------------> | ++ +-------> | oo | webrtc | ++ | | | | | +---+---------+ | ++ +-------> TURN frontend | ++ | | | +---+---------+ TURN backend oo ++ oo server socket ++ relay socket
The server may be used with standard TURN clients, e.g. the command-line
tools from the
- Install the rfc5766-turn-server client utilities (
apt-get install rfc5766-turn-serveron Debian-like systems)
- Open a terminal and execute
turnutils_peer. This starts a UDP echo server on ports 3480 and 3481.
- Open another terminal and execute
turnutils_uclient -s -u test -w test -e 127.0.0.1 127.0.0.1 -p 9997
You should see a flurry of activity in the Chrome debugging console. On the
command line, you will soon see a report. The output is not very user-friendly
but the important parts are
tot_send_bytes. With the TURN
server, echo server, and TURN client all running locally, you should not see
any dropped packets. For more options, e.g. to open more channels or send
larger datagrams, see the
WebRTC data channels are secured with
An observer of the network traffic passing between two connected hosts can
see that DTLS is in use; from this, they may infer that data channels are in
use. We wish to make it difficult for an observer to detect the use of uProxy.
The SOCKS server configures WebRTC to pass its network traffic through a local
network port which transforms the data prior to sending it over the internet; a
port on the remote host is similarly configured to restore the data to its
original form prior to delivering it to the remote WebRTC peer.
We call this system "churn", and its code can be found in
- Build everything and start Simple SOCKS (see above).
- Do these once:
npm install -g wup
- Run wup:
(cd data ; wup) &
- Then, run the benchmark with
npm run benchmark.