/install aitun-tunnel
AiTun Tunnel - Expose Local Web Pages to the Public Internet
When to Use
Use this skill when:
- You've built a web page, dashboard, or web app locally and need to share it publicly
- You need to test a local HTTP service from an external device
- You want to demo a locally-running application to someone
- You need a public webhook endpoint for an external service to call
- You want to expose a local API for integration testing
- You built a website for a user and they want to see it in their browser
Do NOT use this skill when:
- The content only needs to be viewed locally
- The user asks for a file download (use file sharing instead)
Instructions
Step 1: Install aitun
pip install aitun
Or if already installed, verify:
which aitun || pip show aitun
Step 2: Start the local web service
Ensure the local web service is running on a port. For static HTML files:
# 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:
- Next.js:
npm run dev -- -p 3000 - Flask:
flask run --port 5000 - Any HTTP service on any port
Step 3: Create a tunnel
Option A: Free instant tunnel (no sign-up, 24-hour limit)
aitun -s aitun.cc:6639 -l \x3CPORT> --free &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://abc123.t.aitun.cchttps://aitun.cc/s/abc123
Option B: Via API (no CLI needed)
curl -s -X POST https://aitun.cc/aitun-api/tunnel/free
Returns JSON with tunnel_key, url, and subdomain_url.
Option C: Custom subdomain (requires Google sign-in at aitun.cc)
# Check availability
curl -s https://aitun.cc/aitun-api/subdomain/check/\x3Cname>
# Register via website: https://aitun.cc
# Then use:
aitun -s aitun.cc:6639 -l \x3CPORT> -sub \x3Cname>
Step 4: Share the public URL
Tell the user their website is now publicly accessible:
Your website is now live at: https://abc123.t.aitun.cc
This free tunnel expires in 24 hours.
For a permanent URL (e.g., myapp.aitun.cc), register at https://aitun.cc
Step 5: Clean up
When done, stop the tunnel:
kill $AITUN_PID 2>/dev/null
API Reference
Check subdomain availability
GET https://aitun.cc/aitun-api/subdomain/check/{name}
Response: { "available": true, "name": "...", "url": "https://name.aitun.cc" }
Create free tunnel
POST https://aitun.cc/aitun-api/tunnel/free
Response: { "tunnel_key": "abc123", "url": "https://aitun.cc/s/abc123", "subdomain_url": "https://abc123.t.aitun.cc" }
Google OAuth login
POST https://aitun.cc/aitun-api/auth/google
Body: { "access_token": "\x3Cgoogle-access-token>" }
Response: { "user": { ..., "token": "\x3Cjwt-token>" } }
Register subdomain (requires auth)
POST https://aitun.cc/aitun-api/subdomain/register
Headers: Authorization: Bearer \x3Ctoken>
Body: { "name": "myapp" }
Notes
- Free tunnels expire after 24 hours
- Registered subdomains remain active for 30 days of inactivity; use heartbeat to renew
- Maximum 5 subdomains per registered user
- All traffic is encrypted end-to-end
- The client can optionally serve as a relay node (
--relayflag) to improve network performance - Reserved subdomains (www, api, admin, test, etc.) cannot be registered \r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install aitun-tunnel - 安装完成后,直接呼叫该 Skill 的名称或使用
/aitun-tunnel触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
AiTun Tunnel 是什么?
Expose local web pages and HTTP services to the public internet via secure tunnels. Perfect for AI agents that build websites locally and need to share them... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 24 次。
如何安装 AiTun Tunnel?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install aitun-tunnel」即可一键安装,无需额外配置。
AiTun Tunnel 是免费的吗?
是的,AiTun Tunnel 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
AiTun Tunnel 支持哪些平台?
AiTun Tunnel 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 AiTun Tunnel?
由 SamAI.cc(@ctz168)开发并维护,当前版本 v1.0.0。