* [Bitcoin-development] External IP Address
@ 2014-03-16 7:04 Sam Michaels
2014-03-16 10:22 ` Wladimir
0 siblings, 1 reply; 2+ messages in thread
From: Sam Michaels @ 2014-03-16 7:04 UTC (permalink / raw)
To: bitcoin-development
[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]
Hello devs.
I was poking around in the code for a small project and I came across the
function GetMyExternalIP() in net.cpp. The comment says you'd like to
phase out the current method.
I threw together exactly what was asked in the comments: it's a site that
has PHP echo the IP address. Additionally, it captures the IP, user agent,
and time for analysis (a client with the same IP and user agent just
updates the entry).
The site for the client is: ip.bitcheck.us. It does a quick search for
"Mozilla" in the user agent to redirect browers that go there.
The following information is sent:
---
GET / HTTP/1.1
Host: ip.bitcheck.us
User-Agent: /Satoshi:0.8.6/
Connection: close
---
And following is received:
---
HTTP/1.1 200 OK
Date: Sun, 16 Mar 2014 05:31:51 GMT
Server: Apache mod_fcgid/2.3.10-dev
X-Powered-By: Satoshi v1.0
X-Client-Update: yes
Content-Length: 9
Connection: close
Content-Type: text/html
127.0.0.1
---
You can look for X-Client-Update to see if the check in was logged. Other
information can be passed in the header, too.
Errors are trapped so that it will always display the IP address and any
error information is contained in the headers.
Hope you find this useful.
Sam
[-- Attachment #2: Type: text/html, Size: 1765 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-16 10:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-16 7:04 [Bitcoin-development] External IP Address Sam Michaels
2014-03-16 10:22 ` Wladimir
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox