Earlier quoted context omitted.
ip4.me and ip6.me have /api endpoint for programmatic access
The /api endpoint seems to return me a 301 error from the command line.
Icanhazip: A simple IP address tool survived a deluge of users (2021)
31–40 of 146 posts
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#32Earlier quoted context omitted.
> Their sponsorship of icanhazip.com has saved me tens of thousands of dollars per month. Can someone please explain how does returning a few hundred bytes of plaintext response can cost thousands of dollars? Either I'm really bad at estimating things or there's some hidden cost somewhere I'm not seeing. Also why could it not work fine behind a Cloudflare free tier?
> In 2021, the traffic I once received in a month started arriving in 24 hours. The site went from a billion requests per day to 30-35 billion requests per day over a weekend. 30 billion times 350 bytes (size of my response) is equal to 10.5 terabytes (base-10) a day. 84 terabits per day, 84000/3600/24 ~= 1 gigabit if my math is right. A fully saturated 1 gigabit pipe of worldwide internet costs a lot. So, there.
Yeah sorry, I would not pay $30k/mo so y'all could track your external IP addresses...
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#33they'd soon learn
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#34For ridiculously easy things like this, I think it's smarter for you to just host it yourself. This way you are not forcing other people to carry your burden. nginx config example: location /ip { add_header Content-Type "application/json"; return 200 '{"host":"$server_name","ip":"$remote_addr","port":"$remote_port","server_ip":"$server_addr","server_port":"$server_port "}\n'; } Which will return something like this i…
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#35Why not use protocols which are specifically designed to report mapped IP address like STUN? It's faster as UDP exchange is shorter than 3-way TCP handshake (or even TCP+TLS handshake). Here is an implementation which uses parallel STUN queries to report address reliably as fast as possible: https://github.com/Snawoot/myip
But unfortunately I don't have it in a random docker/kubernetes containers or random internal servers, and these are the contexts where I personally usually want to check my external IP. They usually have curl though.
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#36Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#37Earlier quoted context omitted.
> In 2021, the traffic I once received in a month started arriving in 24 hours. The site went from a billion requests per day to 30-35 billion requests per day over a weekend. 30 billion times 350 bytes (size of my response) is equal to 10.5 terabytes (base-10) a day. 84 terabits per day, 84000/3600/24 ~= 1 gigabit if my math is right. A fully saturated 1 gigabit pipe of worldwide internet costs a lot. So, there.
At $0.085 per GB (some us-east-1 exfil cost Google gave me), 10TB is... ~$1k/day? Yeah sorry, I would not pay $30k/mo so y'all could track your external IP addresses...
And that's if you truly expect to saturate it. If you just want to take the risk and go for oversold fiber, you can pay some nominal price for "unmetered bandwidth" (with the caveat that if you're saturating the pipe, your host will probably make you pay for it eventually).
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#38Earlier quoted context omitted.
> In 2021, the traffic I once received in a month started arriving in 24 hours. The site went from a billion requests per day to 30-35 billion requests per day over a weekend. 30 billion times 350 bytes (size of my response) is equal to 10.5 terabytes (base-10) a day. 84 terabits per day, 84000/3600/24 ~= 1 gigabit if my math is right. A fully saturated 1 gigabit pipe of worldwide internet costs a lot. So, there.
At $0.085 per GB (some us-east-1 exfil cost Google gave me), 10TB is... ~$1k/day? Yeah sorry, I would not pay $30k/mo so y'all could track your external IP addresses...
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#39Why not use protocols which are specifically designed to report mapped IP address like STUN? It's faster as UDP exchange is shorter than 3-way TCP handshake (or even TCP+TLS handshake). Here is an implementation which uses parallel STUN queries to report address reliably as fast as possible: https://github.com/Snawoot/myip
Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)
#40For ridiculously easy things like this, I think it's smarter for you to just host it yourself. This way you are not forcing other people to carry your burden. nginx config example: location /ip { add_header Content-Type "application/json"; return 200 '{"host":"$server_name","ip":"$remote_addr","port":"$remote_port","server_ip":"$server_addr","server_port":"$server_port "}\n'; } Which will return something like this i…