shouji
逆流成河
阅读:31
2023-09-11 14:13:48
评论:0
https://pkg.cloudflare.com/index.html
Centos 7
# This requires yum config-manager
1.sudo yum install yum-utils
# Add cloudflared.repo to config-manager
2.sudo yum-config-manager --add-repo https://pkg.cloudflare.com/cloudflared-ascii.repo
# install cloudflared
3.yum install cloudflared
4.cloudflared tunnel login
5.cloudflared tunnel create hexinyan
Created tunnel hexinyan with id ed711a1b-8048-4ba2-9a31-3d334d1940f3
6.cloudflared tunnel route dns hexinyan www.hexinyan.cn
2023-09-10T14:01:58Z INF Added CNAME www.hexinyan.cn which will route to this tunnel tunnelID=ed711a1b-8048-4ba2-9a31-3d334d1940f3
7.nano ~/.cloudflared/config.yml
8.
tunnel:ed711a1b-8048-4ba2-9a31-3d334d1940f3
credentials-file: /root/.cloudflared/ed711a1b-8048-4ba2-9a31-3d334d1940f3.json
protocol:http2
originRequest:
connectTimeout:30s
noTLSVerify:false
ingress:
-hostname:hexinyan.cn
service: http://localhost:8008
-service: http sratus:404
tunnel: ed711a1b-8048-4ba2-9a31-3d334d1940f3
credentials-file: /root/. cloudflared/ed711a1b-8048-4ba2-9a31-3d334d1940f3. json
protocol: http2
originRequest: connect
Timeout: 30s
noTLSVerify: false
ingress:
- hostname: hexinyan.cn
service: http://localhost:8008
- service: http_status:404
9.nano /etc/systemd/system/clouldflared.service
10.
[Unit]
Description=cloudflared
After=network.target
[Service]
TimeoutStartSec=0
Type=notify
ExecStart=/usr/bin/cloudflared --loglevel debug --transport-loglenvel warn --config
/root/.cloudflared/config.yml runnel run hexinyan
Restart=on-failure
RestartSec=5s
[install]
WanteBy=multi-user.target
systemctl enable cloudflared --now
[Unit]
Description=cloudflared
After=network. target
[Service] TimeoutStartSec=0
Type=notify
ExecStart=/usr/bin/cloudflared --loglevel
debug --transport-loglevel warn --config /root/. cloudflared/config. yml tunnel run hexinyan
Restart=on-failure
RestartSec=5s
[ Install] WantedBy=multi-user. target
systemctl enable cloudflared --now
声明
本站网络名称: 配主机
本站永久网址: www.peizhuji.com
网站侵权说明: 本站采用 CC BY-NC-SA 4.0 国际许可协议 进行许可,转载或引用本站文章应遵循相同协议。
1. 本站为转载分享站点,不提供任何上传下载服务。
所有内容均来自互联网第三方分享站点所提供的公开引用内容。
不需要任何付费即可公开阅读,部分GG仅为作为服务器维护费用。
2. 本站提供的一切软件、教程和内容信息仅限用于学习和研究目的;
不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。
3. 本站信息来自网络收集整理,版权争议与本站无关。
您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。
4. 如果您喜欢该程序和内容,请支持正版,购买注册,得到更好的正版服务。
我们非常重视版权问题,如有侵权请邮件与我们联系处理。
敬请谅解!我们会在24h内删除有争议的资源。唯一站长邮箱:1103606138@qq.com