naive: wait for handshake before returning outbound conn

This commit is contained in:
Shtorm
2026-09-04 04:42:43 +03:00
parent 7fc9e5e773
commit de3c7ff37e
+2 -2
View File
@@ -237,7 +237,7 @@ func (h *Outbound) DialContext(ctx context.Context, network string, destination
switch N.NetworkName(network) {
case N.NetworkTCP:
h.logger.InfoContext(ctx, "outbound connection to ", destination)
return h.client.DialEarly(ctx, destination)
return h.client.DialContext(ctx, network, destination)
case N.NetworkUDP:
if h.uotClient == nil {
return nil, E.New("UDP is not supported unless UDP over TCP is enabled")
@@ -273,5 +273,5 @@ type naiveDialer struct {
}
func (d *naiveDialer) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error) {
return d.NaiveClient.DialEarly(ctx, destination)
return d.NaiveClient.DialContext(ctx, network, destination)
}