mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 14:29:42 +08:00
修改证书设置
This commit is contained in:
@@ -50,15 +50,18 @@ func startTls() {
|
||||
MinVersion: tls.VersionTLS12,
|
||||
CipherSuites: selectedCipherSuites,
|
||||
GetCertificate: func(chi *tls.ClientHelloInfo) (*tls.Certificate, error) {
|
||||
base.Trace("GetCertificate", chi.ServerName)
|
||||
return dbdata.GetCertificateBySNI(chi.ServerName)
|
||||
},
|
||||
// InsecureSkipVerify: true,
|
||||
}
|
||||
srv := &http.Server{
|
||||
Addr: addr,
|
||||
Handler: initRoute(),
|
||||
TLSConfig: tlsConfig,
|
||||
ErrorLog: base.GetBaseLog(),
|
||||
Addr: addr,
|
||||
Handler: initRoute(),
|
||||
TLSConfig: tlsConfig,
|
||||
ErrorLog: base.GetBaseLog(),
|
||||
ReadTimeout: 60 * time.Second,
|
||||
WriteTimeout: 60 * time.Second,
|
||||
}
|
||||
|
||||
ln, err = net.Listen("tcp", addr)
|
||||
@@ -70,7 +73,7 @@ func startTls() {
|
||||
if base.Cfg.ProxyProtocol {
|
||||
ln = &proxyproto.Listener{
|
||||
Listener: ln,
|
||||
ReadHeaderTimeout: 40 * time.Second,
|
||||
ReadHeaderTimeout: 30 * time.Second,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user