fix: vless tcp not working

This commit is contained in:
gVisor bot 2023-04-13 11:10:35 +08:00
parent 59a4c96fcb
commit 316522de53

View File

@ -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,