[Docs] 📕 进阶教程 - 利用 Cloudflare Zero Trust Tunnel 实现 CodeSandbox 自定义域名 #338
Harry-zklcdc
started this conversation in
Show and tell
Replies: 3 comments 9 replies
-
2024.02.07 HuggingFace 封杀本项目 |
Beta Was this translation helpful? Give feedback.
0 replies
-
大佬,./cloudflared tunnel --no-autoupdate run --token $CF_ZERO_TRUST_TOKEN这个语句执行后提示cloudflare不存在 |
Beta Was this translation helpful? Give feedback.
8 replies
-
大佬如何让部署的 bing pass 人机验证服务也能添加在cf的zero trust? 根据首页的提示部署在了codesanbox上,主要是发现自动过人机验证好像会一段时间断开,不知道换成自己的部署有没有区别 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
在正式按照教程进行操作之前, 请先确保域名绑定至 Cloudflare
1. 注册 Cloudflare Zero Trust
具体注册方法请出门右拐隔壁百度 or Google
2. 创建 Tunnel
进入 Zero Trust 后台
选择「Network」-> 「Tunnel」-> 「Create a Tunnel」
选择「Cloudflared」
填入该隧道的注释名称
点击右边方框内的内容, 复制安装命令
这时候, 将后面的
eyJhIjoiM2ZjNjQ4xxxxxxxxxxxxxxx
复制出来保存3. 配置Space / DevBox
HuggingFaceWarning
HuggingFace 已经封杀本项目, 本部分无需再看
点击查看内容
将
eyJhIjoiM2ZjNjQ4xxxxxxxxxxxxxxx
填入 HuggingFace Space 的机密中然后重启 Space
CodeSandbox
Note
需要重新进行 CodeSandbox 部署, 以更新代码支持
进入 CodeSandbox 的 DevBox
依次点击 左上角 「CodeSandbox」图标 ->「Restart Devbox」-> 「Settings」-> 「Env Variables」
Name 输入
CF_ZERO_TRUST_TOKEN
Value 输入
eyJhIjoiM2ZjNjQ4xxxxxxxxxxxxxxx
保存重启 Devbox 即可
4. 配置域名
即可看到隧道上线
然后在下一个页面中填入如图所示内容
然后就可以用刚才填入的域名去访问了, 如图所示
Beta Was this translation helpful? Give feedback.
All reactions