4 Commits

Author SHA1 Message Date
Maddie Zhan cd20f44d20 Sync PHP backend feature parity: IP detection, database backends, API endpoints, and frontend
- IP detection: Cloudflare IPv6, ULA IPv6, proxy header chain, offline GeoIP DB
- Database: add SQLite (pure Go, no CGo) and MSSQL backends
- API: add JSON result sharing endpoint and ID obfuscation
- Frontend: add modern CSS design, design switcher, favicon
- Compatibility: ?cors parameter support, human-friendly distance rounding
- Update Go to 1.21, add modernc.org/sqlite and maxminddb deps
2026-04-30 13:53:52 +08:00
minus 8e31fe25ac Make Docker image easier to use (#50)
* Use single server example as default frontend

This just works out of the box

* Refactor Dockerfile

- Remove the asset dir since it's embedded in the executable anyway
- Use the code in the current directory to build instead of downloading.
  Makes local testing very easy.
- Cache Go dependencies
- Run without root privileges. Note that using a BoltDB database
  requires mounting a volume with the correct permissions. The default
  database has thus been changed to memory so that starting the image
  just works.

* Automatically publish images
2022-07-26 23:30:23 +08:00
Maddie Zhan 2583e5113a Use default html assets 2021-09-27 11:11:08 +08:00
Maddie Zhan 7204ae2e19 Embed default assets 2021-09-17 21:06:00 +08:00