Use this skill when:
Do NOT use this skill when:
bash
pip install aitun
Or install via one-line script (Linux/macOS):
bash
curl -fsSL https://aitun.cc/install.sh | bash
Windows (PowerShell):
powershell
irm https://aitun.cc/install.ps1 | iex
Or if already installed, verify:
bash
which aitun
Ensure the local web service is running on a port. For static HTML files:
bash
# Serve a directory with a built HTML page
python3 -m http.server 8080 --directory /path/to/html/dir
For other frameworks, start their dev server:
npm run dev -- -p 3000flask run --port 5000Option A: Free instant tunnel (no sign-up, 24-hour limit)
Free tunnels use proxy address mode (path-based routing). No subdomain is assigned — the public URL uses the format aitun.cc/<tunnel-code>. Simply run without a token:
bash
aitun -p 8080 &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://aitun.cc/abc123Option B: Custom subdomain (requires sign-in at aitun.cc)
Registered users can create custom subdomains with two domain levels:
myapp.t.aitun.cc (up to 5 subdomains)myapp.aitun.cc (up to 2 subdomains)bash
# Check availability
curl -s https://aitun.cc/aitun-api/subdomain/check/myapp
# Register via website: https://aitun.cc
# Then use your token:
aitun -p 8080 -k YOUR_TOKEN
Tell the user their website is now publicly accessible:
text
Your website is now live at: https://aitun.cc/abc123
This free tunnel expires in 24 hours.
For a permanent subdomain (e.g., myapp.aitun.cc), register at https://aitun.cc
When done, stop the tunnel:
bash
kill $AITUN_PID 2>/dev/null
The aitun command (installed via pip install aitun, or alternatively curl -fsSL https://aitun.cc/install.sh | bash / irm https://aitun.cc/install.ps1 | iex on Windows) accepts these flags:
FlagDescription-p PORTLocal HTTP service port (optional; omit for TCP-only mode with --tcp-ports)-k TOKENAuth token for registered subdomain (omit for free tunnel)--host HOSTLocal service address (default: localhost)--tcp-ports PORTSTCP forwarding ports, comma-separated (e.g., 22,3306; requires -k). Use without -p for TCP-only mode--p2pEnable P2P direct connection (default: enabled)--no-p2pDisable P2P, force server relay mode--daemonRun as background daemon--stopStop running daemon
-p flag is optional. Omit it when using --tcp-ports only (TCP-only mode, e.g., SSH/RDP forwarding without HTTP)-p is specified, the local service must be running before starting aitun (the client checks port availability)aitun.cc/abc123), NOT subdomainsxxx.t.aitun.cc): up to 5 per userxxx.aitun.cc): up to 2 per user