1. 写在前面
需要注册 Cloudflare 账号
这个服务目前是可以免费使用
速度的话一般,勉强可以接受。
后续再折腾看看是什么问题。
2. 主要操作步骤
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # 安装客户端 opkg install cloudflared # 登录, 返回一个 cloudflare 官方连接,点击会生成密钥 cloudflared tunnel login # 创建一条隧道,<NAME> 替换成你喜欢的名字 cloudflared tunnel create <NAME> # 创建一个域名解析 cloudflared tunnel route dns hisen home.hisenyuan.xyz # 配置 xxx.yml url: http://192.168.0.10 # 内网的网关,注意做好鉴权 tunnel: d42a48c9-26da-4734-b249-1b9eee69ba8c credentials-file: /root/.cloudflared/d42a48c9-26da-4734-b249-1b9eee69ba8c.json # 启动一个内网穿透服务 cloudflared tunnel --config xxx.yml run
|
3. 参考文档