add dialer for connector

This commit is contained in:
ginuerzh
2022-09-08 22:39:17 +08:00
parent c546a6b711
commit e7a104651a
4 changed files with 31 additions and 4 deletions

View File

@ -46,7 +46,9 @@ func (d *NetDialer) Dial(ctx context.Context, network, addr string) (net.Conn, e
if d.DialFunc != nil {
return d.DialFunc(ctx, network, addr)
}
log.Debugf("interface: %s %v/%s", ifceName, ifAddr, network)
if ifceName != "" {
log.Debugf("interface: %s %v/%s", ifceName, ifAddr, network)
}
switch network {
case "udp", "udp4", "udp6":