Skip to main content

Tunneling TCP in WebSocket

Project description

Tunneling TCP connections in WebSocket to circumventing firewalls.
It’s light and can run on some PaaS (with SSL support).

Features

  • Authentication

  • Proxy support (using HTTP CONNECT; test your proxy)

  • Display error message in browser (plain HTTP only)

  • SOCKS v5 and HTTP(S) in the same port (HTTP proxy is slower)

WARN: Do not rely it on security when not using SSL (encryption always enabled, but is much weaker than SSH tunnel)

Usage

wstan [-h] [-g] [-c | -s] [-d] [-z] [-p PORT] [-t TUN_ADDR]
      [-r TUN_PORT]
      [uri] [key]

positional arguments:
  uri                   URI of server
  key                   base64 encoded 16-byte key

optional arguments:
  -h, --help            show this help message and exit
  -g, --gen-key         generate a key and exit
  -c, --client          run as client (default, also act as SOCKS5/HTTP(S)
                        server)
  -s, --server          run as server
  -d, --debug
  -y PROXY, --proxy PROXY
                        let client use a HTTPS proxy (host:port)
  -z, --compatible      useful when server is behind WS proxy
  -p PORT, --port PORT  listen port of SOCKS5/HTTP(S) server at localhost
                        (defaults 1080)
  -t TUN_ADDR, --tun-addr TUN_ADDR
                        listen address of server, overrides URI
  -r TUN_PORT, --tun-port TUN_PORT
                        listen port of server, overrides URI

Example:

# generate a key using "wstan -g"
wstan ws://yourserver.com KEY -s  # server
wstan ws://yourserver.com KEY  # client
# now a proxy server is listening at localhost:1080 (at client side)

Example for OpenShift with SSL:

wstan wss://yours.rhcloud.com:8443 KEY -s -z -t $OPENSHIFT_PYTHON_IP -r $OPENSHIFT_PYTHON_PORT  # server
wstan wss://yours.rhcloud.com:8443 KEY -z  # client

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wstan-0.3.zip (63.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page