Skip to content

supergiant-hq/xtunnel

Repository files navigation

xTunnel

ProjectStatus Release

xTunnel is a tool to tunnel TCP/UDP traffic between systems using QUIC protocol

Features

  • Encrypted Tunnels for TCP/UDP traffic
  • Reverse tunnels
  • Tunnel between systems even if they're behind a NAT

Usage

Download the binary for your respective OS and ARCH from Releases

Argument Description Type Default
mode Operation Mode broker, relay or client broker
brokerListen Broker Listen Address IP:PORT :10000
relayListen Relay Listen Address IP:PORT :15000
brokerAddr Broker Address IP:PORT :10000
relayAddr Relay Address IP:PORT ""
token Authentication Token String ""
tunPeer Tunnel Peer to connect to String ""
tunPeerMode Tunnel Peer connect mode p2p or relay p2p
tunType Tunnel Type tcp or udp tcp
tunRev Reverse Tunnel boolean false
tunFrom Tunnel requests from IP:PORT ""
tunTo Tunnel requests to IP:PORT ""
config Config File File Path ./config.yaml
debug Debug Mode boolean false

Note: sudo is required in client mode to PING relay servers and choose the nearest one

Example

  1. Run the Broker server

    xtunnel --mode=broker --config="./example/server.yaml"
  2. Run the Relay server

    xtunnel --mode=relay --token=token-r1 --broker=localhost:10000
  3. Connect client-1

    sudo xtunnel --mode=client --token=token-c1 --broker=localhost:10000
  4. Tunnel from client-2 to client-1 using P2P mode and tunnel TCP traffic

    sudo xtunnel --mode=client --token=token-c2 --broker=localhost:10000 --tunPeer=client-1 --tunPeerMode=p2p --tunType=tcp --tunFrom=:8000 --tunTo=192.168.1.100:22
  5. Tunnel from client-3 to client-1 using Relay mode and tunnel TCP traffic

    sudo xtunnel --mode=client --token=token-c3 --broker=localhost:10000 --tunPeer=client-1 --tunPeerMode=relay --tunType=tcp --tunFrom=:8100 --tunTo=192.168.1.100:22
  6. Reverse Tunnel from client-1 to client-4 using P2P mode and tunnel TCP traffic

    sudo xtunnel --mode=client --token=token-c4 --broker=localhost:10000 --tunPeer=client-3 --tunPeerMode=p2p --tunType=tcp --tunRev=true --tunFrom=:9000 --tunTo=192.168.1.100:22
  7. Multiple Tunnels from client-5

    sudo xtunnel --mode=client --token=token-c5 --broker=localhost:10000 --config="./example/client-5.yaml"

Build

This tool depends on Make and Protobuf packages. Be sure to install them before building

make all

Packages

This tool depends on the following core dependencies

Module Link
supergiant-hq/xnet View

License

Apache License 2.0