Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultConfig = Config{
APIAddress: "http://127.0.0.1:9090",
Secret: "",
TestURL: "http://www.gstatic.com/generate_204",
Timeout: 5000,
ProxyAddress: "http://127.0.0.1:7890",
Language: "auto",
AutoRefreshInterval: 5,
}
DefaultConfig 默认配置
View Source
var ErrConfigNotFound = errors.New("配置文件不存在")
ErrConfigNotFound 配置文件不存在
Functions ¶
func GetMihomoConfigPath ¶
GetMihomoConfigPath 获取 mihomo 配置文件的默认路径
Types ¶
type Config ¶
type Config struct {
APIAddress string `mapstructure:"api_address"`
Secret string `mapstructure:"secret"`
TestURL string `mapstructure:"test_url"`
Timeout int `mapstructure:"timeout"`
ProxyAddress string `mapstructure:"proxy_address"`
Language string `mapstructure:"language"`
AutoRefreshInterval int `mapstructure:"auto_refresh_interval"`
}
Config 配置结构
Click to show internal directories.
Click to hide internal directories.