DialerProxy: Fix SplitHTTP H3 dialerProxy (#3570)

* wip

* wip

* formatting

* cnc connection no longer needs to be a Packetconn

* dialerProxy: do not cancel connection when Dial context is cancelled
This commit is contained in:
mmmray authored and GitHub committed 2024-08-11 12:58:52 -04:00
1 parent 0c7303960a
commit 498d8eb3cc
3 files changed
+44 -7

No files matched your search

+6 -2
View File
@@ -118,7 +118,7 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
return nil, err
}
var udpConn *net.UDPConn
var udpConn net.PacketConn
var udpAddr *net.UDPAddr
switch c := conn.(type) {
@@ -139,7 +139,11 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
return nil, err
}
default:
return nil, errors.New("unsupported connection type: %T", conn)
udpConn = &internet.FakePacketConn{c}
udpAddr, err = net.ResolveUDPAddr("udp", c.RemoteAddr().String())
if err != nil {
return nil, err
}
}
return quic.DialEarly(ctx, udpConn, udpAddr, tlsCfg, cfg)