High-performance, lightweight TCP stealth tunnel designed for secure, low-latency relay connections.
- Native Zig Core: Minimal memory footprint (<0.5MB baseline) with zero garbage collection overhead.
- Multi-Tunnel Engine: Create, monitor, restart, and manage multiple independent tunnels concurrently.
- Built-in Connectivity & Latency Checker: Direct TCP RTT (ping) measurement and port status inspection.
- TLS 1.3 Record Carrier: Streams are encapsulated within standard TLS records for protocol masking.
- Integrated Anti-DPI Segmentation: Out-of-order TCP segmentation with sequence overlap and urgent flag signaling directly at the transport layer.
- ChaCha20-Poly1305 AEAD: Authenticated end-to-end encryption with vectorized processing.
- Multi-Port Redirection: Native iptables support for mapping alternative ports (e.g., 8443, 2087, 8080) to the primary entry port.
- Built-in Interactive Management: Terminal dashboard for configuration, service control, and live monitoring.
Run the one-command installer on your Linux server (x86_64):
bash <(curl -sSL https://raw.githubusercontent.com/Lagtor-code/flashtunnel/main/install.sh)Or clone the repository manually:
git clone https://github.com/Lagtor-code/flashtunnel.git /opt/flashtunnel && bash /opt/flashtunnel/install.shAfter installation, access the management menu anytime by running:
flashtunnel- Run
flashtunnelon your remote destination server. - Select option
1(Configure Server). - Set the tunnel listen port (default:
4433), local target service port (default:443), and a security key. - The service will start automatically via systemd.
- Run
flashtunnelon your local relay server. - Select option
2(Configure Client). - Enter the remote server IP, tunnel port, incoming listen port (default:
443), optional redirect ports, and the matching security key. - The relay service will start immediately.
Point your proxy client (e.g., VLESS / Trojan / Shadowsocks) to the relay server's IP address and chosen port.
# Run server directly
flashtunnel server --listen 0.0.0.0:4433 --target 127.0.0.1:443 --tcp --key <SECRET_KEY>
# Run client directly
flashtunnel client --server <REMOTE_IP>:4433 --listen 0.0.0.0:443 --tcp --key <SECRET_KEY>
# Run cryptographic and transport self-tests
flashtunnel testflashtunnel/
├── bin/
│ └── flashtunnel # Precompiled static Linux x86_64 binary
├── src/ # Complete Zig source code
│ ├── main.zig # CLI entrypoint
│ ├── tcp/
│ │ ├── tunnel_server.zig # Server listener and decryptor
│ │ ├── tunnel_client.zig # Client relay and desync injector
│ │ └── tunnel_protocol.zig # Protocol frame framing and AEAD
│ ├── protocol/
│ │ └── desync.zig # Packet desynchronization engine
│ └── crypto/
│ └── chacha20poly1305.zig# ChaCha20-Poly1305 implementation
├── build.zig # Zig build configuration
├── flashtunnel.sh # Management TUI script
├── install.sh # One-command installer
├── flashtunnel-server.service # Systemd unit template for server
├── flashtunnel-client.service # Systemd unit template for client
└── README.md # Documentation
Open-source under the MIT License.