Fix PcapController assert socks5 server false

This commit is contained in:
ChsBuffer
2021-07-20 08:13:27 +08:00
parent 920b068a1e
commit 3e943ec6b8

View File

@@ -39,7 +39,7 @@ namespace Netch.Controllers
var outboundNetworkInterface = NetworkInterfaceUtils.GetBest();
var argument = new StringBuilder($@"-i \Device\NPF_{outboundNetworkInterface.Id}");
if (_server is Socks5Bridge socks5)
if (_server is Socks5 socks5 && !socks5.Auth())
argument.Append($" --destination {await socks5.AutoResolveHostnameAsync()}:{socks5.Port}");
else
Trace.Assert(false);