diff --git a/internal/config/default.go b/internal/config/default.go index 3c770e3..0b3ae80 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -39,6 +39,9 @@ var defaultConfig = ConfFromFile{ "token": "", }, }, + Reality: RealityConf{ + Addr: "http://www.baidu.com", + }, CustomHeader: map[string]interface{}{ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", }, diff --git a/internal/config/models.go b/internal/config/models.go index 55355cb..1466f94 100644 --- a/internal/config/models.go +++ b/internal/config/models.go @@ -27,6 +27,11 @@ type ( Provider string `json:"provider" yaml:"provider"` Config map[string]interface{} `json:"config" yaml:"config"` } + + RealityConf struct { + Enable bool `json:"enable" yaml:"enable"` + Addr string `json:"addr" yaml:"addr"` + } ) type SettingsConf struct { @@ -34,5 +39,6 @@ type SettingsConf struct { Guardian GuardianConf `json:"guardian" yaml:"guardian"` Log LogConf `json:"log" yaml:"log"` DDNS DdnsConf `json:"ddns" yaml:"ddns"` + Reality RealityConf `json:"reality" yaml:"reality"` CustomHeader map[string]interface{} `json:"custom_header" yaml:"custom_header"` }