From 7dee0113848cf03e5f9b08235b30066e3f0498ee Mon Sep 17 00:00:00 2001 From: EkkoG Date: Wed, 25 Sep 2024 05:25:38 +0000 Subject: [PATCH] fix: DoH3 fake addr issue https://github.com/daeuniverse/dae/pull/649#discussion_r1773788026 --- control/dns_control.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/control/dns_control.go b/control/dns_control.go index fc021f4d1..279a1a572 100644 --- a/control/dns_control.go +++ b/control/dns_control.go @@ -31,6 +31,7 @@ import ( "github.com/daeuniverse/outbound/netproxy" "github.com/daeuniverse/outbound/pkg/fastrand" "github.com/daeuniverse/outbound/pool" + tc "github.com/daeuniverse/outbound/protocol/tuic/common" "github.com/daeuniverse/quic-go" "github.com/daeuniverse/quic-go/http3" dnsmessage "github.com/miekg/dns" @@ -652,7 +653,7 @@ func (c *DnsController) dialSend(invokingDepth int, req *udpRequest, data []byte pkt := conn.(netproxy.PacketConn) fakePkt := &netproxy.FakeNetPacketConn{ PacketConn: pkt, - LAddr: net.UDPAddrFromAddrPort(netip.AddrPortFrom(netip.MustParseAddr("::1"), 0)), + LAddr: net.UDPAddrFromAddrPort(tc.GetUniqueFakeAddrPort()), RAddr: udpAddr, } c, e := quic.DialEarly(ctx, fakePkt, udpAddr, tlsCfg, cfg)