Go to file
Mans Ziesel ccdfdfb372
All checks were successful
Build docker container / Build image (push) Successful in 27s
add docker image to readme
2024-06-03 16:03:29 +02:00
.gitea/workflows docker test 2024-06-03 13:14:17 +02:00
docs edit readme 2024-06-03 15:54:17 +02:00
templates fix padding 2024-06-03 14:31:30 +02:00
.air.toml base api 2024-06-02 22:09:02 +02:00
.gitignore base api 2024-06-02 22:09:02 +02:00
compose.yml docker test 2024-06-03 13:14:17 +02:00
Dockerfile docker test 2024-06-03 13:14:17 +02:00
go.mod base api 2024-06-02 22:09:02 +02:00
LICENSE Initial commit 2024-06-02 18:22:35 +00:00
main.go change html template 2024-06-03 14:15:07 +02:00
README.md add docker image to readme 2024-06-03 16:03:29 +02:00

ip-svc

Go service that will show user IPv4 and IPv6 addresses

IP page screenshot

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