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
+9 -1
View File
@@ -20,17 +20,25 @@ statistics_password="PASSWORD"
# redact IP addresses
redact_ip_addresses=false
# database type for statistics data, currently supports: none, memory, bolt, mysql, postgresql
# database type for statistics data, currently supports: none, memory, bolt, mysql, postgresql, sqlite, mssql
# if none is specified, no telemetry/stats will be recorded, and no result PNG will be generated
database_type="memory"
database_hostname=""
database_name=""
database_username=""
database_password=""
# database port (optional, defaults to driver default)
database_port=""
# if you use `bolt` as database, set database_file to database file location
# if you use `sqlite` as database, set database_file to database file location
database_file="speedtest.db"
# GeoIP offline database (.mmdb format) for ISP and country detection when ipinfo.io API is not available
# This is used as a fallback, matching the PHP backend behavior.
# Leave empty to disable.
# geoip_database_file="country_asn.mmdb"
# TLS and HTTP/2 settings. TLS is required for HTTP/2
enable_tls=false
enable_http2=false