mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-12-26 13:11:21 +08:00
chore: apply global ca in sudoku code
This commit is contained in:
parent
85ba7f6a0a
commit
10ef29f5cd
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user