MCPcopy Index your code
hub / github.com/PBH-BTN/PeerBanHelper

github.com/PBH-BTN/PeerBanHelper @v9.3.16

repository ↗ · DeepWiki ↗ · release v9.3.16 ↗ · + Follow
4,461 symbols 12,753 edges 784 files 286 documented · 6%
README

PeerBanHelper

简体中文

Automatically ban unwelcome, leeching, and abnormal BT clients with support for custom rules.

page-views

Try PeerBanHelper before install to your device: Demo Site

Features

PeerBanHelper consists of the following core modules:

Additionally, PeerBanHelper downloads the GeoIP database on startup. Once loaded, it supports:

  • Viewing IP geolocation, AS info (ASN, ISP, AS Name), and network type (Broadband, Cellular, IoT, Data Center, etc.) in ban lists
  • Banning IPs by country/region, city, network type, ASN, etc.
  • GeoIP statistics visualization

[!TIP] For optimal performance, we recommend using our maintained IP rule repository PBH-BTN/BTN-Collected-Rules and BTN Network, though this is entirely optional.

Supported Clients

[!CAUTION] All Docker-based downloaders must use host network driver. PBH requires real peer IPs - bridge mode is unsupported!

  • qBittorrent/qBittorrent v4.5.0 or newer (XDown not supported)
  • BiglyBT (requires plugin)
  • Deluge (requires plugin)
  • Transmission (v4.1.0-beta2 or newer required)
  • BitComet v2.18 or newer (LTSeed anti-leech unsupported due to BitComet's limitation)

PeerBanHelper only supports traditional IPv4/IPv6 anti-leech. I2P/Tor connections are ignored.

Screenshots

Main UI Ban List Ban Logs Ban Statistics Rule Statistics Rule Subscriptions
homepage banlist banlogs maxban banMetrics banMetrics

Installation

See PeerBanHelper Documentation

FAQ

Before reporting issues, check FAQ

Need Help?

Join our QQ Group or Telegram Group!

Disclaimer

By using this software, you agree to:

Illegal websites and black/grey industries shall not request any form of manual service from PBH-BTN developers/supporters. Strictly prohibited to use any PBH-BTN assets (including but not limited to code, images, programs, BTN rulesets) for illegal activities, endangering national security, telecom fraud, or assisting others in such acts.
Users shall not use PBH-BTN assets to harm other individuals/organizations. Any usage infringing rights of others is prohibited.
Users bear full responsibility for consequences arising from software usage. Developers assume no liability.

Star History

Star History Chart

Tools

We use these excellent tools during development. Thanks to the companies/projects for providing open-source licenses:

Install4j

PeerBanHelper uses Install4j multi-platform installer builder. Thanks to ej-technologies for the OSS license. Click the link or image below for install4j.

Install4j

JProfiler

PeerBanHelper uses JProfiler all-in one Java profiler for performance analysis. Thanks to ej-technologies for the OSS license. Click the link or image below for JProfiler.

JProfiler

Credit

Backend

WebUI

Extension points exported contracts — how you extend this code

TableMigrator (Interface)
Base interface for all table migrators [21 implementers]
src/main/java/com/ghostchu/peerbanhelper/databasent/migration/TableMigrator.java
Asn (Interface)
* Peer 的 IP 的 ASN 信息
webui/src/api/model/downloader.ts
ImportMetaEnv (Interface)
(no doc)
webui/env.d.ts
RsArguments (Interface)
(no doc) [10 implementers]
src/main/java/cordelia/rpc/RsArguments.java
Peer (Interface)
* Peer 信息
webui/src/api/model/downloader.ts
RqArguments (Interface)
(no doc) [18 implementers]
src/main/java/cordelia/rpc/RqArguments.java
PeerFlags (Interface)
* Peer Flags
webui/src/api/model/downloader.ts
MonitorFeatureModule (Interface)
(no doc) [8 implementers]
src/main/java/com/ghostchu/peerbanhelper/module/MonitorFeatureModule.java

Core symbols most depended-on inside this repo

get
called by 542
src/main/java/com/ghostchu/peerbanhelper/databasent/service/MetadataService.java
set
called by 505
src/main/java/com/ghostchu/peerbanhelper/databasent/service/MetadataService.java
tlUI
called by 368
src/main/java/com/ghostchu/peerbanhelper/text/TextManager.java
add
called by 360
src/main/java/com/ghostchu/peerbanhelper/wrapper/StructuredData.java
tl
called by 141
src/main/java/com/ghostchu/peerbanhelper/text/TextManager.java
match
called by 139
src/main/java/com/ghostchu/peerbanhelper/util/rule/Rule.java
locale
called by 126
src/main/java/com/ghostchu/peerbanhelper/module/AbstractFeatureModule.java
append
called by 121
src/main/java/com/ghostchu/peerbanhelper/util/logger/JListAppender.java

Shape

Method 3,312
Class 741
Interface 221
Function 143
Enum 44

Languages

Java83%
TypeScript17%

Modules by API surface

webui/src/views/custom-script/components/editor/aviatorscript/grammar/DSLParser.ts408 symbols
src/main/java/org/bitlet/weupnp/GatewayDevice.java54 symbols
src/main/java/com/ghostchu/peerbanhelper/config/MainConfigUpdateScript.java46 symbols
src/main/java/com/ghostchu/peerbanhelper/util/traversal/forwarder/TCPForwarderImpl.java41 symbols
src/main/java/com/ghostchu/peerbanhelper/config/ProfileUpdateScript.java40 symbols
src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/BitComet.java37 symbols
src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/AbstractQbittorrent.java35 symbols
src/main/java/com/ghostchu/peerbanhelper/downloader/impl/biglybt/BiglyBT.java34 symbols
src/main/java/com/ghostchu/peerbanhelper/module/impl/rule/IPBlackList.java33 symbols
src/main/java/com/ghostchu/peerbanhelper/util/HTTPUtil.java32 symbols
src/main/java/com/ghostchu/peerbanhelper/downloader/impl/transmission/Transmission.java32 symbols
src/main/java/com/ghostchu/peerbanhelper/bittorrent/peer/PeerFlag.java31 symbols

Dependencies from manifests, versioned

@arco-design/web-vue2.56.3 · 1×
@arco-plugins/vite-vue1.4.6 · 1×
@dzangolab/flag-icon-css3.4.5 · 1×
@eslint/js9.39.2 · 1×
@formatjs/intl-durationformat0.10.0 · 1×
@guolao/vue-monaco-editor1.6.0 · 1×
@octokit/core7.0.6 · 1×
@octokit/request-error7.1.0 · 1×
@rushstack/eslint-patch1.15.0 · 1×
@sentry/vue10.32.1 · 1×
@tsconfig/node2424.0.3 · 1×
@types/lodash4.17.21 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add PeerBanHelper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact