fix(captcha): personal 模式认证代理透传给 Flow 请求,修复上传/生成 代理认证信息丢失#163
Open
CEastWind wants to merge 1 commit into
Open
Conversation
personal 模式下 _resolve_personal_proxy 解析出带 user:pass 的代理后,
self._proxy_url 被存成剥离账密的 {protocol}://{host}:{port}(本意是给 Chrome
--proxy-server / 认证扩展用,Chrome 不吃 URL 里的账密)。但该值同时被复用为
Flow API 请求(curl_cffi)的出口代理,导致带认证代理下 /flow/uploadImage 等
请求丢失代理认证信息、上传首尾帧失败、视频无法生成。
改为用 _compose_proxy_url 组装带账密的完整地址存入 self._proxy_url。Chrome 侧
代理认证走扩展/命令行 proxy_server_arg,不依赖该值,打码浏览器不受影响;仅补齐
了 Flow 请求侧的代理认证。
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.
personal 模式下 _resolve_personal_proxy 解析出带 user:pass 的代理后, self._proxy_url 被存成剥离账密的 {protocol}://{host}:{port}(本意是给 Chrome --proxy-server / 认证扩展用,Chrome 不吃 URL 里的账密)。但该值同时被复用为 Flow API 请求(curl_cffi)的出口代理,导致带认证代理下 /flow/uploadImage 等 请求丢失代理认证信息、上传首尾帧失败、视频无法生成。
改为用 _compose_proxy_url 组装带账密的完整地址存入 self._proxy_url。Chrome 侧 代理认证走扩展/命令行 proxy_server_arg,不依赖该值,打码浏览器不受影响;仅补齐
了 Flow 请求侧的代理认证。