diff options
Diffstat (limited to 'net.cpp')
-rw-r--r-- | net.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -178,41 +178,41 @@ bool GetMyExternalIP(unsigned int& ipRet) { if (nHost == 1) { - addrConnect = CAddress("72.233.89.199:80"); // www.whatismyip.com + addrConnect = CAddress("91.198.22.70:80"); // checkip.dyndns.org if (nLookup == 1) { - struct hostent* phostent = gethostbyname("www.whatismyip.com"); + struct hostent* phostent = gethostbyname("checkip.dyndns.org"); if (phostent && phostent->h_addr_list && phostent->h_addr_list[0]) addrConnect = CAddress(*(u_long*)phostent->h_addr_list[0], htons(80)); } - pszGet = "GET /automation/n09230945.asp HTTP/1.1\r\n" - "Host: www.whatismyip.com\r\n" - "User-Agent: Bitcoin/1.0 (see www.bitcoin.org)\r\n" + pszGet = "GET / HTTP/1.1\r\n" + "Host: checkip.dyndns.org\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 = "Address:"; } else if (nHost == 2) { - addrConnect = CAddress("91.198.22.70:80"); // checkip.dyndns.org + addrConnect = CAddress("74.208.43.192:80"); // www.showmyip.com if (nLookup == 1) { - struct hostent* phostent = gethostbyname("checkip.dyndns.org"); + struct hostent* phostent = gethostbyname("www.showmyip.com"); if (phostent && phostent->h_addr_list && phostent->h_addr_list[0]) addrConnect = CAddress(*(u_long*)phostent->h_addr_list[0], htons(80)); } - pszGet = "GET / HTTP/1.1\r\n" - "Host: checkip.dyndns.org\r\n" + 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"; - pszKeyword = "Address:"; + pszKeyword = NULL; // Returns just IP address } if (GetMyExternalIP2(addrConnect, pszGet, pszKeyword, ipRet)) |