Mans Ziesel
ccdfdfb372
All checks were successful
Build docker container / Build image (push) Successful in 27s
|
||
---|---|---|
.gitea/workflows | ||
docs | ||
templates | ||
.air.toml | ||
.gitignore | ||
compose.yml | ||
Dockerfile | ||
go.mod | ||
LICENSE | ||
main.go | ||
README.md |
ip-svc
Go service that will show user IPv4 and IPv6 addresses
flowchart TD
A[net/http]
A --> B{get request RemoteAddress}
B --> C{is ipv6?}
C -->|yes| D[render template with IPv6 address]
C -->|no| E[render template with IPv4 address]
D --> F{request ipv4 address from ip4.mziesel.nl}
F -->|success| G[add address to page]
E --> H{request ipv6 address from ip6.mziesel.nl}
H -->|success| G[add address to page]
works by creating four dns records
A ip.mziesel.nl <server ipv4>
AAAA ip.mziesel.nl <server ipv6>
A ip4.mziesel.nl <server ipv4>
AAAA ip6.mziesel.nl <server ipv6>
endpoints
Endpoint | Description |
---|---|
/ |
HTML page |
/raw |
Just the raw IP |
/json |
Data in json |
the application is also available as a docker image