Documentation ¶
Index ¶
- func AddProxies(proxies []map[string]interface{}) ([]map[string]interface{}, error)
- func AddProxy(proxy map[string]interface{}) (string, error)
- func AddRule(rule RuleCfg) (string, error)
- func DeleteAllProxies() error
- func DeleteProxy(id string) error
- func DeleteRule(id string) error
- func GetClasYamlUrl() (string, error)
- func GetConfigFilePath() (string, error)
- func GetProxies() ([]map[string]interface{}, error)
- func GetProxy(id string) (map[string]interface{}, error)
- func GetSelectedId(bucket string) (string, error)
- func GetSelectedProxy() (map[string]interface{}, 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 UpdateRule(id string, rule RuleCfg) error
- func Write(c Config) error
- type AutoMode
- type Config
- type DnsItem
- type DnsServer
- type IpItem
- type IpRule
- type LocalServer
- type RuleCfg
- type SettingCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProxies ¶ added in v0.2.1
func DeleteAllProxies ¶ added in v0.2.1
func DeleteAllProxies() error
func DeleteProxy ¶
func DeleteRule ¶
func GetClasYamlUrl ¶ added in v0.2.2
func GetConfigFilePath ¶ added in v0.2.7
func GetProxies ¶
func GetSelectedId ¶
func GetSelectedProxy ¶
func SetClasYamlUrl ¶ added in v0.2.2
func SetConfigFilePath ¶ added in v0.2.2
func SetConfigFilePath(path string)
func SetSelectedId ¶
func SetSetting ¶
func SetSetting(data SettingCfg) error
func UpdateProxy ¶
func UpdateRule ¶
Types ¶
type Config ¶ added in v0.1.5
type DnsItem ¶ added in v0.1.5
type DnsItem struct { Domains dnsRule `json:"domains"` GeoSites dnsRule `json:"geoSites"` }
type LocalServer ¶ added in v0.1.5
type RuleCfg ¶ added in v0.1.5
type RuleCfg struct { Id string `json:"id"` Name string `json:"name"` Dns DnsItem `json:"dns"` Ip IpItem `json:"ip"` }
func GetSelectedRule ¶
type SettingCfg ¶ added in v0.1.5
type SettingCfg struct { DefaultInterface string `json:"defaultInterface"` TrueProxyServer string `json:"trueProxyServer"` LocalServer `json:"localServer"` AutoMode `json:"autoMode"` Dns struct { Boost DnsServer `json:"boost"` Remote DnsServer `json:"remote"` Local DnsServer `json:"local"` } `json:"dns"` }
func GetSetting ¶
func GetSetting() (SettingCfg, error)
Click to show internal directories.
Click to hide internal directories.