mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-22 00:21:30 +00:00
Fix uTLS ALPN
This commit is contained in:
parent
49f568abbd
commit
0ca344df5f
|
@ -14,6 +14,8 @@ import (
|
|||
"github.com/sagernet/sing-box/option"
|
||||
E "github.com/sagernet/sing/common/exceptions"
|
||||
utls "github.com/sagernet/utls"
|
||||
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
|
||||
type UTLSClientConfig struct {
|
||||
|
@ -34,6 +36,9 @@ func (e *UTLSClientConfig) NextProtos() []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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue