mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
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:
parent
0c7303960a
commit
498d8eb3cc
3 changed files with 44 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue