Documentation ¶
Index ¶
- Constants
- func CurrentConfigFile() string
- func EmojiDecode(data []byte) int
- func SaveConfig(configFile string, config *Config) error
- type Config
- func (c *Config) GetControllerDomain() string
- func (c *Config) GetControllerInterface() string
- func (c *Config) GetControllerPort() string
- func (c *Config) GetDNSServers() []string
- func (c *Config) GetGeoIPDBFile() string
- func (c *Config) GetHTTPInterface() string
- func (c *Config) GetHTTPMap() *HttpMap
- func (c *Config) GetHTTPPort() string
- func (c *Config) GetLocalDNS() [][]string
- func (c *Config) GetLogLevel() string
- func (c *Config) GetMITM() *Mitm
- func (c *Config) GetProxy() map[string][]string
- func (c *Config) GetProxyGroup() map[string][]string
- func (c *Config) GetRttUrl() string
- func (c *Config) GetRule() [][]string
- func (c *Config) GetSOCKSInterface() string
- func (c *Config) GetSOCKSPort() string
- func (c *Config) SetControllerInterface(inter string)
- func (c *Config) SetControllerPort(port string)
- func (c *Config) SetDNSServers(servers []string)
- func (c *Config) SetHTTPInterface(inter string)
- func (c *Config) SetHTTPMap(httpMap *HttpMap)
- func (c *Config) SetHTTPPort(port string)
- func (c *Config) SetLocalDNS(localDNSs [][]string)
- func (c *Config) SetLogLevel(l string)
- func (c *Config) SetMITM(mitm *Mitm)
- func (c *Config) SetProxy(proxy map[string][]string)
- func (c *Config) SetProxyGroup(group map[string][]string)
- func (c *Config) SetRttUrl(rttUrl string)
- func (c *Config) SetRule(rule [][]string)
- func (c *Config) SetSOCKSInterface(inter string)
- func (c *Config) SetSOCKSPort(port string)
- type General
- type HttpMap
- type Mitm
- type ModifyMap
Constants ¶
View Source
const ConfigFileVersion = "v1.0.1"
View Source
const SetAsSystemProxyAuto = "auto"
View Source
const ShuttleVersion = "v0.6.0"
Variables ¶
This section is empty.
Functions ¶
func CurrentConfigFile ¶
func CurrentConfigFile() string
func EmojiDecode ¶
Types ¶
type Config ¶
type Config struct { Ver string `yaml:"ver"` General *General `yaml:"General"` Proxy map[string][]string `yaml:"Proxy,[flow],2quoted"` ProxyGroup map[string][]string `yaml:"Proxy-Group,[flow],2quoted"` LocalDNSs [][]string `yaml:"Local-DNS,[flow],2quoted"` Mitm *Mitm `yaml:"MITM"` Rule [][]string `yaml:"Rule,[flow],2quoted"` HttpMap *HttpMap `yaml:"Http-Map"` RttUrl string `yaml:"rtt-url"` }
func CurrentConfig ¶
func CurrentConfig() *Config
func ReloadConfig ¶
func (*Config) GetControllerInterface ¶
func (*Config) GetControllerPort ¶
func (*Config) GetDNSServers ¶
dns func GetControllerDomain() string ==> controller func GetControllerPort() string ==> controller
func (*Config) GetGeoIPDBFile ¶
func (*Config) GetHTTPPort ¶
func (*Config) GetLocalDNS ¶
func (*Config) GetProxyGroup ¶
func (*Config) GetSOCKSPort ¶
func (*Config) SetControllerInterface ¶
func (*Config) SetControllerPort ¶
func (*Config) SetDNSServers ¶
func (*Config) SetHTTPInterface ¶
func (*Config) SetHTTPMap ¶
func (*Config) SetHTTPPort ¶
func (*Config) SetLocalDNS ¶
func (*Config) SetLogLevel ¶
func (*Config) SetProxyGroup ¶
func (*Config) SetSOCKSInterface ¶
func (*Config) SetSOCKSPort ¶
type General ¶
type General struct { LogLevel string `yaml:"loglevel,2quoted"` DNSServer []string `yaml:"dns-server,2quoted"` HttpPort string `yaml:"http-port,2quoted"` HttpInterface string `yaml:"http-interface,2quoted"` SocksPort string `yaml:"socks-port,2quoted"` SocksInterface string `yaml:"socks-interface,2quoted"` ControllerPort string `yaml:"controller-port,2quoted"` ControllerInterface string `yaml:"controller-interface,2quoted"` SetAsSystemProxy string `yaml:"set-as-system-proxy,2quoted"` }
Click to show internal directories.
Click to hide internal directories.