Skip to content

Commit d8e39ae

Browse files
authored
Merge pull request #723 from PBH-BTN/master
7.1.4
2 parents ddb76f0 + 97115cc commit d8e39ae

File tree

10 files changed

+166
-55
lines changed

10 files changed

+166
-55
lines changed

README.EN.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# PeerBanHelper
2+
[简体中文](./README.md)
3+
4+
Automatically block unwanted, leeches and abnormal BT peers with support for customized and cloud rules.
5+
6+
![page-views](https://raw.githubusercontent.com/PBH-BTN/views-counter/refs/heads/master/svg/754169590/badge.svg)
7+
## Introduction
8+
9+
Following function are provided by PeerBanHelper:
10+
11+
- [PeerID Blacklist](https://docs.pbh-btn.com/docs/module/peer-id)
12+
- [Client Name Blacklist](https://docs.pbh-btn.com/docs/module/client-name)
13+
- [IP/GeoIP/IP type Blacklist](https://docs.pbh-btn.com/docs/module/ip-address-blocker)
14+
- [Fake progress checker (heuristic client detection)](https://docs.pbh-btn.com/docs/module/progress-cheat-blocker)
15+
- [Auto range ban](https://docs.pbh-btn.com/docs/module/auto-range-ban)
16+
- [Multi-dail ban](https://docs.pbh-btn.com/docs/module/multi-dial)
17+
- Peer ID/Client Name camouflage check, powered by [AviatorScript Engine](https://docs.pbh-btn.com/docs/module/expression-engine)
18+
- [Active monitoring(data analysis)](https://docs.pbh-btn.com/docs/module/active-monitoring)
19+
- [IP set subscribe](https://docs.pbh-btn.com/docs/module/ip-address-blocker-rules)
20+
- a mordern WebUI
21+
22+
In addition, PeerBanHelper downloads the GeoIP library at startup, and supports the following functions once it successful loaded:
23+
- View IP address attribution, AS information (ASN, ISP, AS name, etc.), network type information (broadband, base station, IoT, data center, etc.) in the blocking list.
24+
- Based on GeoIP information, block IP addresses by country/region, city, network type, ASN and so on.
25+
- View GeoIP statistics
26+
27+
> [!TIP]
28+
> For best results, it is recommended to work with the IP rule [PBH-BTN/BTN-Collected-Rules](https://github.com/PBH-BTN/BTN-Collected-Rules) and [BTN Network](https://docs.pbh-btn.com/docs/btn/intro) , but this is completely optional.
29+
30+
31+
## Supported clients
32+
33+
- qBittorrent **4.5.0 or higher**
34+
- BiglyBT([plugin](https://github.com/PBH-BTN/PBH-Adapter-BiglyBT) is required)
35+
- Deluge([plugin](https://github.com/PBH-BTN/PBH-Adapter-Deluge) is required)
36+
- Azureus(Vuze)([plugin](https://github.com/PBH-BTN/PBH-Adapter-Azureus) is required)
37+
- Transmission **(deprected;3.00-20 or higher)**
38+
- BitComet **v2.10 Beta6 [20240928] or higher**
39+
40+
41+
# Screenshots
42+
43+
| Dashboard | Banlist | Banlogs | Rule subscribe |
44+
| :------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------- |
45+
| <img width="1280" alt="homepage" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/d7f7ea9f-70df-40f1-a782-260450972bc9"> | <img width="1280" alt="banlist" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/c3e139e6-eb82-423f-b083-1839713ec801"> | <img width="1280" alt="banlogs" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/00d8efcc-0dd7-4e05-bdeb-9444e14739d6"> | <img width="1280" alt="banMetrics" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/dc312186-9643-4f23-9d53-7b8e0852f228"> |
46+
47+
## Install
48+
49+
Please read the [docs](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)
50+
51+
52+
## FAQ
53+
54+
Before submit issue, please read the [FAQ](https://docs.pbh-btn.com/docs/faq)
55+
56+
## Support
57+
Consider join our [Telegram](https://t.me/+_t3Nt5GZ6bJmYjBl) group.
58+
59+
## Declaration
60+
61+
Illegal websites and black and grey industries should not initiate any kind of manual service request to our organization's development or support staff; it is strictly prohibited to use any services or products of PBH-BTN team to engage in any illegal activities such as violating the law, endangering national security, committing or helping others to commit telecommunication crimes, and other illegal activities.
62+
Users are not allowed to carry out any activities that harm the interests of other individuals or organizations through any services or products of PBH-BTN Team. The use of any PBH-BTN Team services or products in violation of the rights and interests of any individual or organization is not permitted.
63+
64+
## Star History
65+
66+
[![Star History Chart](https://api.star-history.com/svg?repos=PBH-BTN/PeerBanHelper&type=Date)](https://star-history.com/#PBH-BTN/PeerBanHelper&Date)
67+
68+
## Credit
69+
70+
### Backend
71+
72+
- [Cordelia](https://github.com/bochkov/cordelia)
73+
- [IPAddress](https://github.com/seancfoley/IPAddress)
74+
- [YamlConfiguration](https://github.com/bspfsystems/YamlConfiguration)
75+
- [libby](https://github.com/AlessioDP/libby)
76+
- [AviatorScript](https://github.com/killme2008/aviatorscript)
77+
- [javalin](https://javalin.io/)
78+
- [deluge-java](https://github.com/RangerRick/deluge-java)
79+
- [jSystemThemeDetector](https://github.com/Dansoftowner/jSystemThemeDetector)
80+
- [Methanol](https://github.com/mizosoft/methanol)
81+
- [Flatlaf](https://github.com/JFormDesigner/FlatLaf)
82+
- [GeoIP2](https://dev.maxmind.com/geoip)
83+
- [ormlite](https://ormlite.com/)
84+
- [SimpleReloadLib](https://github.com/Ghost-chu/SimpleReloadLib)
85+
86+
### WebUI
87+
88+
- [Vue](https://vuejs.org/)
89+
- [ArcoDesign](https://arco.design/)
90+
- [ECharts](https://echarts.apache.org/en/index.html)
91+
92+
### Install4j
93+
94+
PeerBanHelper use [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) to build its multi-platform installer. Thanks the open-source license provided by ej-technolgies. Click the link or the image below to download install4j.
95+
96+
[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)

README.md

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
# PeerBanHelper
2+
[English](./README.EN.md)
23

34
自动封禁不受欢迎、吸血和异常的 BT 客户端,并支持自定义规则。
45

56
![page-views](https://raw.githubusercontent.com/PBH-BTN/views-counter/refs/heads/master/svg/754169590/badge.svg)
7+
## 功能介绍
68

7-
> [!NOTE]
8-
> PeerBanHelper 没有内建的更新检查程序,记得时常回来看看是否有新的版本更新,或者 Watch 本仓库(Custom -> Releases, Issues 和 Discussions)以接收版本更新通知
9-
> QQ 交流群:932978658,如果在使用过程中需要帮助,您可以在这里和他人一同交流。或者在 [Issue Tracker](https://github.com/Ghost-chu/PeerBanHelper/issues) 打开新问题
9+
PeerBanHelper 主要由以下几个功能模块组成:
1010

11-
> [!TIP]
12-
> 您只需要正确连接 PBH 到下载器就可以正常工作,大多数情况下,并不需要额外配置
11+
- [PeerID 黑名单](https://docs.pbh-btn.com/docs/module/peer-id)
12+
- [Client Name 黑名单](https://docs.pbh-btn.com/docs/module/client-name)
13+
- [IP/GeoIP/IP 类型 黑名单](https://docs.pbh-btn.com/docs/module/ip-address-blocker)
14+
- [虚假进度检查器(提供启发式客户端检测功能)](https://docs.pbh-btn.com/docs/module/progress-cheat-blocker)
15+
- [自动连锁封禁](https://docs.pbh-btn.com/docs/module/auto-range-ban)
16+
- [多拨追猎](https://docs.pbh-btn.com/docs/module/multi-dial)
17+
- Peer ID/Client Name 伪装检查;通过 [AviatorScript 引擎](https://docs.pbh-btn.com/docs/module/expression-engine) 实现
18+
- [主动监测(提供本地数据分析功能)](https://docs.pbh-btn.com/docs/module/active-monitoring)
19+
- [网络 IP 集规则订阅](https://docs.pbh-btn.com/docs/module/ip-address-blocker-rules)
20+
- WebUI (目前支持:活跃封禁名单查看,历史封禁查询,封禁最频繁的 Top 50 IP,规则订阅管理,图表查看,Peer 列表查看)
1321

14-
> [!TIP]
15-
> 为获得最佳效果,建议配合我们维护的 IP 规则库 [PBH-BTN/BTN-Collected-Rules](https://github.com/PBH-BTN/BTN-Collected-Rules)[BTN 网络](https://docs.pbh-btn.com/docs/btn/intro) 一起食用,不过这是完全可选的。
22+
此外,PeerBanHelper 会在启动时下载 GeoIP 库,成功加载后支持以下功能:
1623

17-
| 主界面 | 封禁列表 | 封禁日志 | 封禁统计 | 规则统计 | 规则订阅 |
18-
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
19-
| <img width="1280" alt="homepage" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/d7f7ea9f-70df-40f1-a782-260450972bc9"> | <img width="1280" alt="banlist" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/c3e139e6-eb82-423f-b083-1839713ec801"> | <img width="1280" alt="banlogs" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/00d8efcc-0dd7-4e05-bdeb-9444e14739d6"> | <img width="1280" alt="maxban" src="https://github.com/PBH-BTN/PeerBanHelper/assets/30802565/ae78ebb9-67f7-481a-9afc-7ced2c6a2534"> | <img width="1280" alt="banMetrics" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/9e4cd7b7-aaff-4b66-8d1d-ad4ef3466b1f"> | <img width="1280" alt="banMetrics" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/dc312186-9643-4f23-9d53-7b8e0852f228"> |
24+
- 在封禁列表中查看 IP 归属地,AS 信息(ASN、ISP、AS 名称等),网络类型信息(宽带、基站、物联网、数据中心等)
25+
- 基于 GeoIP 信息按国家/地区、城市、网络类型、ASN 等封禁 IP 地址
26+
- 查看 GeoIP 统计数据
2027

21-
## 安装 PeerBanHelper
28+
> [!TIP]
29+
> 为获得最佳效果,建议配合我们维护的 IP 规则库 [PBH-BTN/BTN-Collected-Rules](https://github.com/PBH-BTN/BTN-Collected-Rules)[BTN 网络](https://docs.pbh-btn.com/docs/btn/intro) 一起食用,不过这是完全可选的。
2230
23-
查看 [PeerBanHelper 文档](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)
2431

2532
## 支持的客户端
2633

@@ -31,43 +38,26 @@
3138
- Transmission **(不建议使用;3.00-20 或更高版本)**
3239
- BitComet **v2.10 Beta6 [20240928] 或更高版本**
3340

34-
## 注意事项
3541

36-
请不要打开下载器中的 "允许来自同一 IP 地址的多个连接" 选项,这会干扰 PBH 计算数据,并导致错误封禁。
37-
如果您的下载器存在 PT 站种子,在添加下载器时建议开启 “忽略私有种子”。
42+
# 截图
3843

39-
## 功能介绍
40-
41-
PeerBanHelper 主要由以下几个功能模块组成:
44+
| 主界面 | 封禁列表 | 封禁日志 | 封禁统计 | 规则统计 | 规则订阅 |
45+
| ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
46+
| <img width="1280" alt="homepage" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/d7f7ea9f-70df-40f1-a782-260450972bc9"> | <img width="1280" alt="banlist" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/c3e139e6-eb82-423f-b083-1839713ec801"> | <img width="1280" alt="banlogs" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/00d8efcc-0dd7-4e05-bdeb-9444e14739d6"> | <img width="1280" alt="maxban" src="https://github.com/PBH-BTN/PeerBanHelper/assets/30802565/ae78ebb9-67f7-481a-9afc-7ced2c6a2534"> | <img width="1280" alt="banMetrics" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/9e4cd7b7-aaff-4b66-8d1d-ad4ef3466b1f"> | <img width="1280" alt="banMetrics" src="https://github.com/PBH-BTN/PeerBanHelper/assets/19235246/dc312186-9643-4f23-9d53-7b8e0852f228"> |
4247

43-
- [PeerID 黑名单](https://docs.pbh-btn.com/docs/module/peer-id)
44-
- [Client Name 黑名单](https://docs.pbh-btn.com/docs/module/client-name)
45-
- [IP/GeoIP/IP 类型 黑名单](https://docs.pbh-btn.com/docs/module/ip-address-blocker)
46-
- [虚假进度检查器(提供启发式客户端检测功能)](https://docs.pbh-btn.com/docs/module/progress-cheat-blocker)
47-
- [自动连锁封禁](https://docs.pbh-btn.com/docs/module/auto-range-ban)
48-
- [多拨追猎](https://docs.pbh-btn.com/docs/module/multi-dial)
49-
- Peer ID/Client Name 伪装检查;通过 [AviatorScript 引擎](https://docs.pbh-btn.com/docs/module/expression-engine) 实现
50-
- [主动监测(提供本地数据分析功能)](https://docs.pbh-btn.com/docs/module/active-monitoring)
51-
- [网络 IP 集规则订阅](https://docs.pbh-btn.com/docs/module/ip-address-blocker-rules)
52-
- WebUI (目前支持:活跃封禁名单查看,历史封禁查询,封禁最频繁的 Top 50 IP,规则订阅管理,图表查看,Peer 列表查看)
48+
## 安装 PeerBanHelper
5349

54-
此外,PeerBanHelper 会在启动时下载 GeoIP 库,成功加载后支持以下功能:
50+
查看 [PeerBanHelper 文档](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)
5551

56-
- 在封禁列表中查看 IP 归属地,AS 信息(ASN、ISP、AS 名称等),网络类型信息(宽带、基站、物联网、数据中心等)
57-
- 基于 GeoIP 信息按国家/地区、城市、网络类型、ASN 等封禁 IP 地址
58-
- 查看 GeoIP 统计数据
5952

6053
## 常见问题
6154

6255
在报告问题前,请先检查 [常见问题列表](https://docs.pbh-btn.com/docs/faq)
6356

64-
## Install4j
65-
66-
PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。
67-
68-
[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)
57+
## 需要帮助?
58+
考虑加入我们的[QQ群](https://qm.qq.com/cgi-bin/qm/qr?k=w5as_wH2G1ReUrClreCYhR69XiNCuP65&jump_from=webapi&authKey=EyjMX7Pwc77XLM51V6FEcR7oXnG8fsUbSFqYZ4PPiEpq32vBglJn/jFvpc3LFDhn)
6959

70-
## 法律文本
60+
## 声明
7161

7262
违法网站和黑灰产请勿向我组织开发或支持人员发起任何形式的人工服务请求;严禁使用 PBH-BTN 团队的任何服务、产品从事任何违法违规、危害国家安全、实施或帮助他人实施电信犯罪等非法活动。
7363
用户不得通过 PBH-BTN 团队的任何服务、产品进行任何损害其它个人或组织的利益的活动。在任何违反个人或组织权益的情况下使用 PBH-BTN 团队的任何服务、产品均不被允许。
@@ -99,3 +89,9 @@ PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej
9989
- [Vue](https://vuejs.org/)
10090
- [ArcoDesign](https://arco.design/)
10191
- [ECharts](https://echarts.apache.org/en/index.html)
92+
93+
### Install4j
94+
95+
PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。
96+
97+
[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ghostchu.peerbanhelper</groupId>
88
<artifactId>peerbanhelper</artifactId>
9-
<version>7.1.3</version>
9+
<version>7.1.4</version>
1010
<packaging>jar</packaging>
1111

1212
<name>PeerBanHelper</name>

src/main/java/com/ghostchu/peerbanhelper/btn/ability/BtnAbilityRules.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ public TranslationComponent getDisplayName() {
8080

8181
@Override
8282
public TranslationComponent getDescription() {
83+
if(btnRule == null){
84+
return new TranslationComponent(Lang.BTN_ABILITY_RULES_DESCRIPTION, "N/A", 0, 0, 0, 0, 0);
85+
}
8386
return new TranslationComponent(Lang.BTN_ABILITY_RULES_DESCRIPTION,
8487
btnRule.getVersion(),
8588
btnRule.size(),

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/enhanced/QBittorrentEE.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public List<Peer> getPeers(Torrent torrent) {
103103
if(qbPeer.getPeerAddress().getIp() == null || qbPeer.getPeerAddress().getIp().isBlank()){
104104
continue;
105105
}
106+
if ("HTTP".equalsIgnoreCase(qbPeer.getConnection()) || "HTTPS".equalsIgnoreCase(qbPeer.getConnection()) || "Web".equalsIgnoreCase(qbPeer.getConnection())) {
107+
continue;
108+
}
106109
if(qbPeer.getRawIp().contains(".onion") || qbPeer.getRawIp().contains(".i2p")){
107110
continue;
108111
}

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/enhanced/QBittorrentEEPeer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,9 @@ public String getRawIp() {
116116
return rawIp == null ? ip : rawIp;
117117
}
118118

119+
public String getConnection() {
120+
return connection;
121+
}
119122

120123
@Override
121124
public String toString() {

0 commit comments

Comments
 (0)