Add basic support for DoH3 (#7677)

This commit is contained in:
Filippo125
2025-11-21 05:01:59 +01:00
committed by GitHub
parent 5d64dfbdae
commit d3e13fe05d
9 changed files with 299 additions and 8 deletions

View File

@@ -27,14 +27,17 @@ func Transport(s string) (trans string, addr string) {
s = s[len(transport.GRPC+"://"):]
return transport.GRPC, s
case strings.HasPrefix(s, transport.HTTPS3+"://"):
s = s[len(transport.HTTPS3+"://"):]
return transport.HTTPS3, s
case strings.HasPrefix(s, transport.HTTPS+"://"):
s = s[len(transport.HTTPS+"://"):]
return transport.HTTPS, s
case strings.HasPrefix(s, transport.UNIX+"://"):
s = s[len(transport.UNIX+"://"):]
return transport.UNIX, s
}
return transport.DNS, s
}