edit readme
All checks were successful
Build docker container / Build image (push) Successful in 31s
All checks were successful
Build docker container / Build image (push) Successful in 31s
This commit is contained in:
parent
531ba152f7
commit
88c59e2894
32
README.md
32
README.md
@ -1,2 +1,34 @@
|
||||
# ip-svc
|
||||
Go service that will show user IPv4 and IPv6 addresses
|
||||
|
||||
![IP page screenshot](./docs/ip-svc-screenshot.png)
|
||||
|
||||
```mermaid
|
||||
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 |
|
||||
|
BIN
docs/ip-svc-screenshot.png
Normal file
BIN
docs/ip-svc-screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
Loading…
Reference in New Issue
Block a user