Code Monkey home page Code Monkey logo

rtctunnel's Introduction

RTCTunnel

RTCTunnel builds network tunnels over WebRTC.

WARNING: this is a proof of concept and should not be used in production. Things like disconnects and invalid data are not handled gracefully and will result in the program crashing.

An overview of the application and how and why it was built is available here: RTCTunnel: Building a WebRTC Proxy with Go.

Installation

RTCTunnel can be installed via go get:

go get github.com/rtctunnel/rtctunnel/cmd/rtctunnel

Or downloaded from the releases page (for linux). Currently the pions/webrtc library requires libopenssl to compile.

Usage

RTCTunnel creates a network tunnel over WebRTC between two peers. Those peers are identified by a public key.

To use RTCTunnel first create a config with:

rtctunnel init

You can see info with:

rtctunnel info

Once you've done that on both peers, copy the two public keys and add a route. A route has four components: a local peer, a local port, a remote peer and a remote port. All network connections and data sent to the local port will be forwarded to the remote peer. For example:

export CLIENT_KEY=
export SERVER_KEY=
rtctunnel add-route \
    --local-peer=$CLIENT_KEY \
    --local-port=6379 \
    --remote-peer=$SERVER_KEY \
    --remote-port=6379

The route must be added on both peers and the CLIENT_KEY and SERVER_KEY should be set to the peer keys.

Once the routes are added you can run rtctunnel with:

rtctunnel run

Typically it would be run in the background.

A docker-compose example is available in examples/redis.

rtctunnel's People

Contributors

calebdoxsey 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.