「Cloudflare」修訂間的差異
跳至導覽
跳至搜尋
(→抵擋爬蟲) |
|||
| 行 8: | 行 8: | ||
#*# 規則名稱:protect-wiki | #*# 規則名稱:protect-wiki | ||
#*#:((http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1")) and not cf.client.bot 時採取 「受控的查問」 | #*#:((http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1")) and not cf.client.bot 時採取 「受控的查問」 | ||
| + | #*#:這條經常使用 | ||
#*# 規則名稱:block-bad-bots | #*# 規則名稱:block-bad-bots | ||
#*#:(http.user_agent contains "curl" or http.user_agent contains "wget" or http.user_agent contains "python" or http.user_agent contains "scrapy") 時採取 「封鎖」 | #*#:(http.user_agent contains "curl" or http.user_agent contains "wget" or http.user_agent contains "python" or http.user_agent contains "scrapy") 時採取 「封鎖」 | ||
| − | + | #*#:這條沒被使用過 | |
| − | + | #*限速規則 | |
| − | + | #*# 規則名稱:limit-wiki | |
| + | #*#:(http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1") 時且使用相同的 IP / 每 10 秒請求 10 次 => 採取動作「封鎖 10 秒」 | ||
| + | #*#:這條偶而使用 | ||
===[[wbn::DNS|DNS]]=== | ===[[wbn::DNS|DNS]]=== | ||
===[[wbn::HTTPS|HTTPS]]=== | ===[[wbn::HTTPS|HTTPS]]=== | ||
於 2026年4月21日 (二) 00:35 的修訂
使用免費服務就夠了
抵擋爬蟲
登入 cloudflare.com
- 到「帳戶首頁」的「網域」,點入域名
- 查 DNS 記錄,確定「類型:A」的域名對應 IP 的記錄是「通過 Proxy 處理」(橙色),而不是「僅 DNS」
- 選擇「網路安全 / 安全性規則」
- 自訂規則
- 規則名稱:protect-wiki
- ((http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1")) and not cf.client.bot 時採取 「受控的查問」
- 這條經常使用
- 規則名稱:block-bad-bots
- (http.user_agent contains "curl" or http.user_agent contains "wget" or http.user_agent contains "python" or http.user_agent contains "scrapy") 時採取 「封鎖」
- 這條沒被使用過
- 規則名稱:protect-wiki
- 限速規則
- 規則名稱:limit-wiki
- (http.request.uri.path contains "/alWiki") or (http.request.uri.path contains "/wellBeingNg") or (http.request.uri.path contains "/wiki1231") or (http.request.uri.path contains "/wikiGrade1") 時且使用相同的 IP / 每 10 秒請求 10 次 => 採取動作「封鎖 10 秒」
- 這條偶而使用
- 規則名稱:limit-wiki
- 自訂規則