Documentation
¶
Overview ¶
Package server hosts the speed-test endpoints and the embedded web UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Addr string // e.g. ":8080"
MaxDownloadMiB int64 // safety cap, default 1024 (1 GiB)
MaxUploadMiB int64 // safety cap, default 1024
ReadTimeout time.Duration // per request, default 60s — uploads can be large
IPInfoToken string // optional ipinfo.io token for richer ISP data
}
Config controls the HTTP server.
type InfoResponse ¶
type InfoResponse struct {
ClientIP string `json:"client_ip"`
ISP string `json:"isp,omitempty"`
City string `json:"city,omitempty"`
Region string `json:"region,omitempty"`
Country string `json:"country,omitempty"`
ServerHost string `json:"server_host"`
ServerTime string `json:"server_time"`
}
InfoResponse is what /api/info returns.
Click to show internal directories.
Click to hide internal directories.