From 885ea9f7bfde18e2a0480efd683285c572a6dee0 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 5 Dec 2021 02:18:58 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20=E4=BF=AE=E6=AD=A3=E5=9B=A0xray?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AFalpn=E5=8F=82=E6=95=B0=E4=B8=BAhttp/?= =?UTF-8?q?1.1=E8=80=8C=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adapter/outbound/vless.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adapter/outbound/vless.go b/adapter/outbound/vless.go index 1776d0bf..9042c9dc 100644 --- a/adapter/outbound/vless.go +++ b/adapter/outbound/vless.go @@ -83,7 +83,7 @@ func (v *Vless) StreamConn(c net.Conn, metadata *C.Metadata) (net.Conn, error) { wsOpts.TLSConfig = &tls.Config{ ServerName: host, InsecureSkipVerify: v.option.SkipCertVerify, - NextProtos: []string{"http/1.1"}, + NextProtos: []string{"h2", "http/1.1"}, } if v.option.ServerName != "" { wsOpts.TLSConfig.ServerName = v.option.ServerName @@ -292,7 +292,7 @@ func (uc *vlessPacketConn) ReadFrom(b []byte) (int, net.Addr, error) { } func NewVless(option VlessOption) (*Vless, error) { - if !option.TLS && option.Network =="grpc"{ + if !option.TLS && option.Network == "grpc" { return nil, fmt.Errorf("TLS must be true with vless-grpc") }