refactor: DNS

This commit is contained in:
世界
2024-12-02 23:17:01 +08:00
parent 619fa671d7
commit 30748cf4d1
89 changed files with 4796 additions and 1735 deletions

View File

@@ -164,7 +164,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)
}