mirror of https://github.com/2dust/v2rayN
修正tcping逻辑
* 当IP地址存在反向解析结果(例 [xxx].members.linode.com),会连接反向域名的IP地址池,可能导致测速IPv4服务器时连接到IPv6地址并且失败。pull/453/head
parent
7cf6ab4b51
commit
a62f375f5b
|
@ -253,8 +253,12 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
IPAddress ipAddress;
|
||||||
IPAddress ipAddress = ipHostInfo.AddressList[0];
|
if (!System.Net.IPAddress.TryParse(url, out ipAddress))
|
||||||
|
{
|
||||||
|
IPHostEntry ipHostInfo = System.Net.Dns.GetHostEntry(url);
|
||||||
|
ipAddress = ipHostInfo.AddressList[0];
|
||||||
|
}
|
||||||
|
|
||||||
var timer = new Stopwatch();
|
var timer = new Stopwatch();
|
||||||
timer.Start();
|
timer.Start();
|
||||||
|
|
Loading…
Reference in New Issue