Nikita Karamov<p>Back in 2020, I wanted to build a poor man's DDNS solution for my home lab. My idea was a Telegram bot that I'd ask what the IP is, and it would respond with the current public IP of my behind-NAT router. I know, sounds insane, and I never did it. However, in the process, I got quite annoyed by how shitty most of the "what's my IP address" websites were, so I built my own one.</p><p>I was going to host it on <a href="https://polymaths.social/tags/vercel" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Vercel</span></a>, and v1 was a <a href="https://polymaths.social/tags/go" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Go</span></a> handler. I thought it was going to be fast, but the cold starts aren't very good on Vercel's free plan, so it was pretty slow.</p><p>v2 was the same idea, but repackaged as a JS function. It was a bit faster, but not by much, but I didn't care. It did what it needs to do, that's the important thing.</p><p>I am in the process of migrating my projects off GitHub and Vercel now. I was thinking about how I could run <code>ip</code> differently, how would I self-host it? Should it still be a <a href="https://polymaths.social/tags/node" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Node</span></a>.js handler? Back to Go? And then, an idea struck me: Do I even need an app for that? Can't I do it one layer below?</p><p>Introducing: <code>ip</code> v3. Now it runs completely in <a href="https://polymaths.social/tags/caddy" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Caddy</span></a>. There is no reverse proxy anywhere; Caddy just responds with the client IP immediately. I now self-host it on a cheap VPS, and it's incredibly fast. I now definitely <em>know</em> there is no tracking involved. And, the biggest thing—it now supports IPv6, while Vercel laughably does not. It's just better in every single way.</p><p><a href="https://codeberg.org/kytta/ip" rel="nofollow noopener" target="_blank">https://codeberg.org/kytta/ip</a></p><p>Makes me want to implement more stuff directly in Caddy</p>