From c179c348c619b5112f43d05248460d7db960e940 Mon Sep 17 00:00:00 2001 From: win Date: Sun, 22 Mar 2026 01:39:55 +0800 Subject: [PATCH] =?UTF-8?q?diag:=20=E5=9C=A8=20DoWithTLS=20=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E4=B9=9F=E6=B7=BB=E5=8A=A0=E8=AF=8A=E6=96=AD=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/internal/repository/http_upstream.go | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/backend/internal/repository/http_upstream.go b/backend/internal/repository/http_upstream.go index 33e5bbed..ba6bb8fc 100644 --- a/backend/internal/repository/http_upstream.go +++ b/backend/internal/repository/http_upstream.go @@ -191,7 +191,20 @@ func (s *httpUpstreamService) DoWithTLS(req *http.Request, proxyURL string, acco } // 优先使用 Node.js TLS 代理模式 - if s.isNodeTLSProxyEnabled() && s.shouldRouteViaNodeProxy(req) { return s.doViaNodeTLSProxy(req, accountID, accountConcurrency) + if s.isNodeTLSProxyEnabled() { + shouldRoute := s.shouldRouteViaNodeProxy(req) + host := "" + if req != nil && req.URL != nil { + host = req.URL.Hostname() + } + slog.Warn("node_tls_proxy_check_tls_path", + "host", host, + "should_route", shouldRoute, + "tls_fingerprint_enabled", enableTLSFingerprint, + ) + if shouldRoute { + return s.doViaNodeTLSProxy(req, accountID, accountConcurrency) + } } // TLS 指纹已启用,记录调试日志