Skip to content

Commit

Permalink
Merge pull request #880 from PBH-BTN/master
Browse files Browse the repository at this point in the history
v7.3.0
  • Loading branch information
Ghost-chu authored Jan 9, 2025
2 parents 2476139 + 909c749 commit 4d0cdf3
Show file tree
Hide file tree
Showing 165 changed files with 4,219 additions and 1,159 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,41 @@ jobs:
platforms: |
linux/amd64
linux/arm64/v8
linux/riscv64
linux/ppc64le
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
cache-to: type=gha,mode=max
Build_Docker_Standalone:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Up QEMU
uses: docker/setup-qemu-action@v3
- name: Set Up Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ghostchu/peerbanhelper-snapshot
tags: |
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,ci-jvm-universal
type=raw,ci
type=sha
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
push: false
platforms: |
linux/amd64
linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@ jobs:
platforms: |
linux/amd64
linux/arm64/v8
linux/riscv64
linux/ppc64le
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}-jvm-universal
cache-from: type=gha
Expand Down Expand Up @@ -205,8 +203,6 @@ jobs:
platforms: |
linux/amd64
linux/arm64/v8
linux/riscv64
linux/ppc64le
tags: ${{ steps.meta-acr.outputs.tags }}
labels: ${{ steps.meta-acr.outputs.labels }}-jvm-universal
cache-from: type=gha
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ dependency-reduced-pom.xml

PeerBanHelper.jar
*.pkg
install4j/output
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ RUN apk add --update npm curl git && \
mv webui/dist src/main/resources/static && \
mvn -B clean package --file pom.xml -T 1.5C -P thin-sqlite-packaging

