Expose Local Services
to the World

AiTun is a secure tunnel service that makes your local servers accessible from the public internet, supporting IPv6/IPv4 P2P direct connection and server relay.

AiTun 是一款安全的内网穿透服务,可将本地服务器暴露到公网,支持 IPv6/IPv4 P2P 直连与服务器中转双模式。

Get Started → Download Client
🔗

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.

支持 IPv6/IPv4 P2P 直连隧道,降低延迟;P2P 不可用时自动回退至服务器中转。
🔄

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.

当 P2P 直连不可用时,流量通过 AiTun 服务器安全中转,确保服务始终可访问。
🌐

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.

每个隧道获得自定义子域名(如 myapp.t.aitun.cc),方便分享本地服务。
🔐

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.

所有隧道流量端到端加密,认证令牌确保仅授权客户端可创建隧道。

Easy to Use

A single command to start a tunnel. No complex configuration needed. Install the client, run it with your server address, and your local service is instantly public.

一条命令即可启动隧道,无需复杂配置。安装客户端,指定服务器地址,本地服务即刻对外。
🖥️

Cross-Platform

Clients available for Linux (amd64/arm64), macOS (Intel/Apple Silicon), and Windows. Also available as a Python pip package for easy installation.

支持 Linux (amd64/arm64)、macOS (Intel/Apple Silicon) 和 Windows,亦可通过 pip 安装。

Install the Client

Download the binary for your platform from the Downloads tab, or install via pip:

pip install tunnelgo-client

Start a Tunnel

Expose your local service running on port 8080:

tunnelgo-client -s aitun.cc:6639 -l 8080

Get Your Public URL

The client outputs your public URL, e.g. https://myapp.t.aitun.cc. Share it with anyone to access your local service.

Connect from Another Machine (Optional)

Use the tunnelgo-connect tool on a remote machine to connect to the tunnel:

tunnelgo-connect -s aitun.cc:6639 -t <tunnel-id>

# Method 1: Direct binary download wget https://aitun.cc/downloads/tunnelgo-client-linux-amd64 chmod +x tunnelgo-client-linux-amd64 ./tunnelgo-client-linux-amd64 -s aitun.cc:6639 -l 8080 # Method 2: Install via pip pip install tunnelgo-client tunnelgo-client -s aitun.cc:6639 -l 8080 # Expected output: Tunnel established! Public URL: https://myapp.t.aitun.cc Protocol: http Local: http://localhost:8080 # On a remote machine, connect to the tunnel: tunnelgo-connect -s aitun.cc:6639 -t myapp
v2.19.0 Latest Release
# Install via pip (Python 3.7+)
pip install tunnelgo-client

How AiTun Tunnel Works

AiTun supports two tunneling modes: P2P direct connection and server relay.

Local Service
localhost:8080
AiTun Client
tunnelgo-client
AiTun Server
aitun.cc:6639
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.