curl -X POST "https://api.cloudflare.com/client/v4/graphql" ^
-H "Authorization: Bearer YourToken" ^
-H "Content-Type: application/json" ^
--data "{ \"query\": \"query { viewer { zones(filter: { zoneTag: \\\"YourZoneID\\\" }) { httpRequestsAdaptiveGroups( limit: 1000, filter: { clientRequestHTTPHost: \\\"YourSubDomain\\\", datetime_geq: \\\"2025-03-13T00:00:00Z\\\", datetime_lt: \\\"2025-03-14T00:00:00Z\\\" }, orderBy: [count_DESC] ) { dimensions { clientCountryName } count sum { edgeResponseBytes } } } } }\" }"
2025/03/14
透過CloudFlare GraphQL 取得SubDomain國家來源數據
權限要給Zone/Logs & Analytics
2023/09/25
2023/05/12
Ubuntu 22.04 LTS Certbot 使用 CloudFlare 申請全域的 Let's Encrypt憑證
先輸入以下命令安裝套件
點擊Get started,啟用下列Pemission和選取要設定的Domain,點擊Continue to summary就會得到Token
# Install CertBot
sudo apt update -y
sudo apt install snapd -y
sudo snap install core; sudo snap refresh core
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
sudo apt install python-is-python3 python3-certbot-dns-cloudflare -y
進到CloudFlare所要取得SSL的Domain頁面,點擊Get your API token
編輯cf.ini
點擊Create Token點擊Get started,啟用下列Pemission和選取要設定的Domain,點擊Continue to summary就會得到Token
訂閱:
文章 (Atom)