FROM docker.io/eclipse-temurin:23-jre-noble
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-slim-musl
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper"
USER 0
EXPOSE 9898
ENV TZ=UTC
ENV JAVA_OPTS="-Dpbh.release=docker -Djava.awt.headless=true -Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
ENV JAVA_OPTS="-Dpbh.release=docker -Djava.awt.headless=true -Xmx512M -Xms16M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
WORKDIR /app
VOLUME /tmp
COPY --from=build build/target/libraries /app/libraries
COPY --from=build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar
ENV PATH="${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar PeerBanHelper.jar
ENTRYPOINT ["sh", "-c", "${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar PeerBanHelper.jar"]
6 changes: 3 additions & 3 deletions Dockerfile-Release
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM docker.io/eclipse-temurin:23-jre-noble
FROM docker.io/bellsoft/liberica-runtime-container:jre-23-slim-musl
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper"
COPY target/libraries /app/libraries
COPY target/PeerBanHelper.jar /app/PeerBanHelper.jar
USER 0
EXPOSE 9898
ENV TZ=UTC
ENV JAVA_OPTS="-Dpbh.release=docker -Djava.awt.headless=true -Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
ENV JAVA_OPTS="-Dpbh.release=docker -Djava.awt.headless=true -Xmx512M -Xms16M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
WORKDIR /app
VOLUME /tmp
ENTRYPOINT ${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar PeerBanHelper.jar
ENTRYPOINT ["sh", "-c", "${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar PeerBanHelper.jar"]
16 changes: 13 additions & 3 deletions README.EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Automatically block unwanted, leeches and abnormal BT peers with support for cus
![page-views](https://raw.githubusercontent.com/PBH-BTN/views-counter/refs/heads/master/svg/754169590/badge.svg)
## Introduction

Following function are provided by PeerBanHelper:
The following functions are provided by PeerBanHelper:

- [PeerID Blacklist](https://docs.pbh-btn.com/en/docs/module/peer-id)
- [Client Name Blacklist](https://docs.pbh-btn.com/en/docs/module/client-name)
Expand All @@ -19,7 +19,7 @@ Following function are provided by PeerBanHelper:
- [IP set subscribe](https://docs.pbh-btn.com/en/docs/module/ip-address-blocker-rules)
- A modern WebUI

In addition, PeerBanHelper downloads the GeoIP library at startup, and supports the following functions once it successful loaded:
In addition, PeerBanHelper downloads the GeoIP library at startup and supports the following functions once it has been successfully 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.
- Based on GeoIP information, block IP addresses by country/region, city, network type, ASN and so on.
- View GeoIP statistics
Expand All @@ -34,7 +34,7 @@ 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 **(deprecated3.00-20 or higher)**
- Transmission **(deprecated; 3.00-20 or higher)**
- BitComet **v2.10 Beta6 [20240928] or higher** (P2SP LTSeed mode is not supported)


Expand Down Expand Up @@ -68,12 +68,22 @@ 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)

## Tools

In the development process of PeerBanHelper, we have used many excellent professional tools. Thanks to the following companies or projects for providing open-source licenses:

### 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)

### JProfiler

PeerBanHelper use [JProfiler all-in one Java profiler](https://www.ej-technologies.com/jprofiler) to analyze and optimize the program. Thanks the open-source license provided by ej-technolgies. Click the link or the image below to download JProfiler.

[![JProfiler](https://www.ej-technologies.com/images/product_banners/jprofiler_large.png)](https://www.ej-technologies.com/jprofiler)

## Credit

### Backend
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,22 @@ PeerBanHelper 仅支持对传统 IPv4 或 IPv6 地址的反吸血,如遇 I2P

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

## Tools

在 PeerBanHelper 的开发过程中,我们使用到了许多优秀的专业工具。感谢下面的公司或项目慷慨的提供开源许可证:

### 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)

### JProfiler

PeerBanHelper 使用 [JProfiler all-in one Java profiler](https://www.ej-technologies.com/jprofiler) 对程序进行性能分析与优化。感谢 ej-technolgies 的开放源代码许可证。点击链接或者下面的图片下载 JProfiler。

[![JProfiler](https://www.ej-technologies.com/images/product_banners/jprofiler_large.png)](https://www.ej-technologies.com/jprofiler)

## Credit

### Backend
Expand Down
42 changes: 24 additions & 18 deletions install4j/project.install4j
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<install4j version="11.0.1" transformSequenceNumber="11">
<directoryPresets config="target/PeerBanHelper.jar" />
<application name="PeerBanHelper" applicationId="7121-2388-2769-9582" mediaDir="./output" lzmaCompression="true" shortName="PeerBanHelper" publisher="PBH-BTN Community" publisherWeb="https://github.com/PBH-BTN" version="7.0.0" allPathsRelative="true" backupOnSave="true" autoSave="true" convertDotsToUnderscores="false" convertSpacesToUnderscores="false" macVolumeId="6106cfe6eb875954" javaMinVersion="23" javaMaxVersion="24">
<application name="PeerBanHelper" applicationId="7121-2388-2769-9582" mediaDir="./output" lzmaCompression="true" shortName="PeerBanHelper" publisher="PBH-BTN Community" publisherWeb="https://github.com/PBH-BTN" version="7.3.0" allPathsRelative="true" backupOnSave="true" autoSave="true" convertDotsToUnderscores="false" convertSpacesToUnderscores="false" macVolumeId="6106cfe6eb875954" javaMinVersion="23" javaMaxVersion="24">
<languages languageSelectionInPrincipalLanguage="true">
<principalLanguage id="zh_CN" customLocalizationFile="./lang/custom.utf8" />
<additionalLanguages>
Expand All @@ -12,6 +12,8 @@
<variable name="registerSystemService" value="registerSystemService" />
<variable name="jarPath" value="../target/PeerBanHelper.jar" />
<variable name="librariesPath" value="../target/libraries" />
<variable name="startupFlagPlatform" value="-Xmx512M -Xms16M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j" separatorConversion="target" />
<variable name="startupFlagPlatformNoGUI" value="-Xmx512M -Xms16M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j -Djava.awt.headless=true" separatorConversion="target" />
</variables>
<jreBundles jdkProviderId="Liberica" release="23/23.0.1+13" />
</application>
Expand All @@ -37,7 +39,7 @@
<executable name="PeerBanHelper-GUI" iconSet="true" executableDir="." redirectStdout="true" executableMode="gui" changeWorkingDirectory="false" singleInstance="true" checkConsoleParameter="true">
<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" />
</executable>
<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 -Dlauncher.directory=${launcher:sys.launcherDirectory}">
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="${compiler:startupFlagPlatform}">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
Expand All @@ -51,7 +53,7 @@
<executable name="PeerBanHelper-GUI-Silent" iconSet="true" executableDir="." redirectStdout="true" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
<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" />
</executable>
<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 -Dlauncher.directory=${launcher:sys.launcherDirectory}" arguments="silent">
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="${compiler:startupFlagPlatform}" arguments="silent">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
Expand All @@ -65,7 +67,7 @@
<executable name="PeerBanHelper-NoGUI" iconSet="true" executableDir="." redirectStderr="false" executableMode="console" singleInstance="true" checkConsoleParameter="true">
<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" />
</executable>
<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 -Dlauncher.directory=${launcher:sys.launcherDirectory}" arguments="nogui">
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="${compiler:startupFlagPlatformNoGUI}" arguments="nogui">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
Expand All @@ -79,7 +81,7 @@
<executable name="PeerBanHelper-Service" iconSet="true" executableDir="." redirectStderr="false" stderrFile="~/PeerBanHelper/error.log" stdoutFile="~/PeerBanHelper/output.log" executableMode="service" singleInstance="true" checkConsoleParameter="true">
<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" />
</executable>
<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 -Dlauncher.directory=${launcher:sys.launcherDirectory}" arguments="nogui">
<java mainClass="com.ghostchu.peerbanhelper.MainJumpLoader" vmParameters="${compiler:startupFlagPlatformNoGUI}" arguments="nogui">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
Expand All @@ -93,7 +95,7 @@
<executable name="PeerBanHelper-Updater" iconSet="true" executableDir="." failOnStderrOutput="false" executableMode="gui" singleInstance="true" checkConsoleParameter="true">
<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" />
</executable>
<java mainClass="com.ghostchu.peerbanhelper.MainEmpty" vmParameters="-Xmx512M -Xss512k -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps -Dfile.encoding=UTF-8 -Dpbh.usePlatformConfigLocation=true -Dpbh.release=install4j -Dlauncher.directory=${launcher:sys.launcherDirectory}">
<java mainClass="com.ghostchu.peerbanhelper.MainEmpty" vmParameters="${compiler:startupFlagPlatform}">
<classPath>
<scanDirectory location="libraries" failOnError="false" />
<archive location="PeerBanHelper.jar" failOnError="false" />
Expand Down Expand Up @@ -285,18 +287,6 @@ return true;
</screen>
<screen id="15" beanClass="com.install4j.runtime.beans.screens.InstallationScreen" rollbackBarrier="true" rollbackBarrierExitCode="0">
<actions>
<action id="121" beanClass="com.install4j.runtime.beans.actions.files.DeleteFileAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
<serializedBean>
<property name="files" type="array" class="java.io.File" length="1">
<element index="0">
<object class="java.io.File">
<string>libraries</string>
</object>
</element>
</property>
<property name="recursive" type="boolean" value="true" />
</serializedBean>
</action>
<action id="17" beanClass="com.install4j.runtime.beans.actions.InstallFilesAction" actionElevationType="elevated" rollbackBarrierExitCode="0" failureStrategy="quit" errorMessage="${i18n:FileCorrupted}" />
<action id="18" beanClass="com.install4j.runtime.beans.actions.desktop.CreateProgramGroupAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
<serializedBean>
Expand Down Expand Up @@ -441,7 +431,23 @@ return console.askYesNo(message, true);
</screen>
<screen id="27" beanClass="com.install4j.runtime.beans.screens.UninstallationScreen" rollbackBarrierExitCode="0">
<actions>
<action id="246" beanClass="com.install4j.runtime.beans.actions.services.StopServiceAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
<serializedBean>
<property name="launcherId" type="string">70</property>
</serializedBean>
</action>
<action id="29" beanClass="com.install4j.runtime.beans.actions.UninstallFilesAction" actionElevationType="elevated" rollbackBarrierExitCode="0" />
<action id="247" beanClass="com.install4j.runtime.beans.actions.files.DeleteFileAction" actionElevationType="elevated" rollbackBarrierExitCode="0">
<serializedBean>
<property name="files" type="array" class="java.io.File" length="1">
<element index="0">
<object class="java.io.File">
<string>libraries</string>
</object>
</element>
</property>
</serializedBean>
</action>
</actions>
<formComponents>
<formComponent id="28" beanClass="com.install4j.runtime.beans.formcomponents.ProgressComponent">
Expand Down
Loading

0 comments on commit 4d0cdf3

Please sign in to comment.