docker run -d \
--name openbot-tunnel \
--restart unless-stopped \
-p 1314:1314 \
-p 20241:20241 \
-v /your/path/shared:/app/shared \
kejizhihui/openbot-tunnel:latest
services:
cloudflared:
image: kejizhihui/openbot-tunnel:latest
container_name: openbot-tunnel
restart: unless-stopped
ports:
- "1314:1314"
- "20241:20241"
volumes:
- ./shared:/app/shared
然后启动:
docker-compose up -d
| 路径 | 方法 | 说明 |
|---|---|---|
/ | GET | 返回当前最新公网地址(纯文本) |
/restart | GET | 重启 cloudflared 进程,自动生成新域名(容器不断) |
由 cloudflared 原生提供,返回 Prometheus 格式监控指标:
cloudflared_tunnel_ha_connections:活跃连接数cloudflared_tunnel_concurrent_requests_per_tunnel:并发请求数cloudflared_proxy_requests_total:累计请求数OpenBot 主容器(kejizhihui/openbot-bot)通过容器名 openbot-tunnel:1314 访问地址服务:
# 查看最新公网地址
curl [http://127.0.0.1:1314](http://127.0.0.1:1314)
# 手动重启隧道换新域名
curl [http://127.0.0.1:1314/restart](http://127.0.0.1:1314/restart)
# 查看隧道监控指标
curl [http://127.0.0.1:20241/metrics](http://127.0.0.1:20241/metrics)
# 查看实时日志
docker logs -f openbot-tunnel
/clweb cz 即可自动重启换新域名curl [http://127.0.0.1:1314/restart](http://127.0.0.1:1314/restart),等1分钟拿新地址docker ps| 目录 | 说明 |
|---|---|
shared/ | tunnel.log(cloudflared日志)、tunnel_python.log(python服务日志),建议与主服务共用同一挂载 |
Content type
Image
Digest
sha256:b6f073710…
Size
39.7 MB
Last updated
10 days ago
docker pull kejizhihui/openbot-tunnel