Add dial parallel for outbound dialer

This commit is contained in:
世界
2022-07-08 12:58:43 +08:00
parent d45007b501
commit 3699a57847
17 changed files with 253 additions and 39 deletions

View File

@@ -22,8 +22,15 @@ func NewTransport(ctx context.Context, dialer N.Dialer, logger log.Logger, addre
}
host := serverURL.Hostname()
port := serverURL.Port()
if port == "" {
port = "53"
switch serverURL.Scheme {
case "tls":
if port == "" {
port = "853"
}
default:
if port == "" {
port = "53"
}
}
destination := M.ParseSocksaddrHostPortStr(host, port)
switch serverURL.Scheme {