refactor: DNS

This commit is contained in:
世界
2025-07-08 13:12:14 +08:00
parent bc35aca017
commit 3016338e34
89 changed files with 4793 additions and 1740 deletions
+1 -1
View File
@@ -165,7 +165,7 @@ func (s *Server) Serve(listener net.Listener) error {
if len(s.tlsConfig.NextProtos()) == 0 {
s.tlsConfig.SetNextProtos([]string{http2.NextProtoTLS, "http/1.1"})
} else if !common.Contains(s.tlsConfig.NextProtos(), http2.NextProtoTLS) {
s.tlsConfig.SetNextProtos(append([]string{"h2"}, s.tlsConfig.NextProtos()...))
s.tlsConfig.SetNextProtos(append([]string{http2.NextProtoTLS}, s.tlsConfig.NextProtos()...))
}
listener = aTLS.NewListener(listener, s.tlsConfig)
}