All Projects → sopium → Titun

sopium / Titun

Licence: gpl-3.0
Simple, fast, and cross-platform IP tunnel written in Rust. WireGuard compatible.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Titun

Inlets Pro
Secure TCP and HTTP tunnels that work anywhere
Stars: ✭ 179 (+842.11%)
Mutual labels:  networking, tunnel
Nexer
Content based network multiplexer or redirector made with love and Go
Stars: ✭ 7 (-63.16%)
Mutual labels:  networking, tunnel
vmecs
A simple VMess proxy implementation written in C.
Stars: ✭ 28 (+47.37%)
Mutual labels:  tunnel, networking
Pytun
Linux TUN/TAP wrapper for Python
Stars: ✭ 116 (+510.53%)
Mutual labels:  networking, tunnel
Wireguard Docs
📖 Unofficial WireGuard Documentation: Setup, Usage, Configuration, and full example setups for VPNs supporting both servers & roaming clients.
Stars: ✭ 3,201 (+16747.37%)
Mutual labels:  networking, tunnel
Shadow
Shadow is a unique discrete-event network simulator that runs real applications like Tor, and distributed systems of thousands of nodes on a single machine. Shadow combines the accuracy of emulation with the efficiency and control of simulation, achieving the best of both approaches.
Stars: ✭ 769 (+3947.37%)
Mutual labels:  networking
Sshtunnel
SSH tunnels to remote server.
Stars: ✭ 797 (+4094.74%)
Mutual labels:  tunnel
Jsftp
Light and complete FTP client implementation for Node.js
Stars: ✭ 766 (+3931.58%)
Mutual labels:  networking
Okreplay
📼 Record and replay OkHttp network interaction in your tests.
Stars: ✭ 697 (+3568.42%)
Mutual labels:  networking
Gleri
Network protocol, service, and API for using OpenGL remotely.
Stars: ✭ 16 (-15.79%)
Mutual labels:  networking
Sv3
A userspace software-switch including Intel 82599 10G NIC driver
Stars: ✭ 6 (-68.42%)
Mutual labels:  networking
Inlets Operator
Add public LoadBalancers to your local Kubernetes clusters
Stars: ✭ 795 (+4084.21%)
Mutual labels:  tunnel
Docker Host
A docker sidecar container to forward all traffic to local docker host or any other host
Stars: ✭ 769 (+3947.37%)
Mutual labels:  tunnel
Swift Nio
Event-driven network application framework for high performance protocol servers & clients, non-blocking.
Stars: ✭ 6,777 (+35568.42%)
Mutual labels:  networking
Evillimiter
Tool that monitors, analyzes and limits the bandwidth of devices on the local network without administrative access.
Stars: ✭ 764 (+3921.05%)
Mutual labels:  networking
Python Proxy
HTTP/HTTP2/HTTP3/Socks4/Socks5/Shadowsocks/ShadowsocksR/SSH/Redirect/Pf TCP/UDP asynchronous tunnel proxy implemented in Python 3 asyncio.
Stars: ✭ 692 (+3542.11%)
Mutual labels:  tunnel
Mongo Cxx Driver
C++ Driver for MongoDB
Stars: ✭ 792 (+4068.42%)
Mutual labels:  networking
Zerotierone
A Smart Ethernet Switch for Earth
Stars: ✭ 7,839 (+41157.89%)
Mutual labels:  networking
Bmon
bandwidth monitor and rate estimator
Stars: ✭ 787 (+4042.11%)
Mutual labels:  networking
Com.unity.multiplayer.mlapi
A game networking framework built for the Unity Engine to abstract game networking concepts.
Stars: ✭ 781 (+4010.53%)
Mutual labels:  networking

TiTun

License: GPL v3 Bors enabled Dependabot enabled azure-pipelines codecov

Simple, fast, and cross-platform IP tunnel written in Rust. WireGuard compatible.

WARNING

This project is experimental and still under development. Use at your own risk.

Build

Install rust, and then

$ cargo build --release

to build a titun executable in target/release.

CLI and Configuration

Use

$ sudo titun -fc tun0.toml

to run TiTun and open the tun interface tun0. Here -f tells the program to run in foreground, i.e., not daemonize. The -c tun0.toml option tells the program to load configuration from the file tun0.toml.

Use titun show to show interface status. (It's similar to wg show.) Use titun help to discover more CLI options.

It is recommended to use the TOML format, but the format used by wg is also accepted.

# All optional. NOT applied when reloading.
[General]
# Set logging. Override by the `--log` option or the `RUST_LOG` environment variable.
Log = "info"
# Switch to user after initialization to drop privilege. Override by `--user`.
#
# If you use this option, and want to reload configuration, the configuration file
# must be readable by this user.
User = "nobody"
# Switch to group.
Group = "nogroup"
# --foreground
Foreground = true
# Number of worker threads. Override by `--threads` or `TITUN_THREADS`.
# Default is `min(2, number of cores)`.
Threads = 2

[Interface]
# Optiona. Alias: Port.
ListenPort = 7777
# Alias: Key.
PrivateKey = "2BJtcgPUjHfKKN3yMvTiVQbJ/UgHj2tcZE6xU/4BdGM="
# Alias: Mark.
FwMark = 33

[[Peer]]
PublicKey = "Ck8P+fUguLIf17zmb3eWxxS7PqgN3+ciMFBlSwqRaw4="
# Optional. Alias: PSK.
PresharedKey = "w64eiHxoUHU8DcFexHWzqILOvbWx9U+dxxh8iQqJr+k="
# Optional. Alias: Routes.
AllowedIPs = ["192.168.77.0/24"]
# Optional.
#
# Host names can be used. If name resolution fails, a warning is emitted and
# the field is ignored.
Endpoint = "192.168.3.1:7777"
# Optional. Range: 1 - 65535. Alias: Keepalive.
PersistentKeepalive = 17

systemd

On linux, this is the recommended way to run TiTun. Copy the titun binary to /usr/local/bin, and put this service file [email protected] at /etc/systemd/system/:

[Unit]
Description=TiTun instance %I

[Service]
Type=notify
Environment=RUST_BACKTRACE=1

ExecStart=/usr/local/bin/titun -fc /etc/titun/%I.conf
ExecStartPost=/bin/sh -c "if [ -x /etc/titun/%I.up.sh ]; then /etc/titun/%I.up.sh; fi"
ExecStopPost=/bin/sh -c "if [ -x /etc/titun/%I.down.sh ]; then /etc/titun/%I.down.sh; fi"

ExecReload=/usr/local/bin/titun check /etc/titun/%I.conf
ExecReload=/bin/kill -HUP $MAINPID

Restart=always

[Install]
WantedBy=multi-user.target

Now if you want to run a TiTun interface tun0, put its configuration at /etc/titun/tun0.conf, write a script /etc/titun/tun0.up.sh to configure IP address, routes, DNS etc., write a script /etc/titun/tun0.down.sh to reverse those changes, and use systemctl (start|stop|reload|restart|status) [email protected] to manage the service.

Use with WireGuard tools

On unix-like operating systems, the WireGuard cross platform userspace interface is implemented. So you can use wg and wg-quick to configure TiTun interfaces.

To use wg-quick, specify the WG_QUICK_USERSPACE_IMPLEMENTATION environment variable to titun:

$ sudo WG_QUICK_USERSPACE_IMPLEMENTATION=titun wg-quick ...

Operating Systems Support

Linux

Linux is supported.

FreeBSD

FreeBSD is supported.

Windows

Windows is semi-supported. (TODO: document driver, GUI, specific configuration, etc.)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].