Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v7.4.4 #1011

Merged
merged 64 commits into from
Mar 7, 2025
Merged

v7.4.4 #1011

merged 64 commits into from
Mar 7, 2025

Conversation

Ghost-chu
Copy link
Collaborator

@Ghost-chu Ghost-chu commented Mar 1, 2025

新增功能

  1. 实验性的通知推送渠道 Bark @Ghost-chu

默认配置文件更改

  1. 去除默认配置文件中重复的 ULA IP CIDR 范围 @thrive7776 @Gaojianli
  2. 更新 profile.yml 中有关 IPV6 地址的规则以适应当前反吸血网络环境 @Ghost-chu
  3. 更新配置文件的 BTN 服务器地址到新服务器地址,旧的地址将在未来停用 @Ghost-chu

错误修复

  1. 修正拼写错误 @CreeperAWA
  2. 修复自动生成的 Portable 批处理文件换行符被错误替换为 LF 而不是 CRLF 的问题,这导致在 Windows 平台上 Portable 包的启动脚本出现语法错误 @Gaojianli
  3. 修复 Windows 平台下,部分系统在启动时因无法释放 EcoQosAPI 所需的动态链接库导致崩溃的问题 @Ghost-chu
  4. 修复部分用户使用 PTR Blacklist 时出现 java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException 异常的问题。@Ghost-chu
  5. [WebUI] 修复封禁列表中 IPV6 地址主机地址部分没有按标准规范使用 [] 方括号对括起的问题 @Gaojianli

优化和更改

  1. 减少封禁检查过程中消耗的 RAM 并限制并发检查数量(默认 32),缓解大量 Peers 的情况下可能导致 PBH 耗尽堆内存卡死的问题,作为交换,循环检查性能可能略有下降 @Ghost-chu

杂项

  1. 更新过期的构建脚本 @AstroProfundis @Gaojianli
  2. 更新 install4j 捆绑 Java 补丁版本 @Ghost-chu

Sparkle Tracker (Trunker) 更改

新增功能

  1. 新增 WebTorrents 支持,地址为:wss://tracker.ghostchu-services.top/announce @Gaojianli

CreeperAWA and others added 30 commits February 1, 2025 13:23
This reverts commit 5e3c93a.
Bumps [org.springframework:spring-context](https://github.com/spring-projects/spring-framework) from 6.2.2 to 6.2.3.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](spring-projects/spring-framework@v6.2.2...v6.2.3)

---
updated-dependencies:
- dependency-name: org.springframework:spring-context
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
…work-spring-context-6.2.3

Bump org.springframework:spring-context from 6.2.2 to 6.2.3
Fixes #934 -修复"进度作弊检查“下面有个选项文字错误
renovate bot and others added 10 commits March 1, 2025 18:36
(cherry picked from commit ccab2fe)
(cherry picked from commit 74d2d7e)
(cherry picked from commit 507881b)
(cherry picked from commit 58ea5c1)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 49ef723)
@Ghost-chu
Copy link
Collaborator Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Mar 1, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@Ghost-chu Ghost-chu added the on-hold Issue/PR 暂时挂起,不要关闭/合并 label Mar 1, 2025
@Ghost-chu
Copy link
Collaborator Author

@Gaojianli 有个新的 Bark 推送渠道

type 是 bark
只有一个 device_key 的字符串参数

@coderabbitai coderabbitai bot added backend This is a backend related bug 程序错误,有什么东西无法正常工作 webui This is a webui related labels Mar 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (8)
.github/workflows/build_maven.yml (1)

14-14: 更新 Maven 构建依赖

Maven 构建现在依赖于 WebUI 和 JNI 作业的完成,确保构建过程中包含所有必要的组件。

根据 YAMLlint 提示,逗号后应该有更多空格,建议修改为:

-    needs: [WebUI,JNI]
+    needs: [WebUI, JNI]
🧰 Tools
🪛 YAMLlint (1.35.1)

[warning] 14-14: too few spaces after comma

(commas)

pkg/portable/4. Low-memory Mode (May cost more CPU and disk) .bat (1)

1-4: 添加低内存模式批处理文件

这个新的批处理文件提供了一种在内存资源有限的系统上运行应用程序的方式,通过配置较小的堆大小和其他优化参数来减少内存使用。

