mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 20:15:46 +00:00
support multiple network interfaces
This commit is contained in:
@@ -44,8 +44,11 @@ func (d *tlsDialer) Dial(ctx context.Context, addr string, opts ...dialer.DialOp
|
||||
opt(&options)
|
||||
}
|
||||
|
||||
var netd net.Dialer
|
||||
conn, err := netd.DialContext(ctx, "tcp", addr)
|
||||
netd := options.NetDialer
|
||||
if netd == nil {
|
||||
netd = dialer.DefaultNetDialer
|
||||
}
|
||||
conn, err := netd.Dial(ctx, "tcp", addr)
|
||||
if err != nil {
|
||||
d.logger.Error(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user