-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PeerBanHelper: Add version 9.2.3 #15764
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
Changes from all commits
8ae34f1
d68f3f8
d4843b4
d798f19
d9bce21
ad13ff1
61581aa
3f2be93
63c2ca9
815874a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| { | ||
| "version": "9.2.3", | ||
| "description": "Automatically block unwanted, leeches and abnormal BT peers with support for customized and cloud rules.", | ||
| "homepage": "https://docs.pbh-btn.com/en/", | ||
| "license": "GPL-3.0-or-later", | ||
| "notes": [ | ||
| "[Tutorial](https://docs.pbh-btn.com/en/docs/category/%E4%B8%8B%E8%BD%BD%E5%99%A8%E9%85%8D%E7%BD%AE)", | ||
| "Console mode can be started via the shell with `peerbanhelper-cli`", | ||
| "or `peerbanhelper-cli-jbr`.", | ||
| "", | ||
| "[教程](https://docs.pbh-btn.com/docs/category/%E4%B8%8B%E8%BD%BD%E5%99%A8%E9%85%8D%E7%BD%AE/)", | ||
| "控制台模式可以在命令行中使用`peerbanhelper-cli`或`peerbanhelper-cli-jbr`启动。", | ||
| "" | ||
| ], | ||
| "suggest": { | ||
| "Java": "java/intellij-jbr25" | ||
| }, | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/PBH-BTN/PeerBanHelper/releases/download/v9.2.3/PeerBanHelper_9.2.3.zip", | ||
| "hash": "ed8a7f4b9e974e15abbd2f353a49180fc7b33a8ac483b7e197778dd05077f2c2" | ||
| }, | ||
| "arm64": { | ||
| "url": "https://github.com/PBH-BTN/PeerBanHelper/releases/download/v9.2.3/PeerBanHelper_9.2.3.zip", | ||
| "hash": "ed8a7f4b9e974e15abbd2f353a49180fc7b33a8ac483b7e197778dd05077f2c2" | ||
| } | ||
| }, | ||
| "extract_dir": "PeerBanHelper", | ||
| "pre_install": [ | ||
| "invoke-RestMethod -Uri \"https://github.com/PBH-BTN/PeerBanHelper/raw/refs/tags/v$version/install4j/icon.ico\" -OutFile \"$dir\\icon.ico\"", | ||
| "", | ||
| "invoke-RestMethod -Uri \"https://github.com/PBH-BTN/PeerBanHelper/raw/refs/tags/v$version/pkg/portable/1.%20GUI%20Mode.bat\" -OutFile \"$dir\\1. GUI Mode.bat\"", | ||
| "invoke-RestMethod -Uri \"https://github.com/PBH-BTN/PeerBanHelper/raw/refs/tags/v$version/pkg/portable/2.%20GUI%20mode%20(silent).bat\" -OutFile \"$dir\\2. GUI mode (silent).bat\"", | ||
| "invoke-RestMethod -Uri \"https://github.com/PBH-BTN/PeerBanHelper/raw/refs/tags/v$version/pkg/portable/3.%20Console.bat\" -OutFile \"$dir\\3. Console.bat\"", | ||
| "", | ||
| "Get-ChildItem -Path \"$dir\" -Filter *.bat -File -Recurse | ForEach-Object {", | ||
| " $file = $_.FullName", | ||
| " $content = Get-Content $file", | ||
| " $newContent = $content `", | ||
| " -replace '^start\\s+\\./jre/bin/java\\.exe', 'java.exe' `", | ||
| " -replace '\\./jre/bin/', '' `", | ||
| " -replace 'PeerBanHelper\\.jar', \"$dir\\PeerBanHelper.jar\"", | ||
| " Set-Content -Path $file -Value $newContent", | ||
| "}", | ||
| "", | ||
| "Get-ChildItem -Path \"$dir\" -Filter *.bat -File -Recurse | ForEach-Object {", | ||
| " $oldFile = $_.FullName", | ||
| " $newFile = $oldFile `", | ||
| " -replace '1\\.\\s+GUI\\s+Mode\\.bat$', 'gui-jbr.bat' `", | ||
| " -replace '2\\.\\s+GUI\\s+mode\\s+\\(silent\\)\\.bat$', 'gui-silent-jbr.bat' `", | ||
| " -replace '3\\.\\s+Console\\.bat$', 'cli-jbr.bat'", | ||
| " Copy-Item $oldFile $newFile", | ||
| " ", | ||
| " $content = Get-Content $newFile", | ||
| " $newContent = $content `", | ||
| " -replace 'java\\.exe', \"$scoopdir/apps/intellij-jbr25/current/bin/java.exe\" `", | ||
| " -replace 'javaw\\.exe', \"$scoopdir/apps/intellij-jbr25/current/bin/javaw.exe\"", | ||
| " Set-Content -Path $newFile -Value $newContent", | ||
| "}" | ||
|
Comment on lines
+46
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hardcoded JBR path will fail if intellij-jbr25 is not installed. The JBR batch files hardcode the path Consider either:
🤖 Prompt for AI Agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PeerBanHelper will prompt a warning message if you didn't start with JBR. I provide these bat as a optional way to start. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @WordlessEcho, thank you for the clarification! That makes sense—the application handles the warning when JBR isn't used, and the 🐰✨ ✏️ Learnings added
|
||
| ], | ||
| "bin": [ | ||
| [ | ||
| "3. Console.bat", | ||
| "peerbanhelper-cli" | ||
| ], | ||
| [ | ||
| "cli-jbr.bat", | ||
| "peerbanhelper-cli-jbr" | ||
| ] | ||
| ], | ||
| "shortcuts": [ | ||
| [ | ||
| "1. GUI Mode.bat", | ||
| "PeerBanHelper/PeerBanHelper", | ||
| "", | ||
| "icon.ico" | ||
| ], | ||
| [ | ||
| "2. GUI mode (silent).bat", | ||
| "PeerBanHelper/PeerBanHelper (Silent)", | ||
| "", | ||
| "icon.ico" | ||
| ], | ||
| [ | ||
| "gui-jbr.bat", | ||
| "PeerBanHelper/PeerBanHelper (JBR)", | ||
| "", | ||
| "icon.ico" | ||
| ], | ||
| [ | ||
| "gui-silent-jbr.bat", | ||
| "PeerBanHelper/PeerBanHelper (Silent, JBR)", | ||
| "", | ||
| "icon.ico" | ||
| ] | ||
| ], | ||
| "persist": "data", | ||
| "checkver": { | ||
| "github": "https://github.com/PBH-BTN/PeerBanHelper" | ||
| }, | ||
| "autoupdate": { | ||
| "architecture": { | ||
| "64bit": { | ||
| "url": "https://github.com/PBH-BTN/PeerBanHelper/releases/download/v$version/PeerBanHelper_$version.zip" | ||
| }, | ||
| "arm64": { | ||
| "url": "https://github.com/PBH-BTN/PeerBanHelper/releases/download/v$version/PeerBanHelper_$version.zip" | ||
| } | ||
| } | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: ScoopInstaller/Extras
Length of output: 4761
🏁 Script executed:
Repository: ScoopInstaller/Extras
Length of output: 713
🏁 Script executed:
Repository: ScoopInstaller/Extras
Length of output: 126
Consider removing pre_install file downloads or adding hash verification.
The icon.ico and batch files are downloaded from GitHub during installation without hash verification, which is unusual in Scoop Extras manifests. While files are currently accessible, this approach lacks integrity protection and depends on tag persistence. Either include these files in the main archive or provide a way to verify their integrity, such as sourcing them from a release asset with published checksums.
🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PeerBanHelper didn't provide these files individual in release. They provide a portable zip with bat and JBR bundle in it causing more 270 MB+ to download.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 1300
🏁 Script executed:
Length of output: 1588
🏁 Script executed:
Length of output: 1840
🏁 Script executed:
Length of output: 3388
@WordlessEcho, I understand the size concern—356 MB is indeed excessive when you only need the JAR. However, downloading files from GitHub raw URLs without hash verification is a security risk and this pattern doesn't exist elsewhere in the Extras bucket.
Since the bat files are simple and have predictable content, I recommend generating them inline in the
pre_installscript instead of downloading them. This eliminates the security concern while keeping the smaller download size. Here's the approach:For the icon:
This approach:
Would you like help converting the current download-and-modify approach to inline generation?
🧠 Learnings used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upstream sometimes change parameters in bat. I believe it is best way to let the upstream maintenance these files.
PBH-BTN/PeerBanHelper@887105a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WordlessEcho, thank you for sharing that commit—I can see upstream does update the JVM parameters regularly (like adding
-XX:+UseCompactObjectHeadersin that change), and keeping the manifest synchronized with those changes would indeed create ongoing maintenance work.I understand your reasoning now. Given the constraints:
Your approach is a pragmatic compromise. While downloading files without hash verification is unusual in the Extras bucket and doesn't align with Scoop's typical security model, I can see this is a trade-off you're making to balance security, download size, and maintenance burden.
The version-tagged URLs do provide some level of consistency, and users installing from the official ScoopInstaller/Extras bucket already place trust in the repository's review process.
I'll note this for context but won't push further on this point. Thank you for the detailed explanation!
🧠 Learnings used