鹅石壳儿 - cloudflare
type: channel
link: http://type.cqgyd.com/index.php/tag/cloudflare/
items: linux中使用Cloudflare WARP
items: 通过cloudflare api解析域名

linux中使用Cloudflare WARP
type: item
date: 2023-10-24T08:57:00+00:00
description: 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

通过cloudflare api解析域名
type: item
date: 2023-09-06T06:59:00+00:00
description: 如何获取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": […