mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
Fix uTLS ALPN
This commit is contained in:
parent
593fc97c65
commit
cc90156b96
@ -14,6 +14,7 @@ import (
|
|||||||
E "github.com/sagernet/sing/common/exceptions"
|
E "github.com/sagernet/sing/common/exceptions"
|
||||||
|
|
||||||
utls "github.com/refraction-networking/utls"
|
utls "github.com/refraction-networking/utls"
|
||||||
|
"golang.org/x/net/http2"
|
||||||
)
|
)
|
||||||
|
|
||||||
type UTLSClientConfig struct {
|
type UTLSClientConfig struct {
|
||||||
@ -34,6 +35,9 @@ func (e *UTLSClientConfig) NextProtos() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *UTLSClientConfig) SetNextProtos(nextProto []string) {
|
func (e *UTLSClientConfig) SetNextProtos(nextProto []string) {
|
||||||
|
if len(nextProto) == 1 && nextProto[0] == http2.NextProtoTLS {
|
||||||
|
nextProto = append(nextProto, "http/1.1")
|
||||||
|
}
|
||||||
e.config.NextProtos = nextProto
|
e.config.NextProtos = nextProto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user