Skip to content

Commit 18c1ef3

Browse files
authored
Merge pull request #777 from PBH-BTN/master
v7.1.5
2 parents d8e39ae + bc95c7d commit 18c1ef3

File tree

25 files changed

+638
-548
lines changed

25 files changed

+638
-548
lines changed

README.EN.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Automatically block unwanted, leeches and abnormal BT peers with support for cus
88

99
Following function are provided by PeerBanHelper:
1010

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)
11+
- [PeerID Blacklist](https://docs.pbh-btn.com/en/docs/module/peer-id)
12+
- [Client Name Blacklist](https://docs.pbh-btn.com/en/docs/module/client-name)
13+
- [IP/GeoIP/IP type Blacklist](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker)
14+
- [Fake progress checker (heuristic client detection)](https://docs.pbh-btn.com/en/docs/module/progress-cheat-blocker)
15+
- [Auto range ban](https://docs.pbh-btn.com/en/docs/module/auto-range-ban)
16+
- [Multi-dail ban](https://docs.pbh-btn.com/en/docs/module/multi-dial)
17+
- Peer ID/Client Name camouflage check, powered by [AviatorScript Engine](https://docs.pbh-btn.com/en/docs/module/expression-engine)
18+
- [Active monitoring(data analysis)](https://docs.pbh-btn.com/en/docs/module/active-monitoring)
19+
- [IP set subscribe](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker-rules)
2020
- a mordern WebUI
2121

2222
In addition, PeerBanHelper downloads the GeoIP library at startup, and supports the following functions once it successful loaded:
@@ -25,7 +25,7 @@ In addition, PeerBanHelper downloads the GeoIP library at startup, and supports
2525
- View GeoIP statistics
2626

2727
> [!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.
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/en/docs/btn/intro) , but this is completely optional.
2929
3030

3131
## Supported clients
@@ -46,20 +46,23 @@ In addition, PeerBanHelper downloads the GeoIP library at startup, and supports
4646

4747
## Install
4848

49-
Please read the [docs](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)
49+
Please read the [docs](https://docs.pbh-btn.com/en/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)
5050

5151

5252
## FAQ
5353

54-
Before submit issue, please read the [FAQ](https://docs.pbh-btn.com/docs/faq)
54+
Before submit issue, please read the [FAQ](https://docs.pbh-btn.com/en/docs/faq)
5555

5656
## Support
5757
Consider join our [Telegram](https://t.me/+_t3Nt5GZ6bJmYjBl) group.
5858

5959
## Declaration
6060

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.
61+
**Using this software means you agree to the following statement:**
62+
63+
Illegal websites and black-grey production, DO NOT initiate any form of manual service requests to our organization's development or support staff; it is strictly forbidden to use any results of the PBH-BTN team (including but not limited to code, images, programs, BTN rule sets, etc.) to engage in any illegal activities such as violating laws and regulations, endangering national security, implementing or assisting others in implementing telecommunications crimes.
64+
Users may not use any results of the PBH-BTN team (including but not limited to code, images, programs, BTN rule sets, etc.) to carry out any activities that harm the interests of other individuals or organizations. The use of any services or products of the PBH-BTN team in any case that violates the rights of individuals or organizations is not allowed.
65+
Any consequences caused by the user's use of this software are borne by the user and have nothing to do with the software developer."
6366

6467
## Star History
6568

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,11 @@ PeerBanHelper 主要由以下几个功能模块组成:
5959

6060
## 声明
6161

62-
违法网站和黑灰产请勿向我组织开发或支持人员发起任何形式的人工服务请求;严禁使用 PBH-BTN 团队的任何服务、产品从事任何违法违规、危害国家安全、实施或帮助他人实施电信犯罪等非法活动。
63-
用户不得通过 PBH-BTN 团队的任何服务、产品进行任何损害其它个人或组织的利益的活动。在任何违反个人或组织权益的情况下使用 PBH-BTN 团队的任何服务、产品均不被允许。
62+
**使用本软件意味着你同意以下声明:**
63+
64+
违法网站和黑灰产请勿向我组织开发或支持人员发起任何形式的人工服务请求;严禁使用 PBH-BTN 团队的任何成果(包括但不限于代码,镜像,程序,BTN规则集等)从事任何违法违规、危害国家安全、实施或帮助他人实施电信犯罪等非法活动。
65+
用户不得通过 PBH-BTN 团队的任何成果(包括但不限于代码,镜像,程序,BTN规则集等)进行任何损害其它个人或组织的利益的活动。在任何违反个人或组织权益的情况下使用 PBH-BTN 团队的任何服务、产品均不被允许。
66+
用户使用本软件造成的任何后果,由用户自行承担,与本软件开发者无关。
6467

6568
## Star History
6669

install4j/project.install4j

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<executable name="PeerBanHelper-NoGUI" iconSet="true" executableDir="." redirectStderr="false" executableMode="console" singleInstance="true" checkConsoleParameter="true">
5858
<versionInfo include="true" fileDescription="${i18n:peerbanhelper.description}" legalCopyright="PBH-BTN Community - Licensed under GPLv3 licenses. https://www.gnu.org/licenses/quick-guide-gplv3.en.html" internalName="peerbanhelper" />
5959
</executable>
60-
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="-Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j" arguments="nogui">
60+
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="-Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j -Djava.awt.headless=true" arguments="nogui">
6161
<classPath>
6262
<scanDirectory location="libraries" failOnError="false" />
6363
<archive location="PeerBanHelper.jar" failOnError="false" />

pkg/deb/etc/peerbanhelper/data/profile.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ module:
5353
- '{"method":"STARTS_WITH","content":"-hp"}'
5454
- '{"method":"STARTS_WITH","content":"-xm"}'
5555
- '{"method":"STARTS_WITH","content":"-dt"}'
56-
- '{"method":"STARTS_WITH","content":"-gt0002"}'
57-
- '{"method":"STARTS_WITH","content":"-gt0003"}'
5856
- '{"method":"CONTAINS","content":"-rn0.0.0"}'
5957
- '{"method":"STARTS_WITH","content":"-sd"}'
6058
- '{"method":"STARTS_WITH","content":"-xf"}'
@@ -81,7 +79,6 @@ module:
8179
- '{"method":"STARTS_WITH","content":"dt "}'
8280
- '{"method":"STARTS_WITH","content":"xm/torrent"}'
8381
- '{"method":"STARTS_WITH","content":"xm "}'
84-
- '{"method":"STARTS_WITH","content":"go.torrent"}'
8582
- '{"method":"STARTS_WITH","content":"taipei-torrent"}'
8683
- '{"method":"CONTAINS","content":"rain 0.0.0"}'
8784
- '{"method":"CONTAINS","content":"gopeed dev"}'
@@ -92,11 +89,9 @@ module:
9289
- '{"method":"CONTAINS","content":"tudou"}'
9390
- '{"method":"CONTAINS","content":"torrentstorm"}'
9491
- '{"method":"CONTAINS","content":"qqdownload"}'
95-
- '{"method":"CONTAINS","content":"anacrolix/torrent"}'
9692
- '{"method":"STARTS_WITH","content":"qbittorrent/3.3.15"}'
9793
- '{"method":"STARTS_WITH","content":"github.com/thank423/trafficconsume"}'
9894
- '{"method":"STARTS_WITH","content":"ޭ__"}' # 0xde-0xad-0xbe-0xef
99-
- '{"method":"STARTS_WITH","content":"ljyun.cn/hangzhou/monitoring"}'
10095
- '{"method":"STARTS_WITH","content":"taipei-torrent"}'
10196
- '{"method":"STARTS_WITH","content":"-XL"}'
10297
# 进度作弊检查器:Progress Cheat Blocker
@@ -381,6 +376,10 @@ module:
381376
name: all-in-one
382377
# 规则文件订阅地址 - Subscription Address
383378
url: https://bcr.pbh-btn.ghorg.ghostchu-services.top/combine/all.txt
379+
tor-exit-nodes:
380+
enabled: false
381+
name: Tor Exit Nodes
382+
url: https://cdn.jsdelivr.net/gh/platformcosmo/Tor-IP-Addresses/tor-exit-nodes.lst
384383
# 主动监测 - Active Monitoring
385384
# 此功能允许 PeerBanHelper 主动记录每次请求下载器时获取到的数据到本地 SQLite 数据库中
386385
# Allow PBH records all data that fetched from downloader and save them into SQLite database
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@echo off
22
chcp 65001
33
title PeerBanHelper
4-
start ./jre/bin/java.exe -Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dpbh.release=portable -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -Dconsole.encoding=UTF-8 -jar PeerBanHelper.jar nogui
4+
start ./jre/bin/java.exe -Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -Djava.awt.headless=true -XX:+ShrinkHeapInSteps -Dpbh.release=portable -Dfile.encoding=UTF-8 -Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 -Dconsole.encoding=UTF-8 -jar PeerBanHelper.jar nogui
55
pause

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.4</version>
9+
<version>7.1.5</version>
1010
<packaging>jar</packaging>
1111

1212
<name>PeerBanHelper</name>

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/biglybt/BiglyBT.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public BiglyBT(String name, Config config, AlertManager alertManager) {
7272
.connectTimeout(Duration.of(10, ChronoUnit.SECONDS))
7373
.headersTimeout(Duration.of(10, ChronoUnit.SECONDS))
7474
.readTimeout(Duration.of(30, ChronoUnit.SECONDS))
75-
.requestTimeout(Duration.of(30, ChronoUnit.SECONDS))
7675
.cookieHandler(cm);
7776
if (!config.isVerifySsl() && HTTPUtil.getIgnoreSslContext() != null) {
7877
builder.sslContext(HTTPUtil.getIgnoreSslContext());
@@ -164,7 +163,7 @@ public List<Torrent> getTorrents() {
164163
}
165164
List<DownloadRecord> torrentDetail = JsonUtil.getGson().fromJson(request.body(), new TypeToken<List<DownloadRecord>>() {
166165
}.getType());
167-
List<Torrent> torrents = new LinkedList<>();
166+
List<Torrent> torrents = new ArrayList<>();
168167
for (DownloadRecord detail : torrentDetail) {
169168
if (config.isIgnorePrivate() && detail.getTorrent().isPrivateTorrent()) {
170169
continue;
@@ -215,7 +214,7 @@ public List<Peer> getPeers(Torrent torrent) {
215214
throw new IllegalStateException(tlUI(Lang.DOWNLOADER_BIGLYBT_FAILED_REQUEST_PEERS_LIST_IN_TORRENT, resp.statusCode(), resp.body()));
216215
}
217216
PeerManagerRecord peerManagerRecord = JsonUtil.getGson().fromJson(resp.body(), PeerManagerRecord.class);
218-
List<Peer> peersList = new LinkedList<>();
217+
List<Peer> peersList = new ArrayList<>();
219218
for (PeerRecord peer : peerManagerRecord.getPeers()) {
220219
var peerId = new String(ByteUtil.hexToByteArray(peer.getPeerId()), StandardCharsets.ISO_8859_1);
221220
if (peerId.length() > 8) {

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/BitComet.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public BitComet(String name, Config config, AlertManager alertManager) {
7676
.followRedirects(HttpClient.Redirect.ALWAYS)
7777
.connectTimeout(Duration.of(15, ChronoUnit.SECONDS))
7878
.headersTimeout(Duration.of(15, ChronoUnit.SECONDS))
79-
.readTimeout(Duration.of(30, ChronoUnit.SECONDS))
80-
.requestTimeout(Duration.of(30, ChronoUnit.SECONDS));
79+
.readTimeout(Duration.of(30, ChronoUnit.SECONDS));
8180
if (!config.isVerifySsl() && HTTPUtil.getIgnoreSslContext() != null) {
8281
builder.sslContext(HTTPUtil.getIgnoreSslContext());
8382
}

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/AbstractQbittorrent.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,8 @@ public AbstractQbittorrent(String name, QBittorrentConfig config, AlertManager a
6262
.version(HttpClient.Version.valueOf(config.getHttpVersion()))
6363
.followRedirects(HttpClient.Redirect.ALWAYS)
6464
.connectTimeout(Duration.of(10, ChronoUnit.SECONDS))
65-
.headersTimeout(Duration.of(10, ChronoUnit.SECONDS))
65+
.headersTimeout(Duration.of(30, ChronoUnit.SECONDS))
6666
.readTimeout(Duration.of(30, ChronoUnit.SECONDS))
67-
.requestTimeout(Duration.of(30, ChronoUnit.SECONDS))
6867
.authenticator(new Authenticator() {
6968
@Override
7069
public PasswordAuthentication requestPasswordAuthenticationInstance(String host, InetAddress addr, int port, String protocol, String prompt, String scheme, URL url, RequestorType reqType) {
@@ -243,7 +242,7 @@ public List<Peer> getPeers(Torrent torrent) {
243242

244243
JsonObject object = JsonParser.parseString(resp.body()).getAsJsonObject();
245244
JsonObject peers = object.getAsJsonObject("peers");
246-
List<Peer> peersList = new LinkedList<>();
245+
List<Peer> peersList = new ArrayList<>();
247246
for (String s : peers.keySet()) {
248247
JsonObject singlePeerObject = peers.getAsJsonObject(s);
249248
QBittorrentPeer qbPeer = JsonUtil.getGson().fromJson(singlePeerObject.toString(), QBittorrentPeer.class);

src/main/java/com/ghostchu/peerbanhelper/gui/impl/console/ConsoleGuiImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public ConsoleGuiImpl(String[] args) {
1616

1717
@Override
1818
public void setup() {
19-
// do nothing
19+
System.setProperty("java.awt.headless", "true");
2020
}
2121

2222
@Override

0 commit comments

Comments
 (0)