Rusnel
Description
Rusnel is a fast TCP/UDP tunnel, transported over and encrypted using QUIC protocol. Single executable including both client and server. Written in Rust.
Features
- Easy to use
- Single executable including both client and server.
- Uses QUIC protocol for fast and multiplexed communication.
- Encrypted connections using the QUIC protocol (TLS 1.3).
- Static forward tunneling (TCP, UDP)
- Static reverse tunneling (TCP, UDP)
- Dynamic tunneling (socks5)
- Dynamic reverse tunneling (reverse socks5)
- Layered peer authentication: insecure, fingerprint pinning, or full mTLS (see Authentication).
Install
or
Clone the repository and build the project:
Usage
)
)
)
)
)
<SERVER> defines )
<remote>...
<remote>s
<local-host>:<local-port>:<remote-host>:<remote-port>/<protocol>
)
)
)
; )
; )
Authentication
Both the server and the client require an explicit TLS-mode flag — there is no silent insecure default. Three modes:
| Mode | Server | Client |
|---|---|---|
| Insecure | --insecure |
--insecure |
| Fingerprint pin | --tls-self-signed (or --tls-cert/--tls-key) |
--tls-fingerprint sha256:... |
| Full mTLS | --tls-cert ... --tls-key ... --tls-ca ... |
--tls-ca ... --tls-cert ... --tls-key ... [--tls-server-name ...] |
Quickest path for a private/single-user setup — the server logs its fingerprint at startup, the client pins it:
# server cert fingerprint: sha256:abcd...
For full mTLS, generate a CA + server + client cert (no openssl required):
rusnel cert --help lists the underlying subcommands (ca, server,
client, fingerprint) for finer control. Pre-configured binaries with
credentials baked in at compile time are also supported via
RUSNEL_EMBED_* env vars — see build.rs and the
CHANGELOG for details.
TODO
- write tests in rust for tcp, udp, reverse and socks
- improve logging by for each tunnel
- add server tls certificate verification
- add mutual tls verification
- add proxy support for client (client connects to server through a proxy)
- add fake-beckend http/3 feature to server
- disguise traffic as HTTP/3 to bypass DPI firewalls (ALPN
h3, default UDP/443, configurable SNI, RFC 9000 QUIC version, optionally CA-signed cert and minimal HTTP/3 facade for active probes) - client reconnect
- benchmark performance against chisel (and other tunnel tools, e.g. wstunnel, frp)
- support UDP over SOCKS5 (UDP ASSOCIATE — currently only CONNECT/TCP is implemented)