1
0
Fork
You've already forked ip
0
A very simple endpoint to get your public IP address. Powered by Caddy https://ip.kytta.dev
2025年09月06日 17:50:32 +02:00
.editorconfig Update .editorconfig 2021年05月06日 10:31:43 +02:00
ip.caddyfile Allow HEAD and OPTIONS 2025年09月06日 17:29:35 +02:00
LICENSE Migrate licence to AGPL 3.0 2021年05月06日 10:36:08 +02:00
README.md Prepare moving to Codeberg 2025年09月06日 17:50:32 +02:00

kytta/ip

A very simple endpoint to get your public IP address. It's so simple, it runs in your reverse proxy!

Usage

Just send a GET request to ip.kytta.dev using your tool of choice (examples below). In response, you'll get the IP address as text/plain.

cURL

curl ip.kytta.dev

wget

wget -qO- ip.kytta.dev

HTTPie

http ip.kytta.dev

Deploy

  1. Download ip.caddyfile and place it in /etc/caddy/ (or anywhere else where Caddy can read it)

  2. Import the file in your main Caddyfile:

    import "ip.caddyfile"
    
  3. Import the ip snippet in your site block:

    https://ip.example.com,
    http://ip.example.com {
     import ip
    }
    

    Note: You should include both http and https to disable auto redirect. This makes it more accessible for tools like cURL that don't follow redirects and use http:// by default.

Licence

AGPL-3.0-only © 2025 Nikita Karamov