add quic dialer

This commit is contained in:
ginuerzh
2021-12-17 00:23:08 +08:00
parent c7f5da6ac7
commit 965c6846dd
15 changed files with 385 additions and 71 deletions

View File

@ -17,7 +17,7 @@ var (
// LoadServerConfig loads the certificate from cert & key files and optional client CA file.
func LoadServerConfig(certFile, keyFile, caFile string) (*tls.Config, error) {
if certFile == "" && keyFile == "" {
return DefaultConfig, nil
return DefaultConfig.Clone(), nil
}
cert, err := tls.LoadX509KeyPair(certFile, keyFile)