Giter Club home page Giter Club logo

websockproxy's Introduction

#WebSockets Proxy

A websocket ethernet switch built using Tornado in Python

Implements crude rate limiting on WebSocket connections to prevent abuse.

Could use some cleanup!

How it works

It's quite simple. The program starts off by creating a TAP device and listening for websocket connections on port 80. When clients connect, ethernet frames received via the websocket are switched between connected clients and the TAP device. All communication is done via raw ethernet frames.

To use this in support of a virtual network you must set up the host system as a DHCP server and router.

SSL support is not included. To enable SSL, please use a reverse proxy with SSL and websockets support, such as nginx.

Getting Started

The easiest way to get up and running is via its public docker image. This image will set up a fully contained router enviornment using IPTables for basic NAT functionality and dnsmasq for DHCP support.

To set up the relay via docker simply run

docker run --privileged -p 8080:80 --name relay benjamincburns/jor1k-relay:latest

and point jor1k, your VPN client, or your emulator of choice at ws://YOUR_HOSTNAME:8080/

Note that the container must be run in priviliged mode so that it can create its TAP device and set up IPv4 masquerading.

For better security be sure to set up an Nginx reverse proxy with SSL support along with a more isolated docker bridge and some host-side firewall rules which prevent clients of your relay from attempting to connect to your host machine.

websockproxy's People

Contributors

benjamincburns avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.