diag: 在 DoWithTLS 路径也添加诊断日志
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

This commit is contained in:
win 2026-03-22 01:39:55 +08:00
parent fbcaab03da
commit c179c348c6

View File

@ -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 指纹已启用,记录调试日志