cloudflare argo tunnel and warp

周末把树莓派3b刷成了ubuntu server 18,顺便使用cf提供的平台搭建一个简易网站。

首先是两篇教程:

cloudflare warp client 暂时不支持arm,所以只能使用WireGuard,但是配置后发现 warp 一直链接不上,刚开始以为是cloudflare封禁了WG链接方式,后面 ping engage.cloudflareclient.com 才发现是整个ip段被墙了。上去cf官网,发现了官方是提供了一个可用的ip段的,所以Endpoint填一下这段ip中的某一个就行,就成功链接上了。最后贴一下最终的配置文件

1
2
3
4
5
6
7
8
9
10
11
12
[Interface]
PrivateKey = xxxxxxx
Address = 172.16.0.2/32
Address = fd01:5ca1:ab1e:8a3d:471d:ffd2:471:9eef/128
DNS = 119.29.29.29,1.0.0.1
MTU = 1280
[Peer]
PublicKey = xxxxxxxxxxxxxx
#AllowedIPs = 0.0.0.0/0
AllowedIPs = ::/0
#Endpoint = engage.cloudflareclient.com:2408
Endpoint = 162.159.193.1:2408

这个是 argo tunnel 的配置文件,我转发到nginx上了

1
2
3
4
5
6
7
tunnel: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
credentials-file: /root/.cloudflared/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.json

ingress:
- hostname: xxxx.cctv.cn
service: http://127.0.0.1:80
- service: http_status:404