feat(daemon & webpanel): 重构 ChmlFrp 模块以支持新版 OAuth 设备码授权#100
Merged
luluxiaoyu merged 1 commit intoMSLTeam:devfrom Apr 1, 2026
Merged
feat(daemon & webpanel): 重构 ChmlFrp 模块以支持新版 OAuth 设备码授权#100luluxiaoyu merged 1 commit intoMSLTeam:devfrom
luluxiaoyu merged 1 commit intoMSLTeam:devfrom
Conversation
Contributor
|
下次不需要编译前端了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更背景
由于 ChmlFrp 账户系统更新,旧的授权系统已不可用。本次重构适配新版 OAuth 2.0 设备码授权流程。
变更内容
核心变更
代码变更
Daemon
ChmlFrpProxyController.cs(新增)原因:ChmlFrp 更新后的安全设置不允许非 ChmlFrp 的跨域访问,因此只能通过后端代理调用
WebPanel
auth.ts(新增)封装 API 调用、客户端 ID 配置、权限管理等
CreateTunnelDialog.vue(重构)index.vue(重构)适配新版鉴权系统
部署前注意
MSLX.WebPanel/src/pages/frp/createFrp/components/ChmlFrp/auth.ts中的ACCOUNT_OAUTH_CLIENT_ID需要改为在“轻爪账户(account.qzhua.net)”控制台注册的客户端 ID,我在代码中用的是我注册的一个测试ID。轻爪账户控制台账号密码就是ChmlFrp账户密码,直接用ChmlFrp账户密码登录即可。如果有问题可以QQ联系我:242247494 ^ω^客户端信息填写说明
Public Client 设备码授权模式不需要回调地址和登出回调地址,所以这俩可以随变填写或保持默认。
权限域全部选中、客户端类型设置打开(这个开关为开启Public Client模式)、设备码授权打开。
下图为设置图,可以直接照抄 :)

效果展示
设备码生成页面
浏览器授权确认
测试情况