Repository navigation
fix(bangumi): OAuth 登录 WebView 走应用出站代理 - #98
Merged
Merged
Conversation
- 新增 androidx.webkit 1.14.0,用 ProxyController.setProxyOverride 给 Bangumi OAuth 对话框的内置 WebView 应用「出站代理」(WebViewFeature.PROXY_OVERRIDE 门控,进程级 override) - 新增 BangumiOAuthWebViewProxy:CloudDriveAutomationConfig.rssProxy* → http://host:port, localhost/127.0.0.1 bypass 保 OAuth 回环回调直连;apply 异步回调后再 loadUrl,销毁时 clear (含「apply 晚于销毁」竞态处理) - 代理关闭/未配置时保持原直连行为零变化;WebView 不支持 PROXY_OVERRIDE 时直连 + 对话框黄色提示 - 出站代理面板 / WebUI / core-model 文案同步说明 Bangumi 登录页共用该代理 - 单测 7 例(rule 映射);docs pre-pr checklist 新增章节 + parity 表更新 验证:./gradlew :app:assembleDebug 成功;./gradlew test lint 全绿;真机 A/B:清空系统代理后, 应用代理关 = 授权页 net::ERR_CONNECTION_CLOSED 且代理侧零流量;应用代理开 = 授权页经代理完整加载。
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
背景
Bangumi OAuth 登录在 TV 设置页用内置 WebView 加载 bgm.tv 授权页。WebView 只认系统全局代理、不走 App 内出站代理:已配置的「出站代理」此前只被 OkHttp(token 交换、抓取、Archive、RSS)使用,墙内网络下授权页会直接超时打不开,登录流程完全依赖设备的系统代理。本 PR 把同一份代理配置接到登录 WebView。
改动
androidx.webkit 1.14.0:用ProxyController.setProxyOverride为 WebView 应用进程级代理 override(WebViewFeature.PROXY_OVERRIDE能力门控),并 bypasslocalhost/127.0.0.1保证 OAuth 回环回调直连BangumiOAuthWebViewProxy:CloudDriveAutomationConfig.rssProxy*→http://host:port;override 异步生效后再loadUrl;对话框销毁时clear(含「apply 晚于销毁」竞态:迟到回调只 clear 不 loadUrl)PROXY_OVERRIDE时回退直连并在对话框提示core-modelfallback 文案同步说明 Bangumi 登录页共用该代理docs/agents/pre-pr-checklist.md新增章节,parity 表更新验证
./gradlew :app:assembleDebug成功./gradlew test lint全绿(新单测 7/7,无 MissingTranslation)net::ERR_CONNECTION_CLOSED,代理侧零流量CONNECT bgm.tv:443备注