From f76f091096ea908e57757ccd9c0fd7df841676ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 13 Mar 2025 19:47:29 +0800 Subject: [PATCH] Fix http3 DNS server connecting to wrong address --- dns/transport/quic/http3.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dns/transport/quic/http3.go b/dns/transport/quic/http3.go index a5181ae0..73ae7c13 100644 --- a/dns/transport/quic/http3.go +++ b/dns/transport/quic/http3.go @@ -23,7 +23,6 @@ import ( "github.com/sagernet/sing/common/bufio" E "github.com/sagernet/sing/common/exceptions" "github.com/sagernet/sing/common/logger" - M "github.com/sagernet/sing/common/metadata" N "github.com/sagernet/sing/common/network" sHTTP "github.com/sagernet/sing/protocol/http" @@ -101,8 +100,7 @@ func NewHTTP3(ctx context.Context, logger log.ContextLogger, tag string, options headers: headers, transport: &http3.Transport{ Dial: func(ctx context.Context, addr string, tlsCfg *tls.STDConfig, cfg *quic.Config) (quic.EarlyConnection, error) { - destinationAddr := M.ParseSocksaddr(addr) - conn, dialErr := transportDialer.DialContext(ctx, N.NetworkUDP, destinationAddr) + conn, dialErr := transportDialer.DialContext(ctx, N.NetworkUDP, serverAddr) if dialErr != nil { return nil, dialErr }