From 1d9de31f477b47dfeba51fbd2d530ed647a335ab Mon Sep 17 00:00:00 2001 From: nite07 Date: Tue, 12 Mar 2024 21:46:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20vless=20ws=20=E8=A7=A3=E6=9E=90=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=20TLS=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parser/vless.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/parser/vless.go b/parser/vless.go index d4e2710..fa108a7 100644 --- a/parser/vless.go +++ b/parser/vless.go @@ -43,19 +43,22 @@ func ParseVless(proxy string) (model.Proxy, error) { UDP: true, Sni: params.Get("sni"), Network: params.Get("type"), - TLS: params.Get("security") == "reality", Flow: params.Get("flow"), ClientFingerprint: params.Get("fp"), Servername: params.Get("sni"), - RealityOpts: model.RealityOptions{ - PublicKey: params.Get("pbk"), - ShortID: params.Get("sid"), - }, } if params.Get("alpn") != "" { result.Alpn = strings.Split(params.Get("alpn"), ",") } + if params.Get("security") == "reality" { + result.TLS = true + result.RealityOpts = model.RealityOptions{ + PublicKey: params.Get("pbk"), + ShortID: params.Get("sid"), + } + } if params.Get("type") == "ws" { + result.TLS = true result.WSOpts = model.WSOptions{ Path: params.Get("path"), Headers: map[string]string{ @@ -64,6 +67,7 @@ func ParseVless(proxy string) (model.Proxy, error) { } } if params.Get("type") == "grpc" { + result.TLS = true result.GrpcOpts = model.GrpcOptions{ GrpcServiceName: params.Get("serviceName"), }