xTunnel is a tool to tunnel TCP/UDP traffic between systems using QUIC protocol
- Encrypted Tunnels for TCP/UDP traffic
- Reverse tunnels
- Tunnel between systems even if they're behind a NAT
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 inclient
mode toPING
relay servers and choose the nearest one
-
Run the
Broker
serverxtunnel --mode=broker --config="./example/server.yaml"
-
Run the
Relay
serverxtunnel --mode=relay --token=token-r1 --broker=localhost:10000
-
Connect
client-1
sudo xtunnel --mode=client --token=token-c1 --broker=localhost:10000
-
Tunnel
fromclient-2
toclient-1
usingP2P
mode and tunnelTCP
trafficsudo xtunnel --mode=client --token=token-c2 --broker=localhost:10000 --tunPeer=client-1 --tunPeerMode=p2p --tunType=tcp --tunFrom=:8000 --tunTo=192.168.1.100:22
-
Tunnel
fromclient-3
toclient-1
usingRelay
mode and tunnelTCP
trafficsudo xtunnel --mode=client --token=token-c3 --broker=localhost:10000 --tunPeer=client-1 --tunPeerMode=relay --tunType=tcp --tunFrom=:8100 --tunTo=192.168.1.100:22
-
Reverse Tunnel
fromclient-1
toclient-4
usingP2P
mode and tunnelTCP
trafficsudo 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
-
Multiple Tunnels
fromclient-5
sudo xtunnel --mode=client --token=token-c5 --broker=localhost:10000 --config="./example/client-5.yaml"
This tool depends on Make and Protobuf packages. Be sure to install them before building
make all
This tool depends on the following core dependencies
Module | Link |
---|---|
supergiant-hq/xnet | View |
Apache License 2.0