Skip to content

Commit

Permalink
Merge branch 'master' into config-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ghost-chu authored Oct 15, 2024
2 parents cd51485 + 1a97536 commit 54835f2
Show file tree
Hide file tree
Showing 113 changed files with 3,977 additions and 1,036 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/any_other.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: '任何其它 - Other'
description: '报告其它分类均无关的问题'

title: '[Other] '
labels:
- 'Other'
body:
- type: 'textarea'
attributes:
label: '问题描述 - Issue Description'
description: |-
Describe the problem you encounted.
在此详细的描述你所遇到的问题
validations:
required: true
- type: 'textarea'
attributes:
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: 检查清单 - Check list
description: |-
Check and tick checkboxes that listed below
检查并勾选所有需要勾选的框框
options:
- label: "这不是一个错误 (BUG) (This is not an bug/error)"
required: false
- label: "PeerBanHelper 已更新到最新版本,非最新版本不接受任何错误反馈,任何非最新版本的 Issue 将被 立 刻 关 闭,不会有人给您提供任何支持 (I'm running the latest version of PBH that can be found in Github Relases, non-latest release won't receive any support)"
required: false
- label: "我已检查过 [PBH 文档](https://pbh-btn.github.io/pbh-docs/)(特别是常见问题),且即使使用了搜索也没有找到与此有关的内容 (This not a question/or the question that not listed in README's FAQ or [PBH WIKI](https://pbh-btn.github.io/pbh-docs/))"
required: false
- label: "我同意遵守 PBH-BTN 包容性条约,不发布 “嘲讽、骂战、引战、开盒(有时也称为人肉搜索)、人身攻击、仇恨、暴力、侮辱性言辞、违法违规、黑灰产、危害国家安全、实施或帮助他人实施电信犯罪” 等内容。并已知晓如果仍旧发布了这些内容,我的账号将立刻从包括但不限于 PBH-BTN 组织、社交软件中封禁。所有主题、内容都将被立刻删除或折叠,撤销、删除和收回您所做出的一切贡献,并封禁 BTN 网络的中账号权限、排除您所提交的所有数据。在您违反相关规则时,PBH-BTN 将会将您的注册、登录、和最近访问的 IP 地址、电子邮件地址、以及其它可能追踪您或将您去匿名化的信息从定期删除转为永不删除,并在任何国家或地区的政府、公安机关或有关部门需要时无通知的提供这些数据。 (I agree to abide by the PBH-BTN Inclusivity Pact by not posting content such as “taunting, name-calling, war-mongering, open-boxing (sometimes referred to as mansplaining), personal attacks, hatred, violence, insulting language, illegal activities, black and grey business, endangering national security, and committing or assisting others in committing telecommunication crimes”. I am aware that if I continue to post such content, my account will be immediately banned from organizations including but not limited to PBH-BTN, social software. All topics and content will be immediately deleted or collapsed, all contributions will be revoked, deleted and retracted, and you will be banned from the BTN network and all data you have submitted will be excluded. In the event of a violation of these rules, PBH-BTN will delete your registration, login, and most recent IP address, email address, and any other information that may be used to track you or de-anonymize you from regular to permanent deletion, and will make this data available to the government, public security, or other relevant authorities without notice if they request it, no matter what country or region.)"
required: false
12 changes: 9 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ body:
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)。
请尽可能完整且详细地填写所有表单项,以便我们以最高效率并准确的排查故障和诊断问题
此表单**仅用于反馈错误**,如果是其它类型的反馈,请[点击这里以重新选择](https://github.com/PBH-BTN/PeerBanHelper/issues/new/choose)。
请尽可能完整且详细地填写所有表单项,以便我们以最高效率并准确的排查故障和诊断问题。
**错误填写或者没有仔细检查末尾的检查清单,将导致此 Issue 被立刻关闭。**
**只有最新版本的 PeerBanHelper 才会得到支持,任何非最新版本的 Issue 将被 立 刻 关 闭,不会有人给您提供任何支持** [在此查看最新版本的版本号](https://github.com/PBH-BTN/PeerBanHelper/releases/latest)
- type: 'input'
attributes:
label: '版本号 - Version'
Expand Down Expand Up @@ -70,6 +72,8 @@ body:
required: false
- label: "Transmission"
required: false
- label: "BitComet"
required: false
validations:
required: true
- type: 'textarea'
Expand Down Expand Up @@ -116,7 +120,7 @@ body:
Check and tick checkboxes that listed below
检查并勾选所有需要勾选的框框
options:
- label: "PeerBanHelper 已更新到最新版本,非最新版本不接受任何错误反馈 (I'm running the latest version of PBH that can be found in Github Relases, non-latest release won't receive any support)"
- label: "PeerBanHelper 已更新到最新版本,非最新版本不接受任何错误反馈,任何非最新版本的 Issue 将被 立 刻 关 闭,不会有人给您提供任何支持 (I'm running the latest version of PBH that can be found in Github Relases, non-latest release won't receive any support)"
required: false
- label: "所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))"
required: false
Expand All @@ -126,3 +130,5 @@ body:
required: false
- label: "这不是一个安全漏洞,它可以被安全的公开报告。若需要报告安全漏洞,请[在此报告](https://github.com/PBH-BTN/PeerBanHelper/security/advisories/new) (This not a security related issue, can be safe report in public. If you want report a security exploit, please report it [here](https://github.com/PBH-BTN/PeerBanHelper/security/advisories/new))"
required: false
- label: "我同意遵守 PBH-BTN 包容性条约,不发布 “嘲讽、骂战、引战、开盒(有时也称为人肉搜索)、人身攻击、仇恨、暴力、侮辱性言辞、违法违规、黑灰产、危害国家安全、实施或帮助他人实施电信犯罪” 等内容。并已知晓如果仍旧发布了这些内容,我的账号将立刻从包括但不限于 PBH-BTN 组织、社交软件中封禁。所有主题、内容都将被立刻删除或折叠,撤销、删除和收回您所做出的一切贡献,并封禁 BTN 网络的中账号权限、排除您所提交的所有数据。在您违反相关规则时,PBH-BTN 将会将您的注册、登录、和最近访问的 IP 地址、电子邮件地址、以及其它可能追踪您或将您去匿名化的信息从定期删除转为永不删除,并在任何国家或地区的政府、公安机关或有关部门需要时无通知的提供这些数据。 (I agree to abide by the PBH-BTN Inclusivity Pact by not posting content such as “taunting, name-calling, war-mongering, open-boxing (sometimes referred to as mansplaining), personal attacks, hatred, violence, insulting language, illegal activities, black and grey business, endangering national security, and committing or assisting others in committing telecommunication crimes”. I am aware that if I continue to post such content, my account will be immediately banned from organizations including but not limited to PBH-BTN, social software. All topics and content will be immediately deleted or collapsed, all contributions will be revoked, deleted and retracted, and you will be banned from the BTN network and all data you have submitted will be excluded. In the event of a violation of these rules, PBH-BTN will delete your registration, login, and most recent IP address, email address, and any other information that may be used to track you or de-anonymize you from regular to permanent deletion, and will make this data available to the government, public security, or other relevant authorities without notice if they request it, no matter what country or region.)"
required: false
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: true
blank_issues_enabled: false
# contact_links:
# - name: 'WebUI 错误报告 - WebUI Bug Report'
# about: |-
Expand Down
8 changes: 6 additions & 2 deletions .github/ISSUE_TEMPLATE/web_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ body:
value: |-
## 请注意 - Caution
This form only used for WebUI, for any other cases, please [click here](https://github.com/PBH-BTN/PeerBanHelper/issues/new)
此表单**仅用于反馈WebUI相关错误**,如果是其它类型的反馈,请[点击这里](https://github.com/PBH-BTN/PeerBanHelper/issues/new)。
此表单**仅用于反馈WebUI相关错误**,如果是其它类型的反馈,请[点击这里以重新选择](https://github.com/PBH-BTN/PeerBanHelper/issues/new/choose)。
请尽可能完整且详细地填写所有表单项,以便我们以最高效率并准确的排查故障和诊断问题
- type: 'input'
attributes:
Expand Down Expand Up @@ -65,9 +65,13 @@ body:
Check and tick checkboxes that listed below
检查并勾选所有需要勾选的框框
options:
- label: "PeerBanHelper 已更新到最新版本 (I'm running the latest version of PBH that can be found in Github Relases)"
- label: "PeerBanHelper 已更新到最新版本,非最新版本不接受任何错误反馈,任何非最新版本的 Issue 将被 立 刻 关 闭,不会有人给您提供任何支持 (I'm running the latest version of PBH that can be found in Github Relases, non-latest release won't receive any support)"
required: false
- label: "我已检查过 [PBH 文档](https://pbh-btn.github.io/pbh-docs/)(特别是常见问题),且即使使用了搜索也没有找到与此有关的内容 (This not a question/or the question that not listed in README's FAQ or [PBH WIKI](https://pbh-btn.github.io/pbh-docs/))"
required: false
- label: "我没有检查这个检查清单,只是闭眼选中了所有的复选框,请关闭这个 Issue (I have not read these checkboxes and therefore I just ticked them all, Please close this issue)"
required: false
- label: "所添加的下载器已满足 README 中的前置要求(如版本号和插件)(The downloaders that I've added already satisfied the requirements (E.g install plugins/adapters))"
required: false
- label: "我同意遵守 PBH-BTN 包容性条约,不发布 “嘲讽、骂战、引战、开盒(有时也称为人肉搜索)、人身攻击、仇恨、暴力、侮辱性言辞、违法违规、黑灰产、危害国家安全、实施或帮助他人实施电信犯罪” 等内容。并已知晓如果仍旧发布了这些内容,我的账号将立刻从包括但不限于 PBH-BTN 组织、社交软件中封禁。所有主题、内容都将被立刻删除或折叠,撤销、删除和收回您所做出的一切贡献,并封禁 BTN 网络的中账号权限、排除您所提交的所有数据。在您违反相关规则时,PBH-BTN 将会将您的注册、登录、和最近访问的 IP 地址、电子邮件地址、以及其它可能追踪您或将您去匿名化的信息从定期删除转为永不删除,并在任何国家或地区的政府、公安机关或有关部门需要时无通知的提供这些数据。 (I agree to abide by the PBH-BTN Inclusivity Pact by not posting content such as “taunting, name-calling, war-mongering, open-boxing (sometimes referred to as mansplaining), personal attacks, hatred, violence, insulting language, illegal activities, black and grey business, endangering national security, and committing or assisting others in committing telecommunication crimes”. I am aware that if I continue to post such content, my account will be immediately banned from organizations including but not limited to PBH-BTN, social software. All topics and content will be immediately deleted or collapsed, all contributions will be revoked, deleted and retracted, and you will be banned from the BTN network and all data you have submitted will be excluded. In the event of a violation of these rules, PBH-BTN will delete your registration, login, and most recent IP address, email address, and any other information that may be used to track you or de-anonymize you from regular to permanent deletion, and will make this data available to the government, public security, or other relevant authorities without notice if they request it, no matter what country or region.)"
required: false
1 change: 1 addition & 0 deletions .github/workflows/build_fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ defaults:

jobs:
build:
name: Build WebUI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: FreeBSD pkg Package Build

on:
workflow_call:
jobs:
pkg:
strategy:
matrix:
version: [13.4, 14.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: java_info
uses: YunaBraska/java-info-action@main
- uses: actions/download-artifact@v4
with:
name: maven-dist
path: target/
- name: Replace pkg version
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
sed -i "s/<version>/v${{ env.PBH_VERSION }}/g" pkg/pkg/+MANIFEST
env:
PBH_VERSION: ${{ steps.java_info.outputs.project_version }}
- name: Build FreeBSD pkg
uses: vmactions/freebsd-vm@v1
with:
usesh: true
release: ${{ matrix.version }}
run: |
mkdir -p pkg/pkg/work-dir/usr/local/lib/peerbanhelper
mkdir -p pkg/pkg/work-dir/usr/local/var/db/peerbanhelper/
cp target/PeerBanHelper.jar pkg/pkg/work-dir/usr/local/lib/peerbanhelper/
pkg create -m pkg/pkg/ -r pkg/pkg/work-dir -p pkg/pkg/pkg-plist -o pkg/
pkg info -F pkg/peerbanhelper-v${{ env.PBH_VERSION }}.pkg
mv pkg/peerbanhelper-v${{ env.PBH_VERSION }}.pkg pkg/peerbanhelper-v${{ env.PBH_VERSION }}-$(uname -o)-$(uname -r).pkg
env:
PBH_VERSION: ${{ steps.java_info.outputs.project_version }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: freebsd-pkg-${{ matrix.version }}-dist
path: |
pkg/*.pkg
3 changes: 2 additions & 1 deletion .github/workflows/build_spk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ jobs:
with:
name: spk-dist
path: |
/toolkit/build_env/ds.apollolake-7.2/image/packages/*.spk
/toolkit/build_env/ds.apollolake-7.2/image/packages/*.spk
!/toolkit/build_env/ds.apollolake-7.2/image/packages/*_debug.spk
5 changes: 4 additions & 1 deletion .github/workflows/jvm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
Build_DEB:
needs: CI
uses: ./.github/workflows/build_deb.yml
Build_PKG:
needs: CI
uses: ./.github/workflows/build_pkg.yml
Build_Docker:
needs: CI
runs-on: ubuntu-latest
Expand Down Expand Up @@ -60,7 +63,7 @@ jobs:
type=raw,ci
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/jvm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ jobs:
Build_DEB:
needs: Build_Executable
uses: ./.github/workflows/build_deb.yml
Build_PKG:
needs: Build_Executable
uses: ./.github/workflows/build_pkg.yml
Upload_Artifacts:
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB]
needs: [Build_Executable, Build_Installers, Build_SPK, Build_DEB, Build_PKG]
permissions:
contents: write
checks: write
Expand Down Expand Up @@ -67,11 +70,19 @@ jobs:
with:
name: deb-dist
path: target/media
- uses: actions/download-artifact@v4
with:
name: freebsd-pkg-13.4-dist
path: target/media
- uses: actions/download-artifact@v4
with:
name: freebsd-pkg-14.1-dist
path: target/media
- uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["target/PeerBanHelper.jar", "target/media/PeerBanHelper_*", "target/media/peerbanhelper_*", "target/media/*.spk"]'
asset_paths: '["target/PeerBanHelper.jar", "target/media/PeerBanHelper_*", "target/media/peerbanhelper_*", "target/media/peerbanhelper-*"]'
Build_Docker:
permissions:
contents: write
Expand Down Expand Up @@ -114,7 +125,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile
Expand Down Expand Up @@ -150,7 +161,7 @@ jobs:
type=raw,latest
type=sha
- name: Build and push Aliyun ACR
uses: docker/build-push-action@v6.7.0
uses: docker/build-push-action@v6.9.0
with:
context: .
file: ./Dockerfile-Release
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
/.nb-gradle
build/
!**/src/main/**/build/
!**/src/test/**/build/
Expand All @@ -46,4 +46,7 @@ build/
/data/

src/main/resources/static
dependency-reduced-pom.xml
dependency-reduced-pom.xml

PeerBanHelper.jar
*.pkg
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ 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/azul/zulu-openjdk-alpine:21.0.4-21.36-jre
FROM docker.io/eclipse-temurin:23-jre-alpine
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper"
USER 0
ENV TZ=UTC
ENV JAVA_OPTS="-Xmx512M -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
WORKDIR /app
VOLUME /tmp
COPY --from=build build/target/PeerBanHelper.jar /app/PeerBanHelper.jar
ENV PATH="${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
ENTRYPOINT ${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,9 +1,9 @@
FROM docker.io/azul/zulu-openjdk-alpine:21.0.4-21.36-jre
FROM docker.io/eclipse-temurin:23-jre-alpine
LABEL maintainer="https://github.com/PBH-BTN/PeerBanHelper"
COPY target/PeerBanHelper.jar /app/PeerBanHelper.jar
USER 0
ENV TZ=UTC
ENV JAVA_OPTS="-Xmx512M -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+ShrinkHeapInSteps"
WORKDIR /app
VOLUME /tmp
ENV PATH="${JAVA_HOME}/bin:${PATH}"
ENTRYPOINT ["java","-Xmx386M","-XX:+UseG1GC", "-XX:+UseStringDeduplication","-XX:+ShrinkHeapInSteps","-jar","PeerBanHelper.jar"]
ENTRYPOINT ${JAVA_HOME}/bin/java ${JAVA_OPTS} -jar PeerBanHelper.jar
Loading

0 comments on commit 54835f2

Please sign in to comment.