From a78b89d16e98a9c6fbd5d77abea5c4b6ce7f633c Mon Sep 17 00:00:00 2001 From: Skyxim Date: Mon, 6 Dec 2021 22:45:59 +0800 Subject: [PATCH] Revert: Revert Redir-Host, please add fallback dns and append proxy adapter DNS pass proxy use: - protocol://ip:port#AdapterName - protocol://ip:port/query#AdapterName sure as: - tls://1.1.1.1:853#DNS --- tunnel/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index 4551bf09..f99addc1 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -230,7 +230,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()) @@ -284,7 +284,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())