Replies: 1 comment
-
|
项目从8月份鸽到了现在,来说下现在的状况。 实际上我很久以前就写出来了,只是因为Cloudflare Rulesets的一些限制不太友好,就一直没放出来。
目前比较忙,等我有时间了把代码完善下再放吧。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
利用空闲时间,写了个跑在github actions上利用Cloudflare API自动更新WAF Custom Rules(自定义规则)的python程序。
这个程序会获取目录内的几个yaml列表(我自己收集,有滥用测速文件行为的IP、IP段、和ASN),然后生成 Cloudflare rules expression (规则表达式),最后通过Cloudflare API更新 WAF 上的 Rules expression。程序非常简单,可玩性也很强,稍微更改下代码就可以同步更新所有Cloudflare Rules(包括但不限于访问速率、重定向、原站、缓存)。
只需要把滥用的ip & IP段 & ASN收集,然后commit到github上的yaml,actions就会自动生成并更新Cloudflare上的Rules。
本人已经部署测试了几天最基础的生成表达式并更新WAF Rules,效果还不错。
问下大家有没有类似需求,我考虑修改下把代码放出来。有什么其他建议啥的也欢迎在下面回复
Beta Was this translation helpful? Give feedback.
All reactions