Browse Source

replace showmyip.com (down) with wtfismyip.com

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
e4267649f4
  1. 13
      src/net.cpp

13
src/net.cpp

@ -375,20 +375,29 @@ bool GetMyExternalIP(CNetAddr& ipRet) @@ -375,20 +375,29 @@ bool GetMyExternalIP(CNetAddr& ipRet)
}
else if (nHost == 2)
{
addrConnect = CService("74.208.43.192", 80); // www.showmyip.com
//addrConnect = CService("74.208.43.192", 80); // www.showmyip.com
addrConnect = CService("54.200.182.206", 80); // wtfismyip.com
if (nLookup == 1)
{
CService addrIP("www.showmyip.com", 80, true);
//CService addrIP("www.showmyip.com", 80, true);
CService addrIP("wtfismyip.com", 80, true);
if (addrIP.IsValid())
addrConnect = addrIP;
}
/*
pszGet = "GET /simple/ HTTP/1.1\r\n"
"Host: www.showmyip.com\r\n"
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"
"Connection: close\r\n"
"\r\n";
*/
pszGet = "GET /text HTTP/1.1\r\n"
"Host: wtfismyip.com\r\n"
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"
"Connection: close\r\n"
"\r\n";
pszKeyword = NULL; // Returns just IP address
}

Loading…
Cancel
Save