Documentation
¶
Index ¶
- Variables
- func AddProxy(proxy map[string]interface{}) (string, error)
- func AddRule(rule RuleCfg) (string, error)
- func DeleteProxy(id string) error
- func DeleteRule(id 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 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 Config
- type DnsItem
- type IpItem
- type IpRule
- type LocalServer
- type RuleCfg
- type SettingCfg
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigFilePath = atomic.NewString("")
Functions ¶
func DeleteProxy ¶
func DeleteRule ¶
func GetProxies ¶
func GetSelectedId ¶
func GetSelectedProxy ¶
func SetSelectedId ¶
func SetSetting ¶
func SetSetting(data SettingCfg) error
func UpdateProxy ¶
func UpdateRule ¶
Types ¶
type Config ¶ added in v0.1.5
type Config struct { Proxy []map[string]interface{} `json:"proxy"` Rule []RuleCfg `json:"rule"` Selected struct { Proxy string `json:"proxy"` Rule string `json:"rule"` } `json:"selected"` Setting SettingCfg `json:"setting"` }
type DnsItem ¶ added in v0.1.5
type DnsItem struct { Local dnsRule `json:"local"` Remote dnsRule `json:"remote"` }
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 LocalServer `json:"localServer"` }
func GetSetting ¶
func GetSetting() (SettingCfg, error)
Click to show internal directories.
Click to hide internal directories.