Skip to content

Commit

Permalink
Merge pull request #800 from PBH-BTN/master
Browse files Browse the repository at this point in the history
v7.2
  • Loading branch information
Ghost-chu authored Dec 10, 2024
2 parents 18c1ef3 + 2e793e0 commit 2b22b5d
Show file tree
Hide file tree
Showing 180 changed files with 11,524 additions and 1,876 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
7 changes: 5 additions & 2 deletions .github/workflows/build_installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ jobs:
- name: Make installers
run: |
/opt/install4j/bin/install4jc -L ${{ secrets.INSTALL4J_LICENSE }} -r ${{ steps.java_info.outputs.project_version }} -g -d target/media -D librariesPath=$(pwd)/target/libraries install4j/project.install4j
- name: Delete garbages
run: |
rm -rf target/media/debug*
# jarPath=$(pwd) 是必须的,install4jc 不知道什么毛病,不支持相对路径,这太诡异了
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: installer-dist
path: |
target/media/PeerBanHelper_*
id: project
target/media/*
id: project
28 changes: 28 additions & 0 deletions .github/workflows/delete_old_s3_objects.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Empty S3 directory

on:
workflow_call:
secrets:
S3_ACCESS_KEY:
required: true
S3_SECRET_KEY:
required: true
S3_ENDPOINT:
required: true
S3_BUCKET:
required: true
jobs:
delete-files-from-s3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Remove from S3
uses: vitorsgomes/s3-rm-action@master
with:
args: --recursive
env:
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }}
AWS_S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
PATH_TO_DELETE: updates/latest
20 changes: 20 additions & 0 deletions .github/workflows/flush_cloudflare_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Flush CloudFlare Update Cache

on:
workflow_call:
secrets:
FILES_CLOUDFLARE_ZONE:
required: true
FILES_CLOUDFLARE_TOKEN:
required: true
jobs:
purge-cloudflare-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Purge cache
uses: jakejarvis/cloudflare-purge-action@master
env:
# Zone is required by both authentication methods
CLOUDFLARE_ZONE: ${{ secrets.FILES_CLOUDFLARE_ZONE }}
CLOUDFLARE_TOKEN: ${{ secrets.FILES_CLOUDFLARE_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@v5.6.1
with:
images: ghostchu/peerbanhelper-snapshot
tags: |
Expand All @@ -63,7 +63,7 @@ jobs:
type=raw,ci
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.10.0
with:
context: .
file: ./Dockerfile
Expand Down
35 changes: 31 additions & 4 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,33 @@ jobs:
Build_Portable:
needs: Build_Executable
uses: ./.github/workflows/build_portable.yml
Empty_Old_S3_Files:
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable]
uses: ./.github/workflows/delete_old_s3_objects.yml
secrets: inherit
Upload_Updates_To_S3:
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable, Empty_Old_S3_Files]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: installer-dist
path: target/media
- uses: shallwefootball/s3-upload-action@master
with:
aws_key_id: ${{ secrets.S3_ACCESS_KEY }}
aws_secret_access_key: ${{ secrets.S3_SECRET_KEY }}
aws_bucket: ${{ secrets.S3_BUCKET }}
endpoint: ${{ secrets.S3_ENDPOINT }}
source_dir: 'target/media'
destination_dir: 'updates/latest'
Clear_CloudFlare_Updates:
needs: [Upload_Updates_To_S3]
uses: ./.github/workflows/flush_cloudflare_cache.yml
secrets: inherit
Upload_Artifacts:
continue-on-error: true
if: github.event_name != 'workflow_dispatch'
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG, Build_Portable]
permissions:
contents: write
Expand Down Expand Up @@ -91,6 +117,7 @@ jobs:
with:
asset_paths: '["target/media/PeerBanHelper_*", "target/media/peerbanhelper_*", "target/media/peerbanhelper-*"]'
Build_Docker:
if: github.event_name != 'workflow_dispatch'
permissions:
contents: write
checks: write
Expand Down Expand Up @@ -119,7 +146,7 @@ jobs:
password: ${{ secrets.DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@v5.6.1
with:
images: ghostchu/peerbanhelper
tags: |
Expand All @@ -132,7 +159,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.10.0
with:
context: .
file: ./Dockerfile
Expand All @@ -157,7 +184,7 @@ jobs:
password: ${{ secrets.ALIYUN_ACR_PASSWORD }}
- name: Extract metadata (tags, labels) for Aliyun ACR
id: meta-acr
uses: docker/metadata-action@v5.5.1
uses: docker/metadata-action@v5.6.1
with:
images: registry.cn-hangzhou.aliyuncs.com/ghostchu/peerbanhelper
tags: |
Expand All @@ -170,7 +197,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Aliyun ACR
uses: docker/build-push-action@v6.9.0
uses: docker/build-push-action@v6.10.0
with:
context: .
file: ./Dockerfile-Release
Expand Down
29 changes: 18 additions & 11 deletions README.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Following function are provided by PeerBanHelper:
- [IP/GeoIP/IP type Blacklist](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker)
- [Fake progress checker (heuristic client detection)](https://docs.pbh-btn.com/en/docs/module/progress-cheat-blocker)
- [Auto range ban](https://docs.pbh-btn.com/en/docs/module/auto-range-ban)
- [Multi-dail ban](https://docs.pbh-btn.com/en/docs/module/multi-dial)
- [Multi-dial ban](https://docs.pbh-btn.com/en/docs/module/multi-dial)
- Peer ID/Client Name camouflage check, powered by [AviatorScript Engine](https://docs.pbh-btn.com/en/docs/module/expression-engine)
- [Active monitoring(data analysis)](https://docs.pbh-btn.com/en/docs/module/active-monitoring)
- [IP set subscribe](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker-rules)
- a mordern WebUI
- A modern WebUI

In addition, PeerBanHelper downloads the GeoIP library at startup, and supports the following functions once it successful loaded:
- 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.
Expand All @@ -34,8 +34,8 @@ In addition, PeerBanHelper downloads the GeoIP library at startup, and supports
- BiglyBT([plugin](https://github.com/PBH-BTN/PBH-Adapter-BiglyBT) is required)
- Deluge([plugin](https://github.com/PBH-BTN/PBH-Adapter-Deluge) is required)
- Azureus(Vuze)([plugin](https://github.com/PBH-BTN/PBH-Adapter-Azureus) is required)
- Transmission **(deprected;3.00-20 or higher)**
- BitComet **v2.10 Beta6 [20240928] or higher**
- Transmission **(deprecated;3.00-20 or higher)**
- BitComet **v2.10 Beta6 [20240928] or higher** (P2SP LTSeed mode is not supported)


# Screenshots
Expand All @@ -51,7 +51,7 @@ Please read the [docs](https://docs.pbh-btn.com/en/docs/category/%E5%AE%89%E8%A3

## FAQ

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

## Support
Consider join our [Telegram](https://t.me/+_t3Nt5GZ6bJmYjBl) group.
Expand All @@ -68,6 +68,12 @@ Any consequences caused by the user's use of this software are borne by the user

[![Star History Chart](https://api.star-history.com/svg?repos=PBH-BTN/PeerBanHelper&type=Date)](https://star-history.com/#PBH-BTN/PeerBanHelper&Date)

### Install4j

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.

[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)

## Credit

### Backend
Expand All @@ -85,15 +91,16 @@ Any consequences caused by the user's use of this software are borne by the user
- [GeoIP2](https://dev.maxmind.com/geoip)
- [ormlite](https://ormlite.com/)
- [SimpleReloadLib](https://github.com/Ghost-chu/SimpleReloadLib)
- [java-ipfs-http-client](https://github.com/ipfs-shipyard/java-ipfs-http-client)
- [java-multiaddr](https://github.com/multiformats/java-multiaddr)
- [portmapper](https://github.com/offbynull/portmapper)
- [xz](https://github.com/tukaani-project/xz-java)
- [commonmark](https://github.com/commonmark/commonmark-java)
- [oshi](https://github.com/oshi/oshi)
- [semver4j](https://github.com/vdurmont/semver4j)

### WebUI

- [Vue](https://vuejs.org/)
- [ArcoDesign](https://arco.design/)
- [ECharts](https://echarts.apache.org/en/index.html)

### Install4j

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.

[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)
23 changes: 16 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ PeerBanHelper 主要由以下几个功能模块组成:
- Deluge(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Deluge)
- Azureus(Vuze)(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Azureus)
- Transmission **(不建议使用;3.00-20 或更高版本)**
- BitComet **v2.10 Beta6 [20240928] 或更高版本**
- BitComet **v2.10 Beta6 [20240928] 或更高版本** (不支持 P2SP LTSeed 长效种子反吸血,因为 BitComet 暂时无法封禁长效连接)

PeerBanHelper 仅支持对传统 IPv4 或 IPv6 地址的反吸血,如遇 I2P 或者 Tor 连接将主动忽略。

# 截图

Expand All @@ -49,7 +50,6 @@ PeerBanHelper 主要由以下几个功能模块组成:

查看 [PeerBanHelper 文档](https://docs.pbh-btn.com/docs/category/%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2)


## 常见问题

在报告问题前,请先检查 [常见问题列表](https://docs.pbh-btn.com/docs/faq)
Expand All @@ -69,6 +69,13 @@ PeerBanHelper 主要由以下几个功能模块组成:

[![Star History Chart](https://api.star-history.com/svg?repos=PBH-BTN/PeerBanHelper&type=Date)](https://star-history.com/#PBH-BTN/PeerBanHelper&Date)


### Install4j

PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。

[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)

## Credit

### Backend
Expand All @@ -86,15 +93,17 @@ PeerBanHelper 主要由以下几个功能模块组成:
- [GeoIP2](https://dev.maxmind.com/geoip)
- [ormlite](https://ormlite.com/)
- [SimpleReloadLib](https://github.com/Ghost-chu/SimpleReloadLib)
- [java-ipfs-http-client](https://github.com/ipfs-shipyard/java-ipfs-http-client)
- [java-multiaddr](https://github.com/multiformats/java-multiaddr)
- [portmapper](https://github.com/offbynull/portmapper)
- [xz](https://github.com/tukaani-project/xz-java)
- [commonmark](https://github.com/commonmark/commonmark-java)
- [oshi](https://github.com/oshi/oshi)
- [semver4j](https://github.com/vdurmont/semver4j)

### WebUI

- [Vue](https://vuejs.org/)
- [ArcoDesign](https://arco.design/)
- [ECharts](https://echarts.apache.org/en/index.html)

### Install4j

PeerBanHelper 使用 [Install4j multi-platform installer builder](https://www.ej-technologies.com/products/install4j/overview.html) 打包多平台安装程序。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 install4j。

[![Install4j](https://www.ej-technologies.com/images/product_banners/install4j_large.png)](https://www.ej-technologies.com/products/install4j/overview.html)
9 changes: 2 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
version: "3.9"
services:
peerbanhelper:
image: "ghostchu/peerbanhelper:<最新版本号>"
image: "ghostchu/peerbanhelper:<填写版本号>"
restart: unless-stopped
container_name: "peerbanhelper"
volumes:
- ./:/app/data
ports:
- "9898:9898"
environment:
- PUID=0
- PGID=0
- TZ=UTC
stop_grace_period: 30s
stop_grace_period: 30s
11 changes: 7 additions & 4 deletions install4j/lang/custom.utf8
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式)
launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper(服务)
launcher.peerbanhelper.silent=PeerBanHelper (静默启动)
launcher.peerbanhelper.nogui=PeerBanHelper (无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper (服务)
launcher.peerbanhelper.updater=PeerBanHelper 检查更新
checkbox.followsystemstartup=登录时自动启动到系统托盘
peerbanhelper.description=PeerBanHelper
checkbox.registersystemservice=注册为系统服务(除非你知道这是做什么的,否则不要选中)
systemservice.note=将 PeerBanHelper 安装为系统服务时,Windows 系统下配置文件将被存储在 C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper 位置,访问此位置需要您拥有管理员权限。\nPeerBanHelper 将在系统启动时自动启动。
systemservice.note=将 PeerBanHelper 安装为系统服务时,Windows 系统下配置文件将被存储在 C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper 位置,访问此位置需要您拥有管理员权限。\nPeerBanHelper 将在系统启动时自动启动。
components.peerbanhelper=PeerBanHelper
components.peerbanhelper.description=PeerBanHelper 的核心主程序,包含了主程序代码和必要的运行文件
11 changes: 7 additions & 4 deletions install4j/lang/en-US.utf8
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(Compatibility Mode)
launcher.peerbanhelper.nogui=PeerBanHelper(NoGUI, Console)
launcher.peerbanhelper.service=PeerBanHelper(Service)
launcher.peerbanhelper.gui.swing=PeerBanHelper (Compatibility Mode)
launcher.peerbanhelper.nogui=PeerBanHelper (NoGUI, Console)
launcher.peerbanhelper.service=PeerBanHelper (Service)
launcher.peerbanhelper.updater=PeerBanHelper Updater
checkbox.followsystemstartup=Boot automatically to the system tray when logged in
peerbanhelper.description=PeerBanHelper
checkbox.registersystemservice=Register as system service (DO NOT CHECK UNLESS YOU KNOW WHAT YOU'RE DOING)
systemservice.note=When you install PeerBanHelper as system service,under Windows operation system, the configuration and files will store at C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper. Access this location will require Administrator privileges.
systemservice.note=When you install PeerBanHelper as system service,under Windows operation system, the configuration and files will store at C:\Windows\System32\config\systemprofile\AppData\Local\PeerBanHelper. Access this location will require Administrator privileges.
components.peerbanhelper=PeerBanHelper
components.peerbanhelper.description=PeerBanHelper core program, including main program code and necessary runtime files
11 changes: 7 additions & 4 deletions install4j/lang/zh-CN.utf8
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式)
launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper(服务)
launcher.peerbanhelper.silent=PeerBanHelper (静默启动)
launcher.peerbanhelper.nogui=PeerBanHelper (无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper (服务)
launcher.peerbanhelper.updater=PeerBanHelper 检查更新
checkbox.followsystemstartup=登录到桌面时自动启动
peerbanhelper.description=一个能够自动封禁不受欢迎、吸血和异常的 Peers,并支持自定义规则的 BT 客户端辅助工具
peerbanhelper.description=一个能够自动封禁不受欢迎、吸血和异常的 Peers,并支持自定义规则的 BT 客户端辅助工具
components.peerbanhelper=PeerBanHelper
components.peerbanhelper.description=PeerBanHelper 的核心主程序,包含了主程序代码和必要的运行文件
Loading

0 comments on commit 2b22b5d

Please sign in to comment.