chore: apply global ca in sudoku code

This commit is contained in:
wwqgtxx 2025-12-23 23:15:52 +08:00
parent 85ba7f6a0a
commit 10ef29f5cd

View File

@ -18,6 +18,8 @@ import (
"sync"
"time"
"github.com/metacubex/mihomo/component/ca"
"github.com/metacubex/http"
"github.com/metacubex/http/httputil"
"github.com/metacubex/tls"
@ -211,9 +213,12 @@ func newHTTPClient(serverAddress string, opts TunnelDialOptions, maxIdleConns in
},
}
if scheme == "https" {
transport.TLSClientConfig = &tls.Config{
transport.TLSClientConfig, err = ca.GetTLSConfig(ca.Option{TLSConfig: &tls.Config{
ServerName: serverName,
MinVersion: tls.VersionTLS12,
}})
if err != nil {
return nil, httpClientTarget{}, err
}
}