Files
speedtest/config/defaults.go
T

33 lines
793 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package config
// Linux path prefixes
const (
LinuxEtcDir = "/etc/speedtest/"
LinuxBaseDir = "/srv/speedtest/"
)
// Windows path prefixes(本地调试用)
const (
WinEtcDir = "./win/etc/speedtest/"
WinBaseDir = "./win/srv/speedtest/"
)
// Default database settings
const (
DefaultDBDriver = "sqlite"
DefaultDSNLinux = "/srv/speedtest/speedtest.db"
DefaultDSNWin = "./win/srv/speedtest/speedtest.db"
)
// Default web listen addressunix socket,由 Caddy 反代)
const DefaultWebAddr = "/opt/speedtest/web.sock"
// Default speedtest limits(字节)
const (
DefaultMaxDownloadBytes = 100 * 1024 * 1024 // 100 MB
DefaultMaxUploadBytes = 100 * 1024 * 1024 // 100 MB
)
// ConfigFileName is the name of the configuration file
const ConfigFileName = "speedtest.toml"