Closed PluieM closed 1 month ago
The recent changes introduce a new IPBlackRuleList
module in the PeerBanHelperServer
, enabling dynamic peer banning based on IP blacklist subscriptions. These updates enhance the server's functionality by incorporating advanced IP management features.
File Path | Change Summary |
---|---|
setup-webui.sh |
Updated directory change command to use single quotes for paths with spaces. |
.../com/ghostchu/peerbanhelper/PeerBanHelperServer.java |
Added IPBlackRuleList module registration. |
.../module/impl/rule/IPBlackRuleList.java |
Introduced IP blacklist management module with various supporting methods. |
.../text/Lang.java |
Added a constant string for IP rule matches. |
src/main/resources/profile.yml |
Included IP address blocking rules in the configuration file. |
pom.xml |
Added dependencies for hutool-bloomFilter and hutool-crypto with hutool.version . |
🐇💻 In the realm of code, where algorithms play, A new rule emerges to guide the way. IP addresses locked in a digital dance, PeerBanHelper evolves, taking a chance. Let's toast to this tech tale, a symphony in code, Where the CodeRabbit hops, in the binary abode.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
好不容易把IP从PBH里面整理出来,你怎么又给塞回去了🌚
目前规则性能还有点感人,缓存设计也不到位,大量规则会导致PBH性能明显下降,这个PR晚一些等性能重构好了再开会比较好。
同时也缺少规则缓存和规则定时更新。
有现成的规则订阅不用我难受啊🤣 做了一些调整,用bloom过滤器改善了一下匹配ip时的性能,订阅规则的本地缓存和定时更新加上了
LGTM
突然意识到Bloom匹配的时候是不是不兼容CIDR
突然意识到Bloom匹配的时候是不是不兼容CIDR
是的,只能精确匹配具体的ip,CIDR只能先转成对应的ip列表才能走bloom过滤,这个逻辑稍后补上
突然意识到Bloom匹配的时候是不是不兼容CIDR
是的,只能精确匹配具体的ip,CIDR只能先转成对应的ip列表才能走bloom过滤,这个逻辑稍后补上
CIDR单独拉出来匹配吧,碰到大范围的IPV6 CIDR,转成IP列表是内存噩梦
突然意识到Bloom匹配的时候是不是不兼容CIDR
是的,只能精确匹配具体的ip,CIDR只能先转成对应的ip列表才能走bloom过滤,这个逻辑稍后补上
CIDR单独拉出来匹配吧,碰到大范围的IPV6 CIDR,转成IP列表是内存噩梦
确实,不过每次bloom过滤查不到都得走CIDR再查一遍,如果CIDR匹配项太多效率肯定有影响,初步考虑ipv4的CIDR地址如果前缀大于20则转为精确ip处理。ipv6的话运营商通常给下发的是/64的,还是老老实实走CIDR匹配,没啥好的思路
可以用于订阅 BTN-Collected-Rules 提供的ip黑名单
Summary by CodeRabbit
New Features
Bug Fixes
Documentation