Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { General *General // DNS *DNS Experimental *Experimental Hosts *trie.Trie Rules []C.Rule Users []auth.AuthUser Proxies map[string]C.Proxy Providers map[string]provider.ProxyProvider }
Config is clash config manager
func ParseRawConfig ¶
type Experimental ¶
type Experimental struct { IgnoreResolveFail bool `yaml:"ignore-resolve-fail"` Interface string `yaml:"interface-name"` }
Experimental config
type FallbackFilter ¶
FallbackFilter config
type General ¶
type General struct { Port int `json:"port"` SocksPort int `json:"socks-port"` RedirPort int `json:"redir-port"` Authentication []string `json:"authentication"` AllowLan bool `json:"allow-lan"` BindAddress string `json:"bind-address"` // Mode T.TunnelMode `json:"mode"` LogLevel log.LogLevel `json:"log-level"` ExternalController string `json:"-"` ExternalUI string `json:"-"` Secret string `json:"-"` }
General config
type RawConfig ¶
type RawConfig struct { Port int `yaml:"port"` SocksPort int `yaml:"socks-port"` RedirPort int `yaml:"redir-port"` Authentication []string `yaml:"authentication"` AllowLan bool `yaml:"allow-lan"` BindAddress string `yaml:"bind-address"` Mode T.TunnelMode `yaml:"mode"` LogLevel log.LogLevel `yaml:"log-level"` ExternalController string `yaml:"external-controller"` ExternalUI string `yaml:"external-ui"` Secret string `yaml:"secret"` ProxyProvider map[string]map[string]interface{} `yaml:"proxy-providers"` Hosts map[string]string `yaml:"hosts"` // DNS RawDNS `yaml:"dns"` Experimental Experimental `yaml:"experimental"` Proxy []map[string]interface{} `yaml:"proxies"` ProxyGroup []map[string]interface{} `yaml:"proxy-groups"` Rule []string `yaml:"rules"` // remove after 1.0 ProxyProviderOld map[string]map[string]interface{} `yaml:"proxy-provider"` ProxyOld []map[string]interface{} `yaml:"Proxy"` ProxyGroupOld []map[string]interface{} `yaml:"Proxy Group"` RuleOld []string `yaml:"Rule"` }
func UnmarshalRawConfig ¶
Click to show internal directories.
Click to hide internal directories.