shouji
逆流成河
阅读:234
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
[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
声明
温馨提示:
欢迎您来到小站
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;
2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;
3.作者投稿可能会经我们编辑修改或补充;
4.网页广告仅为维持服务器 请谅解;
5.QQ:1103606138 无其它联系方式。