diff --git a/shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs b/shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs index 49820f63..aca7e022 100644 --- a/shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs +++ b/shadowsocks-csharp/Controller/Service/AvailabilityStatistics.cs @@ -123,7 +123,7 @@ namespace Shadowsocks.Controller { Logging.Debug("Ping " + server.FriendlyName()); if (server.server == "") return null; - var IP = Dns.GetHostAddresses(server.server).First(ip => ip.AddressFamily == AddressFamily.InterNetwork); + var IP = Dns.GetHostAddresses(server.server).First(ip => (ip.AddressFamily == AddressFamily.InterNetwork || ip.AddressFamily == AddressFamily.InterNetworkV6)); var ping = new Ping(); var ret = new List(); foreach ( diff --git a/shadowsocks-csharp/packages.config b/shadowsocks-csharp/packages.config index b309fb97..cd42cb7e 100644 --- a/shadowsocks-csharp/packages.config +++ b/shadowsocks-csharp/packages.config @@ -5,5 +5,7 @@ + + \ No newline at end of file diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj index d58ca508..cd85c6a3 100644 --- a/shadowsocks-csharp/shadowsocks-csharp.csproj +++ b/shadowsocks-csharp/shadowsocks-csharp.csproj @@ -96,7 +96,14 @@ False - + + 3rd\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.dll + True + + + 3rd\Microsoft.Net.Http.2.0.20710.0\lib\net40\System.Net.Http.WebRequest.dll + True + 3rd\Microsoft.Bcl.1.1.8\lib\net40\System.Runtime.dll True @@ -184,7 +191,7 @@ - + diff --git a/test/packages.config b/test/packages.config new file mode 100644 index 00000000..8f91c0e4 --- /dev/null +++ b/test/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/test/test.csproj b/test/test.csproj index d7420145..55798adc 100755 --- a/test/test.csproj +++ b/test/test.csproj @@ -31,6 +31,8 @@ + + @@ -54,6 +56,9 @@ shadowsocks-csharp + + +