Files
zzgandClaude Opus 5.5 0edc63fd2f Serve all output types on i.z.gd; redirect i.zk.gd to it
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>
2026-10-21 10:15:13 -07:00

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`).