Giter Club home page Giter Club logo

rtptun's Introduction

rtptun

rtptun is a UDP tunnel that reshapes UDP traffic as RTP, helping you get VPN traffic through protocol whitelists.

Features

  • Lightweight
  • Asynchronous
  • Cross-platform (tested on Linux, Windows and Android)
  • Payload encryption (ChaCha20-Poly1305)

Limitations

  • No forward secrecy
  • No replay protection

Requirements

  • GCC (GCC 8 or higher recommended)
  • Make
  • Cygwin (for Windows builds)
  • libsodium
  • libev

Building

Installing required dependencies

Ubuntu/Debian

# apt install libev-dev libsodium-dev

Termux

$ pkg install libev libsodium

Alpine

# apk add libev-dev libsodium-dev
# apk add libsodium-static # (optional, needed for static builds)

Cygwin

  • gcc-core
  • make
  • libev-devel
  • libsodium-devel

Compiling

There are several build types available:

Release build

Produces optimized binary.

Recommended. This is usually what you want to go with.

$ make -j$(nproc) DEBUG=0 STATIC=0

Static release build

Same as release build but produces a static binary.

Static builds do not work under Windows yet.

$ make -j$(nproc) DEBUG=0 STATIC=1

Debug build

Produces unopimized binary with debug information.

Should only be used for development purposes.

$ make -j$(nproc) DEBUG=1 STATIC=0

Installation

Release build

$ make install DEBUG=0 STATIC=0

Static release build

$ make install DEBUG=0 STATIC=1

Usage

Usage: rtptun <action> <options>
Example:
 - Generate key:     rtptun genkey
 - Run server:       rtptun server -k <KEY> -l 5004 -p 1194
 - Run client:       rtptun client -k <KEY> -l 1194 -d 192.0.2.1 -p 5004
 - Load config file: rtptun -f /etc/rtptun.conf

Actions:
  client  : run as client
  server  : run as server
  genkey  : generate encryption key

Server options:
  -i : listen address (default: 0.0.0.0)
  -l : listen port (default: 5004)
  -d : destination address (default: 127.0.0.1)
  -p : destination port
  -k : encryption key

Client options:
  -i : local address (default: 127.0.0.1)
  -l : local port
  -d : server address
  -p : server port (default: 5004)
  -k : encryption key

Program options:
  -f : Load configuration file
  -h : display help message
  -v : verbose
  -V : display version information

Example

Generating a key

Both client and server must use the same key. You can generate a new random key using:

$ rtptun genkey

Server

Assuming there's a VPN server (OpenVPN/WireGuard/...) running on port 1194:

$ rtptun server -k <KEY> -l 5004 -p 1194

rtptun server will be listening on port 5004 for rtptun clients to connect and tunnel their traffic to the VPN server running on port 1194.

Client

$ rtptun client -k <KEY> -l 1194 -d 192.0.2.1 -p 5004

rtptun will listen locally on port 1194 and tunnel traffic to rtptun server running on host 192.0.2.1 and port 5004.

Disclaimer

Here be dragons!

I'm no security expert, I've written this software just to learn a thing or two about networking. I'm not responsible if Lum-chan invades your home and steals your cookies.

Use this software at your own discretion.

External Libraries

rtptun's People

Contributors

me-asri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

rtptun's Issues

compiling issue

Hello dear when we compile in centos 7 only getting error
src/client.c: In function ‘rtptun_client_new’:
src/client.c:57:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
ev_timer_init(&client->to_timer, timeout_cb, 0, RTPTUN_TIMEOUT);
packge allready installed

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.