搜索
缓存时间10 现在时间10 缓存数据 再长的路,一步步也能走完;再短的路,不迈开双脚也无法到达。还在咬牙坚持的你,请不要泄气。你的日积月累,早晚会成为别人的望尘莫及。
查看: 394|回复: 4

使用Cloudflare WAF规则屏蔽所有国内浏览器

[复制链接]
发表于 2024-8-8 18:08:43 | 显示全部楼层 |阅读模式

厌倦了滚动浏览相同的帖子?当您创建帐户后,您将始终回到您离开的地方。使用帐户,不仅可以享受无广告的清爽界面!

您需要 登录 才可以下载或查看,没有账号?注册

×

Cloudflare WAF免费计划也可以添加5条Custom rules, 给坛友们提供一下屏蔽国内浏览器的规则:

(http.user_agent contains "115Browser") or (http.user_agent contains "2345chrome") or (http.user_agent contains "2345Explorer") or (http.user_agent contains "360EE") or (http.user_agent contains "360SE") or (http.user_agent contains "AliApp") or (http.user_agent contains "Baidu") or (http.user_agent contains "BaiduHD") or (http.user_agent contains "baidubrowser") or (http.user_agent contains "baiduboxapp") or (http.user_agent contains "baidu") or (http.user_agent contains "BIDUBrowser") or (http.user_agent contains "com.douban.frodo") or (http.user_agent contains "DingTalk") or (http.user_agent contains "HarmonyOS") or (http.user_agent contains "HUAWEI") or (http.user_agent contains "HuaweiBrowser") or (http.user_agent contains "huawei") or (http.user_agent contains "IqiyiApp") or (http.user_agent contains "LBBROWSER") or (http.user_agent contains "LieBaoFast") or (http.user_agent contains "Mb2345Browser") or (http.user_agent contains "MetaSr") or (http.user_agent contains "MicroMessenger") or (http.user_agent contains "MiuiBrowser") or (http.user_agent contains "MZBrowser") or (http.user_agent contains "OppoBrowser") or (http.user_agent contains "QHBrowser") or (http.user_agent contains "QihooBrowser") or (http.user_agent contains "QQ") or (http.user_agent contains "QQBrowser") or (http.user_agent contains "Quark") or (http.user_agent contains "SNEBUY-APP") or (http.user_agent contains "Sogou") or (http.user_agent contains "SP-engine") or (http.user_agent contains "TheWorld") or (http.user_agent contains "UC") or (http.user_agent contains "UCBrowser") or (http.user_agent contains "UCWEB") or (http.user_agent contains "UBrowser") or (http.user_agent contains "VivoBrowser") or (http.user_agent contains "WeChat") or (http.user_agent contains "Weibo") or (http.user_agent contains "Weixin") or (http.user_agent contains "wxwork")

基本上涵盖了大多数常见的国内浏览器,并且已经按照首字母顺序升序排序如有遗漏欢迎各位补充。

如何使用:
Cloudflare Dashboard → 选择托管的域名 → 左侧Security → WAF → Custom rules → Create rule → Expression preview右侧的Edit expression → 粘贴上面给出的规则

ATTENTION: Cloudflare WAF的规则是case sensitive.

爱生活,爱奶昔~
发表于 2024-8-9 18:21:28 | 显示全部楼层
(http.user_agent contains "Baidu") or (http.user_agent contains "BaiduHD") or (http.user_agent contains "baidubrowser") or (http.user_agent contains "baiduboxapp") or (http.user_agent contains "baidu")

应该可以直接等价为
(http.user_agent contains "Baidu") or (http.user_agent contains "baidu") 吧

点评

太聪明了  发表于 2024-8-17 21:06
爱生活,爱奶昔~
回复 支持 1 反对 0

使用道具 举报

发表于 2024-8-10 11:31:21 | 显示全部楼层
为什么要屏蔽国内浏览器?
爱生活,爱奶昔~
回复 支持 反对

使用道具 举报

楼主| 发表于 2024-8-10 21:03:40 | 显示全部楼层
adc狂铁 发表于 2024-8-10 11:31
为什么要屏蔽国内浏览器?

你也不想自己的网站动不动标红吧
爱生活,爱奶昔~
回复 支持 反对

使用道具 举报

Powered by Nyarime. Licensed

GMT+8, 2024-11-24 10:22 , Processed in 0.026397 second(s), 11 queries , Gzip On, Redis On
发帖际遇 ·手机版 ·小黑屋 ·RSS ·奶昔网

登录切换风格
快速回复 返回顶部 返回列表