🔗
P2P Direct Connection
Supports IPv6/IPv4 P2P direct tunneling between client and connector, reducing latency and server load. Falls back to relay automatically when P2P is unavailable.
🔄
Server Relay
When direct P2P connection is not possible, traffic is securely relayed through the AiTun server, ensuring your services are always accessible regardless of network conditions.
🌐
Custom Subdomains
Get a custom subdomain (e.g., myapp.t.aitun.cc) for each tunnel. Easily share your local development server, API, or webhook with anyone on the internet.
🔐
Secure & Encrypted
All tunnel traffic is encrypted end-to-end. Authentication tokens ensure only authorized clients can create tunnels. Your data stays private and secure.
⚡
Zero-Config Quick Start
No sign-up required. Just run the client and it automatically creates a tunnel with a proxy URL (e.g., aitun.cc/abc123) with 24-hour validity, auto-renewed on each restart. Perfect for quick demos and testing.
🌐
Distributed Relay Network
Clients optionally participate as relay nodes, creating a distributed network that improves speed and resilience. Every participant makes the network stronger for everyone.
💻
Cross-Platform
Clients available for Linux (amd64/arm64), macOS (Intel/Apple Silicon), and Windows. Download the binary for your platform and start tunneling in seconds.
🚀
AI Agent Ready
Integrate AiTun into your AI agents and workflows. Use our CLI or API to expose locally-built web pages to the public internet with a single command.
How AiTun Tunnel Works
AiTun supports P2P direct connection, server relay, and distributed relay network modes.
Local Service
localhost:8080
→
AiTun Client
aitun
↔
AiTun Server
aitun.cc
→
Public URL
myapp.t.aitun.cc
P2P Mode (Preferred)
When the client and connector both support IPv6/IPv4 and can reach each other directly, AiTun establishes a P2P tunnel with minimal latency. The server only assists in the initial handshake and then steps back, allowing direct data transfer between the two endpoints.
Relay Mode (Fallback)
When P2P is not possible (e.g., both behind symmetric NAT), all traffic is securely relayed through the AiTun server. This ensures your service is always accessible, regardless of network topology. The relay adds minimal overhead thanks to efficient multiplexing.
Distributed Relay Network
Clients connect by relay mode automatically serve as relay nodes in the distributed network. This improves overall throughput and resilience by providing multiple relay paths. Each relay node only forwards encrypted traffic and cannot read the content. Participating clients help make the network faster for everyone.
Quick Start
Install the client and expose your first tunnel in under a minute.
Step 1: Install the Client
Recommended — pip install (cross-platform, bundles the binary):
pip install aitun
Alternative — one-line install script (Linux/macOS):
curl -fsSL https://aitun.cc/install.sh | bash
Windows (PowerShell):
irm https://aitun.cc/install.ps1 | iex
Or download the binary directly:
Download for your platform from the Downloads tab, or use wget:
wget https://aitun.cc/downloads/aitun-client-linux-amd64
chmod +x aitun-client-linux-amd64
Step 2: Start a Free Tunnel (No Sign-Up)
One-line install (HTTP tunnel):
aitun -p 8080
With binary (HTTP tunnel):
./aitun-client -p 8080
TCP-only (SSH/RDP, no HTTP):
aitun -k TOKEN --tcp-ports 22
Step 3: Get Your Public URL
The client outputs your public URL, e.g. https://aitun.cc/abc123. Share it with anyone to access your local service.
Step 4: Register for a Permanent Subdomain (Optional)
Sign in on the website, create a token, then:
aitun -k YOUR_TOKEN -p 8080
HTTP + TCP forwarding:
aitun -k YOUR_TOKEN -p 8080 --tcp-ports 22
TCP-only (SSH/RDP without HTTP):
aitun -k YOUR_TOKEN --tcp-ports 22
pip install aitun
curl -fsSL https://aitun.cc/install.sh | bash
irm https://aitun.cc/install.ps1 | iex
aitun -p 8080
[OK] Tunnel established
[OK] Tunnel code: abc123
[OK] Proxy URL: https://aitun.cc/abc123
[OK] Valid until: 2025-06-14 (24h)
Downloads
Install via pip (recommended, cross-platform, bundles the binary) or grab the client binary for your platform below.
v4.9.22
Latest Release
pip install aitun
wget https://aitun.cc/downloads/aitun-client-linux-amd64 && chmod +x aitun-client-linux-amd64
📋 Checksums
SHA256 verification