New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

uproxy-networking

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uproxy-networking

uProxy's networking library: SOCKS5 over WebRTC

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

uproxy-networking

Build Status devDependency Status

uProxy's networking library provides a localhost SOCKS5 proxy that sends traffic over WebRTC to the peer, or recieves traffic from a peer over WebRTC and sends it to the destination website.

Overview

There are two main freedom modules: socks-to-rtc and rtc-to-net.

  • socks-to-rtc provides a local proxy (which the user could point their browser proxy settings to) which passes requests over a WebRTC peerconnection.
  • rtc-to-net acts as the 'remote' proxy which receives the requests from the socks-to-rtc peer over WebRTC, passes the request to the destination webserver, and serves the response back to socks-to-rtc.

Requirements

  • node (and npm, which is installed when you install node)
  • Grunt, which you can install with: npm install -g grunt-cli

Build

  • Run npm install from the base directory to obtain all prerequisites.
  • Running grunt compiles all the typescript into javascript which goes into the build directory.

Usage

This is built on top of freedom. To make use of this library, one needs to include socks-to-rtc.js and rtc-to-net.js (the compiled javascript is built in build/socks-to-rtc/ and /build/rtc-to-net/).

To see an example of using this for proxying, look at the build/socks-rtc-net/samples/socks-rtc-net-freedom-chromeapp/ which contains a Chrome app. The chrome app when started will run a socks proxy on localhost, and requests will over two peerconnections (in this case both in the same chrome app admitedly), and then to the net.

Run the Jasmine Tests

  • run Jasmine tests with grunt test

End-to-End Test with Chrome

Requirements

Manual

  • Run grunt to build the chrome app in the build/socks-rtc-net/samples/socks-rtc-net-freedom-chromeapp/ directory.
  • For Chrome, go to chrome://extensions, ensure developer mode is enabled, and load unpacked extension from the build/socks-rtc-net/samples/socks-rtc-net-freedom-chromeapp/ directory.
  • Open the background page, which will start a socks-rtc proxy listening on localhost:9999.
  • For Firefox, activate cfx, and run the command cfx run from the build/socks-rtc-net/samples/socks-rtc-net-freedom-firefoxapp/ directory.

At the moment, the way to test that this works is to just curl a webpage through the socks-rtc proxy. For example:

curl -x socks5h://localhost:9999 www.google.com

(the 'h' indicates that DNS requests are made through the proxy as well, and not resolved locally.)

You can also use an extension like SwitchyProxySharp to set Chrome's proxy settings and then just browse stuff.

End-to-End Echo-server Test with Firefox

The addon-sdk is required for firefox. You can find it at https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation

  • Build using the grunt command.
  • cd build/socks-rtc-net/samples/socks-rtc-net-freedom-chromeapp/ and then run the command cfx run which should startup firefox with the Firefox echo-server app running.
  • Use telnet 127.0.0.1 9998 to verify that echo server echo's what you send it. (type some stuff and see the same stuff repeated back to you). Ctrl-] then type quit exit telnet.

Building for Android

Prerequisites:

  • the ant build system.
  • the android-sdk
  • You will need android and adb are on your PATH (add sdk/tools and sdk/platform-tools to your PATH environment variable)
  • You'll also need to install the various SDK support libraries which you can do with the android sdk command.
  • Configure an emulated Android device using the android avd command.
    • So far tested on Ubuntu 14.04LTS using an emulated Nexus 4 device running Android L
    • The device MUST be configured with an SD card and "Use Host GPU"

Congiure and build:

  • grunt cca will build the project, create an Android APK, and install it onto the device. If no device is attached, the default Android emulator is used
  • adb forward tcp:19999 tcp:9999 will forward localhost:19999 to the emulator's port 9999.
    • This is the SOCKS5 proxy
  • adb forward tcp:19998 tcp:9998 will forward localhost:19998 to the emulator's port 9998.
    • telnet localhost 19998 is now the echo server on the device

FAQs

Package last updated on 08 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc