From 0ec5a6e13354c4b19e38c7189db5ed3d93e8eac7 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Tue, 22 Mar 2022 23:25:44 +0800 Subject: [PATCH] [Fix] redir-host use host not ip --- tunnel/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index ff303548..d09c8a69 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -244,7 +244,7 @@ func handleUDPConn(packet *inbound.PacketAdapter) { ctx, cancel := context.WithTimeout(context.Background(), C.DefaultUDPTimeout) defer cancel() - rawPc, err := proxy.ListenPacketContext(ctx, metadata.Pure()) + rawPc, err := proxy.ListenPacketContext(ctx, metadata) if err != nil { if rule == nil { log.Warnln("[UDP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error()) @@ -302,7 +302,7 @@ func handleTCPConn(connCtx C.ConnContext) { ctx, cancel := context.WithTimeout(context.Background(), C.DefaultTCPTimeout) defer cancel() - remoteConn, err := proxy.DialContext(ctx, metadata.Pure()) + remoteConn, err := proxy.DialContext(ctx, metadata) if err != nil { if rule == nil { log.Warnln("[TCP] dial %s to %s error: %s", proxy.Name(), metadata.RemoteAddress(), err.Error())