修复模型、图片与 MCP 上游误用出站代理 - #1340
Merged
Merged
Conversation
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.
背景
修正已合并 PR #1338 的代理覆盖范围:模型、图片与 MCP 工具上游应直连,但 MCP OAuth 令牌刷新仍需在有代理时访问授权服务器。
修改
HTTPS_PROXY指向 HTTP 代理访问 HTTPS 令牌端点;本地校验所有解析地址,CONNECT 固定到获准 IP,保留原域名的 Host、TLS SNI 与证书校验;NO_PROXY命中时仍按原有直连策略执行。.env.example和 README,说明适用范围与 HTTP 代理/HTTPS 目标的限制。验证
cd monkeyai/backend && go test ./...cd monkeyai/backend && go vet ./...cd monkeyai/backend && go test -race ./internal/mcp ./internal/proxycd monkeyai && docker compose config --quietgit diff --check