fix(proxy): hint for corporate firewalls where DeepSeek requires proxy (#2215)#2229
Merged
Merged
Conversation
esengine#2215) By default api.deepseek.com is in NO_PROXY so clash/v2ray users avoid 403s from shared exit IPs. Corporate users whose firewall blocks direct egress get a silent 'fetch failed' with no guidance. Add a stderr hint when api.deepseek.com is bypassed, pointing users to REASONIX_PROXY_DEEPSEEK_DIRECT=0 or bypassDeepSeekDirect:false in config.
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
esengine
approved these changes
May 29, 2026
esengine
left a comment
Owner
There was a problem hiding this comment.
Helpful diagnostic — when api.deepseek.com is bypassed (direct egress), prints a one-line stderr hint that enterprise users behind a firewall can flip REASONIX_PROXY_DEEPSEEK_DIRECT=0 / proxy.bypassDeepSeekDirect:false. Reuses the existing resolveBypassDeepSeekDirect resolution, no behavior change beyond the message. CI green. Merging.
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.
问题
关闭 #2215。企业内网用户设置了
HTTPS_PROXY但连接 DeepSeek API 仍然失败(fetch failed),错误信息中可以看到NO_PROXY: api.deepseek.com。根因:为了防止 clash/v2ray 用户的代理出口 IP 被 DeepSeek 403,代码默认把
api.deepseek.com加进 NO_PROXY(bypass 直连)。但企业防火墙环境恰好相反——必须通过代理才能访问 deepseek,直连反而不通。解决方案其实早就有了(
REASONIX_PROXY_DEEPSEEK_DIRECT=0或 configbypassDeepSeekDirect:false,见 #1497),但 stderr 日志里完全没有提示,用户无从得知。修改
在
[proxy]日志中补一行提示,当 api.deepseek.com 走直连时告知用户可以关闭这个行为:只改了一处: 的 函数,在 bypass 生效时打印这条提示。不影响任何行为。