Skip to content
/ ip.wtf Public

Yet another "What's my IP address?" service!

License

Notifications You must be signed in to change notification settings

dgl/ip.wtf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6cbd99c · Mar 13, 2025
Mar 13, 2025
Jan 31, 2024
Nov 1, 2023
Jan 16, 2022
Nov 3, 2023
Mar 12, 2024
Mar 12, 2024
Mar 12, 2024
Nov 3, 2023
Nov 1, 2023
Nov 3, 2023
Nov 1, 2023
May 2, 2022
Nov 1, 2023
Mar 13, 2025
Mar 13, 2025
Jun 19, 2024
Nov 17, 2023
Mar 10, 2025
Nov 3, 2023
Jun 27, 2023
Oct 27, 2023

Repository files navigation

ip.wtf

The code behind https://ip.wtf

Using

Just visit it.

What's my IP in a script?

IPV4=$(curl -s v4.ip.wtf)
IPV6=$(curl -s v6.ip.wtf)
echo "Public IPv4: $IPV4, Public IPv6: $IPV6"

Why?

Because I can.

Sites like this give you details like the headers their reverse proxy server injects so the results aren't very trustworthy, the "Raw HTTP request" is really the bytes your browser (or a proxy on your side of the connection) sent.

In general this aims to be as privacy preserving as possible, while revealing details about your browser and connection, that might be sensitive.

Building and running

Testing

go run .

Use http://localhost:8080

Production

Something like:

$ docker run --name=ip.wtf -d --net=host ghcr.io/dgl/ip.wtf:latest
$ curl localhost:8080
127.0.0.1

In reality you'll need a few more pieces for a full production setup:

Licence

This product includes GeoLite2 data created by MaxMind, available from https://www.maxmind.com.

Otherwise; 0BSD, no warranty. http://©.st/dgl