From 3673936cb3eaf6a01391fa2eb81024c3596c7eef Mon Sep 17 00:00:00 2001 From: win Date: Sun, 22 Mar 2026 02:25:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Node.js=20TLS=20=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E4=BB=85=E6=8B=A6=E6=88=AA=20Anthropic=20=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=EF=BC=88DoWithTLS=20=E8=B7=AF=E5=BE=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Do() 去掉 Node.js 代理拦截,Antigravity/Google 请求走原路径 - 只有 DoWithTLS 且 enableTLSFingerprint=true 时走 Node.js 代理 - 按平台分治:Anthropic → Node.js 原生 TLS,Google → 原有 uTLS/直连 --- backend/internal/repository/http_upstream.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/backend/internal/repository/http_upstream.go b/backend/internal/repository/http_upstream.go index 9e9f4e6e..509e1492 100644 --- a/backend/internal/repository/http_upstream.go +++ b/backend/internal/repository/http_upstream.go @@ -124,11 +124,6 @@ func NewHTTPUpstream(cfg *config.Config) service.HTTPUpstream { // - 调用方必须关闭 resp.Body,否则会导致 inFlight 计数泄漏 // - inFlight > 0 的客户端不会被淘汰,确保活跃请求不被中断 func (s *httpUpstreamService) Do(req *http.Request, proxyURL string, accountID int64, accountConcurrency int) (*http.Response, error) { - // Node.js TLS 代理:所有 HTTPS 上游请求走 Node.js 代理 - if s.isNodeTLSProxyEnabled() && req != nil && req.URL != nil && req.URL.Scheme == "https" { - return s.doViaNodeTLSProxy(req, accountID, accountConcurrency) - } - if err := s.validateRequestHost(req); err != nil { return nil, err }