fix: Node.js TLS 代理对所有 HTTPS 上游请求生效
Do() 方法新增 Node.js 代理检查,不再依赖账号级 TLS 指纹开关。 当 node_tls_proxy.enabled=true 时,所有 HTTPS 上游请求统一走 Node.js 代理,确保 JA3/JA4 指纹一致。
This commit is contained in:
parent
a72ba424cc
commit
2fff535bcd
@ -124,6 +124,11 @@ 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 代理模式(全局生效,不依赖账号级 TLS 指纹开关)
|
||||
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
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user