chore: apply ntp time function more place

This commit is contained in:
wwqgtxx
2025-09-13 14:21:06 +08:00
parent 57e14e5b62
commit a0f1ac4ef5
14 changed files with 28 additions and 15 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/metacubex/mihomo/common/once"
C "github.com/metacubex/mihomo/constant"
"github.com/metacubex/mihomo/ntp"
)
var globalCertPool *x509.CertPool
@@ -110,6 +111,7 @@ func GetTLSConfig(opt Option) (tlsConfig *tls.Config, err error) {
if tlsConfig == nil {
tlsConfig = &tls.Config{}
}
tlsConfig.Time = ntp.Now
if opt.ZeroTrust {
tlsConfig.RootCAs = zeroTrustCertPool()