Update sing-box core, refactor MASQUE, update XHTTP

This commit is contained in:
Shtorm
2026-05-29 01:31:57 +03:00
parent 1cb7950810
commit b953954b60
111 changed files with 1291 additions and 1660 deletions

View File

@@ -20,16 +20,15 @@ package credentials
import (
"crypto/tls"
"slices"
)
const alpnProtoStrH2 = "h2"
// AppendH2ToNextProtos appends h2 to next protos.
func AppendH2ToNextProtos(ps []string) []string {
for _, p := range ps {
if p == alpnProtoStrH2 {
return ps
}
if slices.Contains(ps, alpnProtoStrH2) {
return ps
}
ret := make([]string, 0, len(ps)+1)
ret = append(ret, ps...)