From 316522de5339eb44f80dfcbfa079d3bfc765d6e8 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Thu, 13 Apr 2023 11:10:35 +0800 Subject: [PATCH] fix: vless tcp not working --- adapter/outbound/vless.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/adapter/outbound/vless.go b/adapter/outbound/vless.go index ecfa1a13..5f7c2087 100644 --- a/adapter/outbound/vless.go +++ b/adapter/outbound/vless.go @@ -173,12 +173,12 @@ func (v *Vless) StreamConn(c net.Conn, metadata *C.Metadata) (net.Conn, error) { } func (v *Vless) streamConn(c net.Conn, metadata *C.Metadata) (conn net.Conn, err error) { - metadata = &C.Metadata{ // a clear metadata only contains ip - NetWork: metadata.NetWork, - DstIP: metadata.DstIP, - DstPort: metadata.DstPort, - } if metadata.NetWork == C.UDP { + metadata = &C.Metadata{ // a clear metadata only contains ip + NetWork: metadata.NetWork, + DstIP: metadata.DstIP, + DstPort: metadata.DstPort, + } if v.option.PacketAddr { metadata = &C.Metadata{ NetWork: C.UDP,