Documentation ¶
Index ¶
- func AddCustomizedRule(rules []string) error
- func AddProxies(proxies []map[string]interface{}, clashYamlUrl string) ([]map[string]interface{}, error)
- func AddProxy(proxy map[string]interface{}) (string, error)
- func DeleteAllProxies() error
- func DeleteCustomizedRule(rules []string) error
- func DeleteProxies(ids []string) error
- func GetBuiltInRules(id string) ([]ruleEngine.Rule, error)
- func GetClasYamlUrl() (string, error)
- func GetConfigFilePath() (string, error)
- func GetCustomizedRules() ([]ruleEngine.Rule, error)
- func GetProxies() ([]map[string]interface{}, error)
- func GetProxy(id string) (map[string]interface{}, error)
- func GetRuleIds() ([]string, error)
- func GetSelectedId(bucket string) (string, error)
- func GetSelectedProxy() (map[string]interface{}, error)
- func GetSelectedRule() (string, error)
- func Reset() error
- func SetClasYamlUrl(url string) error
- func SetConfigFilePath(path string)
- func SetSelectedId(bucket, id string) error
- func SetSetting(data SettingCfg) error
- func UpdateProxy(id string, proxy map[string]interface{}) error
- func Write(c Config) error
- type AutoMode
- type Config
- type DnsServer
- type HijackDns
- type LocalServer
- type SettingCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCustomizedRule ¶ added in v0.12.0
func AddProxies ¶
func DeleteAllProxies ¶
func DeleteAllProxies() error
func DeleteCustomizedRule ¶ added in v0.12.0
func DeleteProxies ¶ added in v0.10.0
func GetBuiltInRules ¶ added in v0.8.1
func GetBuiltInRules(id string) ([]ruleEngine.Rule, error)
func GetClasYamlUrl ¶
func GetConfigFilePath ¶
func GetCustomizedRules ¶ added in v0.12.0
func GetCustomizedRules() ([]ruleEngine.Rule, error)
func GetProxies ¶
func GetRuleIds ¶ added in v0.8.1
func GetSelectedId ¶
func GetSelectedProxy ¶
func GetSelectedRule ¶
func SetClasYamlUrl ¶
func SetConfigFilePath ¶
func SetConfigFilePath(path string)
func SetSelectedId ¶
func SetSetting ¶
func SetSetting(data SettingCfg) error
func UpdateProxy ¶
Types ¶
type Config ¶
type LocalServer ¶
type SettingCfg ¶
type SettingCfg struct { Mode string `json:"mode"` DefaultInterface string `json:"defaultInterface"` LocalServer `json:"localServer"` AutoMode `json:"autoMode"` HijackDns `json:"hijackDns"` Dns struct { DisableCache bool `json:"disableCache"` Server struct { Boost []string `json:"boost"` Remote []string `json:"remote"` Local []string `json:"local"` } `json:"server"` CustomizedOptions []string `json:"customizedOptions"` } `json:"dns"` Language string `json:"language,omitempty"` BlockQuic bool `json:"blockQuic,omitempty"` Stack string `json:"stack"` }
func GetSetting ¶
func GetSetting() (SettingCfg, error)
Click to show internal directories.
Click to hide internal directories.