Live data from Hacker News

Your IP. In JSON

jsonip.com

21–30 of 72 posts

Re: Your IP. In JSON

#21

Some suggestions: Make jsonip.com dual stack IPv4/IPv6 and work for IPv6 addresses too. Return some other useful IP information, such as the PTR, the domain name part of the PTR, and the country code and name. Example: https://grepular.com/ipinfo EDIT: Don't use that URL for your own stuff or I'll block it. I only put it there as an example of how the JSON should be returned. EDIT2: Might be useful if it included the…

Thanks Mike. I'll start working some of these in over the next few days

Re: Your IP. In JSON

#22
post #12

Earlier quoted context omitted.

Well, yes - jsonip.com has no AAAA records. I'm not sure that reporting (only! - it only knows where the connection is from) an IPv6 address is all that useful, either. That said, there's space for a jsonip6.com...

"I'm not sure that reporting [only] an IPv6 address is all that useful" Why not? It's useful to me, and anyone else who has an IPv6 address. The future is now. Get with the program.

I'm not in the future yet, but I was under the impression that with IPv6 you would actually know your own public address, because there is no need for NAT. Is this not correct?

Re: Your IP. In JSON

#23
post #12

Earlier quoted context omitted.

Well, yes - jsonip.com has no AAAA records. I'm not sure that reporting (only! - it only knows where the connection is from) an IPv6 address is all that useful, either. That said, there's space for a jsonip6.com...

"I'm not sure that reporting [only] an IPv6 address is all that useful" Why not? It's useful to me, and anyone else who has an IPv6 address. The future is now. Get with the program.

For one, most people with IPv6 have a fixed address. Also, the future is not very well distributed.

Re: Your IP. In JSON

#24

Some suggestions: Make jsonip.com dual stack IPv4/IPv6 and work for IPv6 addresses too. Return some other useful IP information, such as the PTR, the domain name part of the PTR, and the country code and name. Example: https://grepular.com/ipinfo EDIT: Don't use that URL for your own stuff or I'll block it. I only put it there as an example of how the JSON should be returned. EDIT2: Might be useful if it included the…

Some of this is already available elsewhere: I've been using http://ipinfodb.com/ to decide whether to show a region-specific alert on the front page of http://mappin.es

Re: Your IP. In JSON

#25
{ip: "192.168.100.2, xxx.xxx.xxx.xxx"}. Why not change it to {ip: ["192.168.100.2", "xxx.xxx.xxx.xxx"]}?

Also, while I don't know any practical use, IPv6 support would be nice.

Re: Your IP. In JSON

#26
post #7

Is there an HTTPS service planned? Without it, you may just be seeing the IP of a transparent proxy server.

HTTPS can be proxied, too, transparent or not, and you'll end up with the proxy's IP. (as the HTTP headers are encrypted along with everything else, the proxy can't even include an 'X-Forwarded-For:' header) Still useful for maintaining the full 'lock' icon when embedding in other websites, though including jsonp in an https site somewhat defeats the purpose. You'd need CORS on the server for it to be useful.

An HTTPS proxy can only work when the client explicitly configures it. A proxy that can't cache or modify traffic is more like a NAT router than a proxy.

(I imagine getting the IP of the other side of any NAT router is point of this service.)

Re: Your IP. In JSON

#27
post #26

Earlier quoted context omitted.

HTTPS can be proxied, too, transparent or not, and you'll end up with the proxy's IP. (as the HTTP headers are encrypted along with everything else, the proxy can't even include an 'X-Forwarded-For:' header) Still useful for maintaining the full 'lock' icon when embedding in other websites, though including jsonp in an https site somewhat defeats the purpose. You'd need CORS on the server for it to be useful.

An HTTPS proxy can only work when the client explicitly configures it. A proxy that can't cache or modify traffic is more like a NAT router than a proxy. (I imagine getting the IP of the other side of any NAT router is point of this service.)

You can transparently proxy arbitrary network traffic. See https://github.com/apenwarr/sshuttle for an example. FWIW, I'm only pointing out that HTTPS wins you exactly nothing compared to HTTP for this particular purpose. The concept of the "correct" IP address in the context of NAT and proxies is hazy at best anyway.

Re: Your IP. In JSON

#28
That's clever and useful. Thanks. I've used http://checkip.dyndns.org for this problem for years, but this is an improvement. Checkip:

    >>> url = urllib2.urlopen("http://checkip.dyndns.org")
    >>> url.read()
    'Current IP CheckCurrent IP Address: 192.168.0.1\r\n'
Details here: http://www.dyndns.com/developers/checkip.html

It's not as easy to parse as JSON, but nor is it very difficult. The format has not changed in years; I've got a regex running I haven't needed to adjust since day 1.

Re: Your IP. In JSON

#29
post #26

Earlier quoted context omitted.

An HTTPS proxy can only work when the client explicitly configures it. A proxy that can't cache or modify traffic is more like a NAT router than a proxy. (I imagine getting the IP of the other side of any NAT router is point of this service.)

You can transparently proxy arbitrary network traffic. See https://github.com/apenwarr/sshuttle for an example. FWIW, I'm only pointing out that HTTPS wins you exactly nothing compared to HTTP for this particular purpose. The concept of the "correct" IP address in the context of NAT and proxies is hazy at best anyway.

There are ISPs that will route all (or some) port 80 traffic into a bank of caching proxies but route traffic for all other ports normally.

(GRC.COM's 'Shields Up' service makes a point of using HTTPS to make sure it's testing your external IP rather than a random proxy server.)

I suppose it depends on what you actually want to use the returned IP for. As you say, the concept is hazy.

Re: Your IP. In JSON

#30
Click on our website:

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

Website wholesale various fashion shoes, such as Nike, Jordan, prada, also includes the jeans, shirt, bags, hats and decoration. Personality manufacturing execution systems (Mes) clothing, Grab an eye bag coat + tide bag

Air jordan(1-24)shoes $30

Handbags(Coach l v f e n d i d&g) $35

Tshirts (Polo ,ed hardy,lacoste) $15

Jean(True Religion,ed hardy,coogi) $30

Sunglasses(Oakey,coach,gucci,A r m a i n i) $15

New era cap $12

Bikini (Ed hardy,polo) $20

accept paypal and free shipping

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

╭══════════════╮ http://simurl.com/voblec ╰══════════════╯

Post reply on HN