第2行中的"Low-Memeory"有拼写错误,应该修改为"Low-Memory"。

-title PeerBanHelper (Console, Low-Memeory Mode)
+title PeerBanHelper (Console, Low-Memory Mode)

此外,这个批处理文件中的 JVM 参数设置非常详细,建议考虑添加注释说明各参数的作用,以便将来维护。

考虑将通用的 JVM 参数抽取到一个共享的配置文件中,以便在不同的启动脚本之间保持一致性,并减少维护负担。

.github/workflows/build_jni.yml (1)

31-31: 文件末尾缺少换行符

按照 YAML 文件的最佳实践,文件的末尾应该有一个换行符。

 path: cpp-src/*.dll
+
🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 31-31: no new line character at the end of file

(new-line-at-end-of-file)

src/main/java/com/ghostchu/peerbanhelper/PeerBanHelperServer.java (1)

642-655: 添加并发限制,有效避免高负载时内存耗尽问题

引入 Semaphore 来限制并发检查数量是一个很好的优化。通过将并行度限制在可用处理器数量和配置值(默认32)中的较小值,可以在保证性能的同时避免内存耗尽。使用 finally 块确保信号量总是被释放,防止潜在的死锁。

由于代码中删除了原先可能存在的异常重新抛出逻辑,现在只记录错误但不再传播异常。建议添加更详细的错误处理逻辑或者向上层报告严重错误,以便系统能够更好地响应错误情况。

try {
    semaphore.acquire();
    CheckResult checkResult = checkBan(torrent, peer, downloader);
    details.add(new BanDetail(torrent, peer, checkResult, checkResult.duration()));
} catch (Exception e) {
-    log.error("Unexpected error occurred while checking bans", e);
+    log.error("Unexpected error occurred while checking bans for peer: {}, torrent: {}", 
+             peer.getPeerAddress(), torrent.getName(), e);
+    // 考虑添加指标统计错误数量
+    // metrics.recordCheckError();
} finally {
    semaphore.release();
}
Dockerfile (1)

1-13: 优化了构建流程,增加了多阶段构建方式。

将构建过程分离到单独的构建阶段有助于减小最终镜像的大小,提高构建效率。多阶段构建是Docker的最佳实践。

.github/workflows/jvm-ci.yml (1)

156-191: 新建 Build_Docker_Standalone 任务存在一定重复逻辑。
当前配置与 Build_Docker 任务较为相似,后续可考虑提取共同步骤至单独的可复用工作流以减少维护成本。

src/main/java/com/ghostchu/peerbanhelper/push/impl/BarkPushProvider.java (1)

62-78: push 方法可考虑增加更多健壮性处理。
当前仅在非 200 响应时抛异常,若希望对网络超时、连接中断等情况进行更精细的处理或重试机制,建议进一步完善异常处理逻辑。

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskTorrentResponse.java (1)

1-86: 考虑使用记录类简化数据传输对象

如果你使用的是Java 16+,可以考虑将这些DTO类转换为记录类(record)。记录类可以减少模板代码,并且在内存使用上更高效。

-    @NoArgsConstructor
-    @Data
-    public static class TaskStatusDTO {
-        @SerializedName("status")
-        private String status;
-        @SerializedName("dl_size")
-        private long dlSize;
-        @SerializedName("up_size")
-        private long upSize;
-        @SerializedName("total_size")
-        private long totalSize;
-        @SerializedName("download_permillage")
-        private short downloadPermillage;
-    }
+    public static record TaskStatusDTO(
+        @SerializedName("status") String status,
+        @SerializedName("dl_size") long dlSize,
+        @SerializedName("up_size") long upSize,
+        @SerializedName("total_size") long totalSize,
+        @SerializedName("download_permillage") short downloadPermillage
+    ) {}

这将进一步减少内存使用,并使代码更加简洁。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c362445 and db25174.

⛔ Files ignored due to path filters (3)
  • src/main/resources/native/windows/ghost-common-jni_vc2015_aarch64.dll is excluded by !**/*.dll
  • src/main/resources/native/windows/ghost-common-jni_vc2015_amd64.dll is excluded by !**/*.dll
  • webui/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (35)
  • .gitattributes (1 hunks)
  • .github/dependabot.yml (0 hunks)
  • .github/workflows/build_jni.yml (1 hunks)
  • .github/workflows/build_maven.yml (1 hunks)
  • .github/workflows/jvm-ci.yml (5 hunks)
  • .github/workflows/jvm-release.yml (8 hunks)
  • Dockerfile (1 hunks)
  • build.sh (1 hunks)
  • cpp-src/build.txt (1 hunks)
  • install4j/project.install4j (2 hunks)
  • pkg/portable/1. GUI Mode.bat (1 hunks)
  • pkg/portable/2. GUI mode (slient).bat (1 hunks)
  • pkg/portable/3. Console.bat (1 hunks)
  • pkg/portable/4) 以控制台模式启动 (低内存模式,可能使用更多 CPU 和磁盘 IO).bat (1 hunks)
  • pkg/portable/4. Low-memory Mode (May cost more CPU and disk) .bat (1 hunks)
  • pom.xml (5 hunks)
  • src/main/java/com/ghostchu/lib/jni/EcoMode.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/PeerBanHelperServer.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/config/MainConfigUpdateScript.java (2 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskListResponse.java (0 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskPeersResponse.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskTorrentResponse.java (2 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/QBittorrentPeer.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/enhanced/QBittorrentEEPeer.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/push/PushManager.java (3 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/push/impl/BarkPushProvider.java (1 hunks)
  • src/main/java/com/ghostchu/peerbanhelper/util/dns/DNSLookup.java (3 hunks)
  • src/main/resources/config.yml (2 hunks)
  • src/main/resources/profile.yml (3 hunks)
  • webui/package.json (2 hunks)
  • webui/src/views/settings/components/profile/components/progressCheatBlocker.vue (1 hunks)
  • webui/src/views/settings/components/profile/locale/en-US.ts (1 hunks)
  • webui/src/views/settings/components/profile/locale/zh-CN.ts (1 hunks)
  • webui/tsconfig.app.json (0 hunks)
  • webui/tsconfig.node.json (0 hunks)
💤 Files with no reviewable changes (4)
  • .github/dependabot.yml
  • webui/tsconfig.app.json
  • webui/tsconfig.node.json
  • src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskListResponse.java
✅ Files skipped from review due to trivial changes (9)
  • .gitattributes
  • cpp-src/build.txt
  • webui/src/views/settings/components/profile/components/progressCheatBlocker.vue
  • pkg/portable/3. Console.bat
  • pkg/portable/2. GUI mode (slient).bat
  • pkg/portable/1. GUI Mode.bat
  • src/main/resources/config.yml
  • pom.xml
  • pkg/portable/4) 以控制台模式启动 (低内存模式,可能使用更多 CPU 和磁盘 IO).bat
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/workflows/build_maven.yml

[warning] 14-14: too few spaces after comma

(commas)

.github/workflows/build_jni.yml

[error] 31-31: no new line character at the end of file

(new-line-at-end-of-file)

🪛 Shellcheck (0.10.0)
build.sh

[warning] 7-7: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)


[warning] 10-10: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.

(SC2164)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Generate Installers / install4jc
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (44)
webui/src/views/settings/components/profile/locale/zh-CN.ts (1)

68-68: 修改看起来正确

这个变更将"封禁持续时间"替换为"使用全局封禁时间",与整体配置策略保持一致。这样可以确保进度作弊检查模块使用全局定义的封禁时间,而不是独立设置的时间。

webui/src/views/settings/components/profile/locale/en-US.ts (1)

74-75: 修改看起来正确

这个英文翻译变更与中文版本保持一致,将"Ban Duration"替换为"Use global ban duration"。这确保了两种语言版本的用户界面保持一致性,同时反映了系统从独立设置的封禁时间向使用全局封禁时间的转变。

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/QBittorrentPeer.java (1)

24-40: 优化了数据类型以减少内存占用

将包装类型(Long、Integer、Double)修改为原始类型(long、int、double)是一个很好的改进。这种变更有以下优点:

  1. 减少内存占用:原始类型比包装类型占用更少的内存,特别是在处理大量Peer对象时,这可以显著降低内存消耗。
  2. 提高性能:避免了自动装箱和拆箱操作,可以提高代码执行效率。
  3. 消除空指针风险:原始类型不能为null,避免了在处理这些属性时可能出现的NullPointerException。

这些改动与PR目标中提到的"优化以减少RAM消耗"完全一致。

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/qbittorrent/impl/enhanced/QBittorrentEEPeer.java (4)

23-41: 优化了数据类型以减少内存占用

将包装类型(Long、Integer、Double)修改为原始类型(long、int、double)是一个很好的改进。这种变更有以下优点:

  1. 减少内存占用:原始类型比包装类型占用更少的内存,特别是在处理大量Peer对象时,这可以显著降低内存消耗。
  2. 提高性能:避免了自动装箱和拆箱操作,可以提高代码执行效率。
  3. 消除空指针风险:原始类型不能为null,避免了在处理这些属性时可能出现的NullPointerException。

这些改动与PR目标中提到的"优化以减少RAM消耗"完全一致。


44-44: 注意:shadowBanned字段仍然使用Boolean包装类型

虽然其他数值类型字段都已更改为原始类型,但shadowBanned字段仍然使用Boolean包装类型而不是boolean原始类型。这可能是有意为之,因为该字段可能需要表示三种状态(true、false、null)。

如果shadowBanned字段不需要为null(即只需要表示true或false两种状态),建议考虑也将其更改为原始类型boolean,以保持一致性并进一步减少内存占用。

请确认shadowBanned字段是否确实需要保持为Boolean包装类型(是否存在需要表示"未知"状态的场景)。


103-103: 逻辑表达式与父类保持一致

isHandshaking()方法中的逻辑表达式dlSpeed <= 0 && upSpeed <= 0与父类中的实现一致。这种一致性很好,确保了行为的统一,便于维护。


122-138: toString方法更新反映了类结构的变化

toString方法中的输出字符串反映了当前类的字段结构,已经正确地删除了被移除的字段(country、countryCode、flagsDesc和relevance)。保持toString方法与类结构同步是良好的实践。

src/main/java/com/ghostchu/lib/jni/EcoMode.java (2)

31-31: 改进了错误处理以捕获更广泛的异常类型

Exception 更改为 Throwable 可以捕获更多类型的异常,包括 Error 和其他未检查异常,这有助于解决 Windows 平台上由于无法在启动时释放 EcoQosAPI 所需的动态链接库而导致的崩溃问题。


37-39: 增强了错误处理机制

添加了对 setEcoMode 方法调用的 Throwable 捕获,这可以防止任何未处理的错误影响应用程序的稳定性。代码正确地返回 false 以指示操作失败。

src/main/java/com/ghostchu/peerbanhelper/config/MainConfigUpdateScript.java (2)

9-9: 导入 List 接口以支持新添加的方法

为支持新的 updateBtnNetworkAddress 方法中使用的 List.of() 操作而添加的必要导入。


33-48:

❓ Verification inconclusive

更新 BTN 网络地址配置

新增的更新脚本会检测并替换过时的 BTN 网络地址。这与 PR 描述中提到的"修改配置文件中的 BTN 服务器地址为新服务器,旧地址将在未来被弃用"的目标一致。

代码使用了 Java 9+ 的 List.of() 方法创建不可变列表,并正确处理了配置更新逻辑。


🏁 Script executed:

#!/bin/bash
# 检查配置文件中是否已更新 BTN 服务器地址
rg -A 2 "btn.config-url" src/main/resources/config.yml

Length of output: 54


更新 BTN 网络地址配置 - 请手动确认配置项引用

  • 更新脚本逻辑整体正确,使用了 Java 9+ 的 List.of() 创建不可变列表,并完成了将过时的 BTN 地址更新为新地址的操作。
  • 需要注意:根据对配置文件 src/main/resources/config.yml 的初步搜索,目前没有找到 btn.config-url 的引用。建议开发者在全代码库中使用搜索工具确认该配置项是否定义在其他位置或由其他方式加载,以确保更新能生效。
.github/workflows/build_maven.yml (3)

11-12: 添加 JNI 构建作业

增加了 JNI 构建工作流,这将确保 Windows 平台上需要的本地库能够正确编译。这与 PR 中提到的"更新过时的构建脚本"目标一致。


19-20: 为 WebUI 文件下载步骤添加名称

为操作添加名称增加了工作流的可读性,这是一个良好的实践。


23-28: 添加 JNI 库下载步骤

这个新增步骤确保 JNI 库被下载并放置在正确的位置,以便包含在最终的构建中。配置是合理的,包括模式匹配和合并多个工件的选项。

.github/workflows/build_jni.yml (1)

1-31: 引入新的 JNI 构建工作流文件,用于编译 C++ 库

工作流配置合理且完善,使用了矩阵策略分别为 x64 和 ARM64 构建,确保了良好的跨平台支持。使用 TheMrMilchmann/setup-msvc-dev@v3 动作设置 MSVC 开发环境,并根据架构生成不同的输出文件是个很好的做法。

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 31-31: no new line character at the end of file

(new-line-at-end-of-file)

src/main/java/com/ghostchu/peerbanhelper/util/dns/DNSLookup.java (3)

24-25: 改进 DNS 解析器初始化,添加启动完成标志

使用 volatile 修饰符确保了在多线程环境中的可见性,添加 bootComplete 标志有助于防止在 DNS 解析器未正确初始化时执行查询。


40-53: 增强 DNS 解析器初始化的错误处理

使用 try-catch 块包装 DNS 服务器查找过程,并在发生异常时设置 bootComplete 为 false,这有效改进了错误处理逻辑,防止在 DNS 系统未正确初始化时执行查询操作。


78-80: 添加 DNS 解析器状态检查,防止未初始化时执行查询

在执行 PTR 查询前检查 bootComplete 标志是一个良好的防御性编程实践,可以避免在 DNS 系统未正确初始化时执行查询操作,从而防止潜在的异常和错误。

Dockerfile (1)

22-24: 确保从构建阶段正确复制构建产物。

构建阶段完成后,正确地将构建产物复制到最终镜像中。这种方法避免了将构建工具和依赖包含在最终镜像中,使镜像更精简。

install4j/project.install4j (2)

4-4: 优化压缩配置,提高安装包效率。

lzmaCompression="true"更改为compression="9",明确指定了压缩级别,这可能会影响安装包的大小和解压性能。


19-19: 更新了JRE版本引用。

将JRE bundle版本从23/23.0.1+13更新到23/23.0.2+9,确保使用了更新的JRE版本。

src/main/resources/profile.yml (3)

143-143: 更新了IPv6前缀长度配置,优化了网络环境适配。

将IPv6前缀长度从60修改为56,这将扩大IPv6地址范围,可能更符合当前网络环境中的地址分配方式。


260-260: 调整了自动范围封禁的IPv6前缀长度。

将auto-range-ban模块中IPv6前缀长度从60调整到48,显著扩大了封禁范围。请确认这是有意的改动,因为这可能会影响到更多用户。


280-280: 保持IPv6子网掩码长度一致性。

将多拨检测中的IPv6子网掩码长度也从60调整为56,与其他配置保持一致,有助于统一IPv6地址处理策略。

src/main/java/com/ghostchu/peerbanhelper/push/PushManager.java (3)

4-4: 优化了导入语句,使用通配符导入所有实现类。

使用import com.ghostchu.peerbanhelper.push.impl.*替代单独导入每个实现类,使代码更简洁。


41-41: 添加了对Bark推送服务的支持。

createPushProvider方法中增加了对Bark推送服务的支持,扩展了通知功能。确保已经实现了BarkPushProvider类及其相关方法。

请确保BarkPushProvider类已经实现并且功能正常。


53-53: 为JSON配置方式添加Bark支持。

为JSON配置方式的createPushProvider方法也添加了Bark支持,保持两种配置方式的一致性。

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskPeersResponse.java (2)

47-47: 使用 short 类型需确认数值范围是否安全。
如果 permillage 可能超过 32767,则会发生溢出风险。建议复核该字段在调用端的最大取值,确保 short 类型能满足需求。


64-64: 再次确认 short 类型是否能满足业务场景。
与上一处相同,需确认是否有超出 short 最大值的可能,以避免后续数据不正确。

.github/workflows/jvm-ci.yml (5)

16-39: 各任务名称更具可读性,便于维护。
更改后的名称如 “Build JAR Files”、“Generate Installers” 等,更清晰地标识了每个任务的目的,改进了可维护性。


43-43: “Create Torrent” 任务名称更加直观。
该更名使流程更容易理解,便于团队快速定位相关步骤。


111-111: “Build and Push Docker Images” 任务命名准确。
名称体现出该工作流程的主要职责,提升了可读性。


131-131: 更新 docker/metadata-action 版本需要确认与现有配置兼容性。
请核实新版是否存在破坏性变更或新配置要求。


144-144: 更新 docker/build-push-action 版本时请确认测试完整。
同样需要检验该新版本在实际构建推送过程中是否存在异常。

src/main/java/com/ghostchu/peerbanhelper/push/impl/BarkPushProvider.java (5)

19-27: 构造函数使用不可变字段,有助于保障对象状态稳定。
通过 final 限定可避免外部修改带来的潜在线程安全或状态不一致问题。


29-37: getName 与 getConfigType 命名简洁明了。
方法名直观表达了功能,符合清晰设计原则。


39-50: saveJson 与 saveYaml 方法实现简洁易读。
序列化流程明确且无冗余操作,整体结构清晰可维护。


52-60: 从 JSON 与 YAML 加载配置时,请确保字段兼容性。
若外部传入数据中存在缺失或多余字段,需验证是否会引发潜在异常。建议在反序列化后进行必要的校验。


80-84: Config 内部仅保存一个简单字段,结构合理简洁。
若后续需要更多配置信息,可在此基础上扩展而不影响现有功能。

.github/workflows/jvm-release.yml (2)

11-11: 增强了工作流程可读性

为所有任务添加了描述性名称,使工作流程更具可读性,便于理解每个任务的目的。这是一个很好的改进,有助于新开发人员和维护人员更快地理解工作流程的结构。

Also applies to: 25-25, 31-31, 38-38, 43-43, 48-48, 53-53, 60-60, 79-79, 86-86, 171-171


201-201: 更新了Docker Actions版本

将docker/metadata-action从v5.6.1更新到v5.7.0,docker/build-push-action从v6.13.0更新到v6.15.0。更新到最新版本是个好习惯,有助于获取bug修复和新功能。

建议:创建一个定期检查并更新Actions版本的流程,以保持工作流的最新状态。

Also applies to: 214-214, 236-236, 249-249

src/main/java/com/ghostchu/peerbanhelper/downloader/impl/bitcomet/resp/BCTaskTorrentResponse.java (1)

53-53: 优化内存使用

downloadPermillagepermillage字段从Long/long (64位)更改为short (16位)类型,这是一个很好的内存优化。permillage值范围通常为0-1000,使用short类型完全足够,并且可以显著减少内存占用。

此更改与PR目标中提到的"减少RAM消耗"保持一致,特别是在检查具有大量peers的情况下非常有效。

Also applies to: 83-83

webui/package.json (2)

20-24: 主要依赖升级

成功升级了核心依赖包,包括:

  • @formatjs/intl-durationformat 从 ^0.7.2 到 ^0.7.3
  • @octokit/core 从 ^6.1.3 到 ^6.1.4
  • @vueuse/core 从 ^12.3.0 到 ^12.7.0
  • pinia 从 ^2.1.7 到 ^3.0.1 (这是一个主要版本升级)
  • uuid 从 ^9.0.1 到 ^11.1.0 (这是一个主要版本升级)
  • vue-i18n 从 ^9.10.2 到 ^11.1.1 (这是一个主要版本升级)

对于主要版本升级 (pinia, uuid, vue-i18n),请确保已经测试过应用程序,因为这些可能包含破坏性变更。

Also applies to: 36-38, 41-41


47-74: 开发依赖升级

成功升级了大量开发依赖,保持了项目工具链的最新状态。特别是以下更新:

  • TypeScript 从 ~5.6.3 到 ~5.7.3
  • ESLint 相关包升级
  • Vite 从 ^6.0.6 到 ^6.1.1

这些更新有助于获取最新的开发工具功能、bug修复和安全更新。

建议:考虑实施自动化依赖更新检查工作流程,例如使用Renovate或类似工具,以保持依赖的最新状态。

@Ghost-chu Ghost-chu merged commit a04887a into release Mar 7, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This is a backend related bug 程序错误,有什么东西无法正常工作 on-hold Issue/PR 暂时挂起,不要关闭/合并 webui This is a webui related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants