uProxy is a browser extension that lets users share their internet connection.
Please read the uProxy Coding Guide to learn more about contributing to uProxy. For a high level technical overview of uProxy, see the uProxy Design Doc.
uProxy is built using the following tools:
To manage dependencies we use:
package.json
)bower.json
) including Polymer.npm install -g --production yarn
.yarn global add --prod grunt-cli
)First, to install required NPMs and configure the build/
directory for TypeScript compilation, execute:
yarn
Then, to compile the TypeScript code and build uProxy and all of the demo apps, execute:
grunt
Having problems? To clean up from a partial, broken, or extremely out-dated build, try executing this command before repeating the above steps:
yarn run clean
Visual Studio Code supports TypeScript compilation, search, and refactoring out of the box - just point it at the directory containing your uProxy clone.
These are the steps to try uProxy in the Chrome browser.
chrome://extensions
, make sure 'Developer mode' is enabledbuild/src/chrome/app
build/src/chrome/extension
You need both the uProxy Chrome App and the uProxy Extension.
You can use grunt build_chrome
from the root directory of the repository to re-compile just Chrome components.
These are the steps to try uProxy in the Firefox browser.
To run the add-on you need to have the Firefox add-on SDK installed. Instructions can be found here: https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation
Run cd build/src/firefox
Run cfx run
and Firefox should launch with the uProxy add-on installed
You can use grunt build_firefox
from the root directory of the repository to compile just Firefox comonents.
These can be found at build/src/samples/
. They are a mix of web sites, browser extensions (Chrome and Firefox), and Node.js apps.
To run web apps:
python -m SimpleHTTPServer
To run Chrome apps:
chrome://extensions
, enable check Developer Mode, and load the unpacked extension from the relevant directory, e.g. build/src/samples/simple-socks-chromeapp/
.To run Firefox add-ons:
yarn install jpm -g
, cd
to the relevant directory, e.g. build/src/samples/simple-socks-firefoxapp/
, and execute jpm run -b `which firefox`
.To run Node.js apps:
node
with the entry point, e.g. node build/src/samples/zork-node/index.js
Note: until freedom-for-node supports core.rtcpeerconnection, this sample will not work
More on the demo apps themselves:
src/peerconnection
.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.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.socks-to-rtc
and
rtc-to-net
directories). 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)telnet localhost 9000
.uProxy uses the Grunt build system for its build tasks. Here is a list of uProxy's Grunt commands:
build
- Builds everything, making stuff in the build
directory (and runs tests).
build_chrome
- Build Chrome app and extension
build_chrome_app
- Build just Chrome appbuild_chrome_ext
- Build just Chrome extensionbuild_firefox
- Build just Firefoxdist
- Generates distribution files, including the Firefox xpiclean
- Cleans uptest
- Run unit testsintegration_test
- Run integration testseverything
- 'build', 'test' and then 'integration_test'The easiest way to stay current is to pull changes, run grunt build
to build
your distribution, and re-run as you make changes to the files.
Before submitting any changes to the repository, make sure to run grunt test
to make sure it passes all unit tests. Failing tests are enough to immediately
reject submissions. :)
The development for mobile platforms uses the Cordova Chrome Apps (CCA) tool, also known as the Chrome Apps for Mobile Toolchain. You can find the platform-specific information below:
Configuration and setup files
Gruntfile.js
a file that specifies common tasks, e.g. how to build and package uProxy.bower.json
specifies dependent libraries from Bower.package.json
specifies dependent libraries from NPM..gitignore
what git should ignore.bowerrc
tells bower where to put files.travis.yml
Travis auto-testingtools
directory contains some typescript and javascript to help Grunt.third_party/tsd.json
specifies the typescript definitions to useSource code
src
holds all source code; no compiled filessrc/generic_ui
generic user interface codesrc/generic_core
generic uproxy core-functionality codesrc/chrome/app
code specific to the chrome appsrc/chrome/extension
code specific to the chrome extensionsrc/firefox
code specific to firefoxthird_party
holds external libraries we depend on that are copied into this repositorynode_modules
dynamically generated npm module dependenciesscraps
temporary holding for sharing scraps of codeDynamically created directories (grunt clean
should remove them)
build
created by grunt tasks; holds the built code, but none of the code that was compiled.build/dist
created by grunt tasks; holds final distribution versions.grunt
holds grunt cache stuff.tscache
holds typescript cache stuff