Skip to content

feat(network): 自动代理检测和自定义代理 - #9092

Draft
XiaoYueOwO wants to merge 1 commit into
Meloong-Git:mainfrom
XiaoYueOwO:feat/network-proxy
Draft

feat(network): 自动代理检测和自定义代理#9092
XiaoYueOwO wants to merge 1 commit into
Meloong-Git:mainfrom
XiaoYueOwO:feat/network-proxy

Conversation

@XiaoYueOwO

@XiaoYueOwO XiaoYueOwO commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

为 PCL 实现自定义代理支持

部分代码使用 Grok 4.5 进行编写

Resolve #1228

注:此 PR 将完全覆盖 #8318

原实现 #8318 存在较大问题

由于 PR 作者对类引用和 WebProxy 相关类的理解存在问题,以及对 JVM 属性理解不够深入,因此 #8318 的代理实现将存在以下问题:

  • RequestClient 在创建后无法感知系统代理设置变化

  • 对 JVM 代理采用按协议设置 http.proxy 和 https.proxy

因为 Clash 系软件的 HTTP 代理地址均为明文 http 协议,因此相当于没设(Minecraft Authlib 内编码的服务器地址均是 https 协议)

产生莫名其妙的更改是预期行为,将在 PR 可供审查前进行修正


因为在 PR 内 commit Submodule 会导致 Submodule 更改,而破烂 GitHub 会将其视为无法解决的冲突(即使目标仓库已经更新引用),故本 PR 不会包含 submodule 更新,大部分构建失败请视为预期行为

@XiaoYueOwO
XiaoYueOwO marked this pull request as draft August 1, 2026 17:02
@RyogiMutsuki RyogiMutsuki added · 新功能 社区处理中 社区正在调查或处理该项 labels Aug 1, 2026
@XiaoYueOwO

XiaoYueOwO commented Aug 1, 2026

Copy link
Copy Markdown
Contributor Author

此实现和 PCL CE 采用完全一致的方案,都是监听注册表更改实现动态代理感知

本 PR 依赖的前置实现:Meloong-Git/MeloongCore#14

Oracle 帮助文档对 JVM 代理属性的介绍:https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html

XueL1ng added a commit to PCL-Nex-Developer/PCL2-Nex that referenced this pull request Aug 26, 2026
来源:#9149 #9262 #9267 #9236 #9168 #9092`nhttps://github.com/Meloong-Git/PCL/pull/9149`nhttps://github.com/Meloong-Git/PCL/pull/9262`nhttps://github.com/Meloong-Git/PCL/pull/9267`nhttps://github.com/Meloong-Git/PCL/pull/9236`nhttps://github.com/Meloong-Git/PCL/pull/9168`nhttps://github.com/Meloong-Git/PCL/pull/9092
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

· 新功能 社区处理中 社区正在调查或处理该项

Projects

None yet

Development

Successfully merging this pull request may close these issues.

添加网络代理设置

2 participants