|
|
@ -375,20 +375,29 @@ bool GetMyExternalIP(CNetAddr& ipRet) |
|
|
|
} |
|
|
|
} |
|
|
|
else if (nHost == 2) |
|
|
|
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) |
|
|
|
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()) |
|
|
|
if (addrIP.IsValid()) |
|
|
|
addrConnect = addrIP; |
|
|
|
addrConnect = addrIP; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
pszGet = "GET /simple/ HTTP/1.1\r\n" |
|
|
|
pszGet = "GET /simple/ HTTP/1.1\r\n" |
|
|
|
"Host: www.showmyip.com\r\n" |
|
|
|
"Host: www.showmyip.com\r\n" |
|
|
|
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" |
|
|
|
"User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n" |
|
|
|
"Connection: close\r\n" |
|
|
|
"Connection: close\r\n" |
|
|
|
"\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
|
|
|
|
pszKeyword = NULL; // Returns just IP address
|
|
|
|
} |
|
|
|
} |
|
|
|