Add hijack_dns for tun

This commit is contained in:
世界
2022-07-10 09:15:01 +08:00
parent a34057753c
commit ddfae8cd07
15 changed files with 220 additions and 99 deletions

View File

@@ -20,6 +20,9 @@ func NewTransport(ctx context.Context, dialer N.Dialer, logger log.Logger, addre
return nil, err
}
host := serverURL.Hostname()
if host == "" {
host = address
}
port := serverURL.Port()
switch serverURL.Scheme {
case "tls":