Skip to content

Commit

Permalink
Merge pull request #245 from PBH-BTN/master
Browse files Browse the repository at this point in the history
v5.0.0
  • Loading branch information
Ghost-chu authored Jul 15, 2024
2 parents f2b6a08 + dbb4a93 commit 4c475b8
Show file tree
Hide file tree
Showing 198 changed files with 8,598 additions and 2,907 deletions.
67 changes: 41 additions & 26 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: '错误报告'
description: '报告与 PeerBanHelper 有关的程序错误'
name: '错误报告 - Bug Report'
description: '报告与 PeerBanHelper 有关的程序错误 - Report the errors that related to PeerBanHelper'

title: '[BUG] '
labels:
Expand All @@ -8,42 +8,49 @@ body:
- type: 'markdown'
attributes:
value: |-
## 请注意
## 请注意 - Caution
This form only used for bug report, for any other cases, please [click here](https://github.com/PBH-BTN/PeerBanHelper/issues/new)
此表单**仅用于反馈错误**,如果是其它类型的反馈,请[点击这里](https://github.com/PBH-BTN/PeerBanHelper/issues/new)。
If you think the error is related PBH WebUI, please [report to here](https://github.com/PBH-BTN/pbh-fe)
如果你认为此错误是一个 PBH WebUI,请[在此反馈](https://github.com/PBH-BTN/pbh-fe)。
请尽可能完整且详细地填写所有表单项,以便我们以最高效率并准确的排查故障和诊断问题
- type: 'textarea'
attributes:
label: '版本号'
label: '版本号 - Version'
description: |-
Enter the PBH version that display on WebUI footer or GUI window title.
输入您正在使用 PeerBanHelper 的版本号,通常可在窗口标题或者 WebUI 页面的底部找到
placeholder: 'vX.X.X'
validations:
required: true
- type: 'textarea'
attributes:
label: '操作系统平台和系统架构'
label: '操作系统平台和系统架构 - OS and CPU Arch'
description: |-
Enter the OS version/arch that PBH running on (not downloader), E.g Windows, Debian, iStoreOS.
输入 PBH 所在的操作系统平台(不是下载器),例如:Windows、Debian、iStoreOS 等
And please also enter the system arch if you know it, E.g x86, arm64
此外,您还需要输入系统架构。如果是 x86 设备,则通常为 x64;如果是 arm 设备,则通常为 arm64。请根据实际情况填写。如果不知道,也可以不写系统架构类型。
placeholder: '操作系统平台名称……'
validations:
required: true
- type: 'textarea'
attributes:
label: '部署方式'
label: '部署方式 - Deploy method'
description: |-
Enter the deploy method that you're using:
输入您部署 PeerBanHelper 方式,官方支持的有如下几种方式:
* Windows 安装程序(通过 .exe 安装)
* Windows 绿色懒人包(解压即用的 .zip 文件)
* Docker 镜像
* Windows 安装程序(通过 .exe 安装) (Windows .EXE Installer)
* Windows 绿色懒人包(解压即用的 .zip 文件) (Windows .ZIP Portable)
* Docker 镜像 (Docker Container)
placeholder: '部署方式……'
validations:
required: true
- type: 'textarea'
attributes:
label: '关联的下载器类型'
label: '关联的下载器类型 - Downloader Type'
description: |-
Enter the downloader type that you trying to connecting/connected to PBH (E.g):
输入您的 PBH 关联的下载器类型,例如:
* qBittorrent
* Transmission
Expand All @@ -54,15 +61,18 @@ body:
required: true
- type: 'textarea'
attributes:
label: '问题描述'
label: '问题描述 - Issue Description'
description: |-
Describe the problem you encounted.
在此详细的描述你所遇到的问题
validations:
required: true
- type: 'textarea'
attributes:
label: '复现步骤'
description: '如果你清楚如何复现此故障,也欢迎告诉我们,帮助我们更快的复现它。如果它是一个偶尔才会出现的错误,请告诉我们它通常可能会在什么情况下出现。'
label: '复现步骤 - Reproduce steps'
description: |-
If you know how to reproduce the error, please type it in this text area.
如果你清楚如何复现此故障,也欢迎告诉我们,帮助我们更快的复现它。如果它是一个偶尔才会出现的错误,请告诉我们它通常可能会在什么情况下出现。
placeholder: |-
1. 第一步
2. ...
Expand All @@ -71,31 +81,36 @@ body:
required: true
- type: 'textarea'
attributes:
label: '截图/日志文件'
description: '如果你有一些截图或者日志能够更好的解释你所提出的问题,你可以在这里上传。'
label: '截图/日志文件 - Screenshot / Logs '
description: |-
If you have some screenshot or logs file can help us, please upload them here.
如果你有一些截图或者日志能够更好的解释你所提出的问题,你可以在这里上传。
placeholder: '<截图文件>'
validations:
required: false
- type: 'textarea'
attributes:
label: '额外信息'
description: '如果你还有其他觉得可能对排查和解决此问题有帮助的更多信息,可以在这里告诉我们'
label: '额外信息 - Addition Information'
description: |-
If you have any related informations, please insert them into this text area.
如果你还有其他觉得可能对排查和解决此问题有帮助的更多信息,可以在这里告诉我们
placeholder: '在此填写可能有用的额外信息...'
- type: checkboxes
id: check-list
attributes:
label: 检查清单
description: 请检查并勾选下面的所有的复选框,如果您没有这样做,我们可能会直接关闭这个 Issue
label: 检查清单 - Check list
description: |-
Check and tick checkboxes that listed below
options:
- label: "我确定正在运行 Github Releases 中的最新的正式版本 PeerBanHelper"
- label: "我确定正在运行 Github Releases 中的最新的正式版本 PeerBanHelper (I'm running the latest version of PBH that can be found in Github Relases)"
required: false
- label: "我确定我所添加的下载器已满足 README 中的前置要求(如版本号和插件)"
- label: "我确定我所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))"
required: false
- label: "我确定我所提到的问题,均未在 README 和 WIKI 中有所解答"
- label: "我确定我所提到的问题,均未在 README 和 WIKI 中有所解答 (This not a question/or the question that not listed in README's FAQ or WIKI)"
required: false
- label: "我确定我没有检查这个检查清单,只是闭眼选中了所有的复选框"
- label: "我确定我没有检查这个检查清单,只是闭眼选中了所有的复选框 (I have not read these checkboxes and therefore I just ticked them all)"
required: false
- label: "我确定这不是一个与安全有关的安全漏洞,它可以被安全的公开报告"
- label: "我确定这不是一个与安全有关的安全漏洞,它可以被安全的公开报告 (This not a security related issue, can be safe report in public)"
required: false
- label: "我确定我已知悉,如果我没有正确地填写问题报告表单,则 Issue 可能会被关闭"
- label: "我确定我已知悉,如果我没有正确地填写问题报告表单,则 Issue 可能会被关闭 (I know this issue may closed without any warnings if I didn't fill the form correctly)"
required: false
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: 'WebUI 错误报告 - WebUI Bug Report'
about: |-
报告与 PBH WebUI 有关的错误
Report the errors that related to PBH WebUI.
url: 'https://github.com/PBH-BTN/pbh-fe/issues/new'
15 changes: 11 additions & 4 deletions .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ name: Java CI

on:
push:
branches: [ "master", "release" ]
branches: [ "master", "major-refactor", "release" ]
pull_request:
branches: [ "master", "release" ]
branches: [ "master", "major-refactor", "release" ]
workflow_dispatch:
release:
types:
Expand All @@ -31,15 +31,21 @@ jobs:
distribution: "temurin"
java-version: "21"
cache: "maven"
- uses: luangong/setup-install4j@v1
name: Setup Install4j
with:
version: 10.0.8
license: ${{ secrets.INSTALL4J_LICENSE }}
- name: Build with Maven
run: mvn -B clean package --file pom.xml
run: mvn -B clean package --file pom.xml -P install4j-ci,thin-sqlite-packaging
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Linux-${{ github.sha }}
path: |
target/*.jar
target/peerbanhelper-binary
target/media/*.exe
id: project
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -65,7 +71,7 @@ jobs:
type=raw,ci
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.4.0
with:
context: .
file: ./Dockerfile-CI
Expand All @@ -75,3 +81,4 @@ jobs:
linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal

29 changes: 25 additions & 4 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ on:
- published
jobs:
build:
permissions:
contents: write
checks: write
actions: read
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -27,15 +36,27 @@ jobs:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- uses: luangong/setup-install4j@v1
name: Setup Install4j
with:
version: 10.0.8
license: ${{ secrets.INSTALL4J_LICENSE }}
- name: Build with Maven
run: mvn -B clean package --file pom.xml
run: mvn -B clean package --file pom.xml -P install4j-ci,thin-sqlite-packaging
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: Linux-${{ github.sha }}
path: |
target/*.jar
target/peerbanhelper-binary
target/media/*.exe
- name: Upload release binaries
uses: alexellis/upload-assets@0.4.1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["target/PeerBanHelper.jar", "target/media/PeerBanHelper_*"]'
id: project
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
Expand All @@ -61,7 +82,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.4.0
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -93,7 +114,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Aliyun ACR
uses: docker/build-push-action@v5.3.0
uses: docker/build-push-action@v6.4.0
with:
context: .
file: ./Dockerfile
Expand All @@ -102,4 +123,4 @@ jobs:
linux/amd64
linux/arm64/v8
tags: ${{ steps.meta-acr.outputs.tags }}
labels: ${{ steps.meta-acr.outputs.labels }}-jvm-universal
labels: ${{ steps.meta-acr.outputs.labels }}-jvm-universal
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
- uses: actions/stale@v9
with:
# issues
only-issue-labels: "waiting-reply"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM docker.io/maven:3.9.6-eclipse-temurin-21 as build
FROM --platform=$BUILDPLATFORM docker.io/maven:3.9.8-eclipse-temurin-21 as build

COPY . /build
WORKDIR /build
Expand All @@ -12,4 +12,4 @@ WORKDIR /app
VOLUME /tmp
COPY --from=build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar
ENV PATH "${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ["java","-Xmx256M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
2 changes: 1 addition & 1 deletion Dockerfile-CI
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ENV TZ=UTC
WORKDIR /app
VOLUME /tmp
ENV PATH "${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ["java","-Xmx256M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* Transmission **(3.00-20 或更高版本)**
* BiglyBT(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-BiglyBT)
* Deluge(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Deluge)
* Azureus(Vuze)(需要安装[插件](https://github.com/PBH-BTN/PBH-Adapter-Azureus)

## 功能介绍

Expand All @@ -36,11 +37,14 @@ PeerBanHelper 主要由以下几个功能模块组成:
* Client Name 黑名单
* IP 黑名单
* 虚假进度检查器(提供启发式客户端检测功能)(Transmission不支持过量下载检测)
* 主动探测
* 自动 IP 段封禁
* 多拨追猎
* Peer ID/Client Name 伪装检查
* WebUI (目前支持:活跃封禁名单查看,历史封禁查询,封禁最频繁的 Top 50 IP)
* WebUI (目前支持:活跃封禁名单查看,历史封禁查询,封禁最频繁的 Top 50 IP,规则订阅管理,图表查看,Peer 列表查看)

如果配置了 Maxmind IP 库,则还支持以下内容:

* 在封禁列表中查看 IP 归属地

### PeerID 黑名单

Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ services:
environment:
- PUID=0
- PGID=0
- TZ=UTC
- TZ=UTC
stop_grace_period: 30s
Binary file added install4j/icon.ico
Binary file not shown.
Binary file added install4j/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions install4j/lang/custom.utf8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式)
launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper(服务)
checkbox.followsystemstartup=登录时自动启动到系统托盘
peerbanhelper.description=PeerBanHelper
6 changes: 6 additions & 0 deletions install4j/lang/en-US.utf8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(Compatibility Mode)
launcher.peerbanhelper.nogui=PeerBanHelper(NoGUI, Console)
launcher.peerbanhelper.service=PeerBanHelper(Service)
checkbox.followsystemstartup=Boot automatically to the system tray when logged in
peerbanhelper.description=PeerBanHelper
6 changes: 6 additions & 0 deletions install4j/lang/zh-CN.utf8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
launcher.peerbanhelper.gui=PeerBanHelper
launcher.peerbanhelper.gui.swing=PeerBanHelper(兼容模式)
launcher.peerbanhelper.nogui=PeerBanHelper(无GUI, 控制台)
launcher.peerbanhelper.service=PeerBanHelper(服务)
checkbox.followsystemstartup=登录到桌面时自动启动
peerbanhelper.description=一个能够自动封禁不受欢迎、吸血和异常的 Peers,并支持自定义规则的 BT 客户端辅助工具
Loading

0 comments on commit 4c475b8

Please sign in to comment.