When using http proxy, this will cause distinct latency
if we are trying to resolve localhost.

Currently it's unnecessary to do that because our privoxy
doesn't listern on ipv6 address, so it's ok to hard code
the ipv4 address.

There is a plan to add a cache to record the ipv6 connectivity
so that we needn't to try both ipv4 and ipv6 every time when we
attempt to connect a DnsEndPoint.
This commit is contained in:
noisyfox
2016-09-17 16:13:12 +10:00
parent 5e082e2961
commit 390144351a
@@ -46,7 +46,7 @@ namespace Shadowsocks.Controller
this._local = socket;
try
{
EndPoint remoteEP = SocketUtil.GetEndPoint("localhost", targetPort);
EndPoint remoteEP = SocketUtil.GetEndPoint("127.0.0.1", targetPort);
// Connect to the remote endpoint.
_remote = new WrappedSocket();