mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-22 15:23:29 +03:00
Update sing-box core, refactor MASQUE, update XHTTP
This commit is contained in:
@@ -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...)
|
||||
|
||||
Reference in New Issue
Block a user