mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-06 05:58:58 +00:00
chore: apply ntp time function more place
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
tlsC "github.com/metacubex/mihomo/component/tls"
|
||||
C "github.com/metacubex/mihomo/constant"
|
||||
"github.com/metacubex/mihomo/log"
|
||||
"github.com/metacubex/mihomo/ntp"
|
||||
"github.com/metacubex/mihomo/tunnel/statistic"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
@@ -201,7 +202,7 @@ func startTLS(cfg *Config) {
|
||||
}
|
||||
|
||||
log.Infoln("RESTful API tls listening at: %s", l.Addr().String())
|
||||
tlsConfig := &tlsC.Config{}
|
||||
tlsConfig := &tlsC.Config{Time: ntp.Now}
|
||||
tlsConfig.NextProtos = []string{"h2", "http/1.1"}
|
||||
tlsConfig.Certificates = []tlsC.Certificate{tlsC.UCertificate(cert)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user