cloudflare warp安装https://pkg.cloudflareclient.com/centos支持8，ubuntu支持16到22，Debian支持9到12warp-cli register 注册qiu@qiu:~$ warp-cli register NOTICE: Cloudflare only collects limited DNS query and traffic data (excluding payload) that is sent to our network when you have the app enabled on your device. We will not sell, rent, share, or otherwise disclose your personal information to anyone, except as otherwise described in this Policy, without first providing you with notice and the opportunity to consent. All information is handled in accordance with our Privacy Policy. More information is available at: - https://www.cloudflare.com/application/terms/ - https://www.cloudflare.com/application/privacypolicy/ Accept Terms of Service and Privacy Policy? [y/N] y Success warp-cli set-license使用 WARP+ 需要去 Warp+ Bot 获得 License Key，然后 set-license使用 Keyqiu@qiu:~$ warp-cli set-license 48jCka79-6dW7l2r0-2C91 Success qiu@qiu:~$ warp-cli connect Success qiu@qiu:~$ warp-cli account Account type: Limited Device ID: 23b1cb74-7347-46d4-a5ad-29d63e9 Public key: 282a679017d23fxxxd136ec64350c048e4588f04a200582a2878a230d6f9 Account ID: f091e9c794f541xx93933eb24b411 License: 48jCka79-6dW7l2r0-2C911 Role: Child Quota: 24598562000000000 Premium Data: 24598562000000000 通过 cloudflare trace 看到 warp=plusqiu@qiu:~$ curl https://www.cloudflare.com/cdn-cgi/trace/ fl=4f844 h=www.cloudflare.com ip=104.28.211.41 ts=1698137786.993 visit_scheme=https uag=curl/7.68.0 colo=SJC sliver=none http=http/2 loc=CN tls=TLSv1.3 sni=plaintext warp=plus gateway=off rbi=off kex=X25519 参考连接：https://developers.cloudflare.com/warp-client/get-started/linux/https://zhui.dev/2023-08/using-cloudflare-warp-plus-on-arch-linuxhttps://v.xss.sx/pass-wall/warp
如何获取Zone ID 及 API Key参考：https://zhuanlan.zhihu.com/p/69379645#api key:FGhh70xa4LFy4gZzHibAOL1Yoy1-SFQ1glZrmxxx #zone id：7325cc65280f73b3573bd3ec03bb3xxx检测key是否正常 curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \ -H "Authorization: Bearer FGhh70xa4LFy4gZzHibAOL1Yoy1-SFQ1glZrmxxx" \ -H "Content-Type:application/json"获取dns记录详细列表（此处可以获取到对应域名的identifier值）curl --request GET \ --url https://api.cloudflare.com/client/v4/zones/7325cc65280f73b3573bd3ec03bb3xxx/dns_records \ -H "Authorization: Bearer FGhh70xa4LFy4gZzHibAOL1Yoy1-SFQ1glZrmxxx" \ -H "Content-Type:application/json" #返回结果： { "result": [ { "id": "bcf1f4d63adbd02919a07ae10c1cbxxx", "zone_id": "7325cc65280f73b3573bd3ec03bb3xxx", "zone_name": "cqgyd.com", "name": "chat.cqgyd.com", "type": "A", "content": "167.160.189.46", "proxiable": true, "proxied": false, "ttl": 1, "locked": false, "meta": { "auto_added": false, "managed_by_apps": false, "managed_by_argo_tunnel": false, "source": "primary" }, "comment": null, "tags": [], "created_on": "2023-06-01T13:18:20.56627Z", "modified_on": "2023-07-06T02:06:23.918585Z" }, { "id": "4d27a8e2ed76bcf42481cb1b52292492", "zone_id": "7325cc65280f73b3573bd3ec03bb3xxx", "zone_name": "cqgyd.com", "name": "cqgyd.com", "type": "A", "content": "147.103.120.250", "proxiable": true, "proxied": false, ... ...或者获取指定域名的信息（nas.cqgyd.com)curl --location 'https://api.cloudflare.com/client/v4/zones/7325cc65280f73b3573bd3ec03bb3xxx/dns_records?name=nas.cqgyd.com' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer FGhh70xa4LFy4gZzHibAOL1Yoy1-SFQ1glZrmxxx' #返回 { "result": [ { "id": "4123f6a77aa11833d7ae4f3110cf0xxx", "zone_id": "7325cc65280f73b3573bd3ec03bb3xxx", "zone_name": "cqgyd.com", "name": "nas.cqgyd.com", "type": "A", "content": "27.10.192.184", "proxiable": true, "proxied": false, "ttl": 1, "locked": false, "meta": { "auto_added": false, "managed_by_apps": false, "managed_by_argo_tunnel": false, "source": "primary" }, "comment": null, "tags": [], "created_on": "2023-09-04T09:05:17.593395Z", "modified_on": "2023-09-04T09:05:17.593395Z" } ], "success": true, "errors": [], "messages": [], "result_info": { "page": 1, "per_page": 100, "count": 1, "total_count": 1, "total_pages": 1 } }更新域名chat.cqgyd.com的ip通过如上方法能获取到对应域名的identifier值。identifier ：bcf1f4d63adbd02919a07ae10c1cbxxx修改解析的ip到对应域名上curl --request PUT \ --url https://api.cloudflare.com/client/v4/zones/7325cc65280f73b3573bd3ec03bb3xxx/dns_records/bcf1f4d63adbd02919a07ae10c1cbxxx \ -H "Authorization: Bearer FGhh70xa4LFy4gZzHibAOL1Yoy1-SFQ1glZrmxxx" \ -H "Content-Type:application/json" \ --data '{ "content": "198.51.100.4", "name": "chat.cqgyd.com", "proxied": false, "type": "A", "comment": "Domain verification record", "ttl": 3600 }'官方api参考文档：https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-list-dns-records可以采用DDNS-GO的方式来自动更新域名ip。参考：https://github.com/jeessy2/ddns-go