i.z.gd now takes ?output=txt|json|xml|csv|html (?nice kept as an alias for html). i.zk.gd becomes a plain nginx 301 to i.z.gd, so the service no longer routes on Host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
969 B
Markdown
23 lines
969 B
Markdown
# ipecho
|
|
|
|
Go replacement for the PHP "what is my IP" pages on z (see `legacy/`).
|
|
|
|
- `i.z.gd`: ip, reverse DNS, user agent, unix time; `?output=txt|json|xml|csv|html`
|
|
(default txt; `?nice` is the old spelling of `output=html`)
|
|
- `i.zk.gd`: old domain, nginx `return 301 https://i.z.gd$request_uri` (no backend)
|
|
- `m.z.gd`: plain nginx `return 302 https://app.fastmail.com` (no backend)
|
|
|
|
Runs as `nobody` on 127.0.0.1:8490 behind nginx, which passes `X-Real-IP`
|
|
(only trusted from loopback). All output is escaped for its format.
|
|
|
|
## Deploy
|
|
|
|
GOOS=freebsd GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags=-s -o ipecho .
|
|
# on z:
|
|
install -m 755 ipecho /usr/local/ipecho/bin/ipecho
|
|
install -m 555 deploy/ipecho.rc /usr/local/etc/rc.d/ipecho
|
|
install -m 644 deploy/*.conf /usr/local/etc/nginx/conf.d/
|
|
sysrc ipecho_enable=YES && service ipecho restart && nginx -t && service nginx reload
|
|
|
|
Logs go to syslog (`/var/log/daemon.log`, tag `ipecho`).
|