Documentation ¶
Index ¶
- Variables
- func Init()
- type Config
- func (c *Config) General() General
- func (c *Config) Parse() error
- func (c *Config) Proxies() map[string]C.Proxy
- func (c *Config) Report() chan<- interface{}
- func (c *Config) Rules() []C.Rule
- func (c *Config) SetLogLevel(level C.LogLevel)
- func (c *Config) SetMode(mode Mode)
- func (c *Config) Subscribe() observable.Subscription
- func (c *Config) UpdateGeneral(general General)
- func (c *Config) UpdateProxy(pc ProxyConfig)
- func (c *Config) UpdateRules() error
- type Event
- type General
- type Mode
- type ProxyConfig
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is clash config manager
func (*Config) Report ¶
func (c *Config) Report() chan<- interface{}
Report return a channel for collecting report message
func (*Config) SetLogLevel ¶
SetLogLevel change log level of clash
func (*Config) Subscribe ¶
func (c *Config) Subscribe() observable.Subscription
Subscribe config stream
func (*Config) UpdateGeneral ¶
UpdateGeneral dispatch update event
func (*Config) UpdateProxy ¶
func (c *Config) UpdateProxy(pc ProxyConfig)
UpdateProxy dispatch update proxy event
func (*Config) UpdateRules ¶
UpdateRules is a function for hot reload rules
type General ¶
type General struct { Port int SocksPort int RedirPort int AllowLan bool Mode Mode LogLevel C.LogLevel }
General config
Click to show internal directories.
Click to hide internal directories.