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
This commit is contained in:
Maddie Zhan
2026-04-30 13:53:52 +08:00
parent 603cbdeec5
commit cd20f44d20
39 changed files with 3005 additions and 851 deletions
+6 -2
View File
@@ -14,8 +14,9 @@ type Config struct {
ServerLng float64 `mapstructure:"server_lng"`
IPInfoAPIKey string `mapstructure:"ipinfo_api_key"`
StatsPassword string `mapstructure:"statistics_password"`
RedactIP bool `mapstructure:"redact_ip_addresses"`
StatsPassword string `mapstructure:"statistics_password"`
RedactIP bool `mapstructure:"redact_ip_addresses"`
EnableIDObfuscation bool `mapstructure:"enable_id_obfuscation"`
AssetsPath string `mapstructure:"assets_path"`
@@ -26,6 +27,9 @@ type Config struct {
DatabasePassword string `mapstructure:"database_password"`
DatabaseFile string `mapstructure:"database_file"`
DatabasePort string `mapstructure:"database_port"`
GeoIPDatabaseFile string `mapstructure:"geoip_database_file"`
EnableHTTP2 bool `mapstructure:"enable_http2"`
EnableTLS bool `mapstructure:"enable_tls"`