Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClashConfig ¶
type ClashConfig struct { RawConfig RawConfig // contains filtered or unexported fields }
Generate Default Clash Configuration
func (*ClashConfig) Collect ¶
func (cc *ClashConfig) Collect(encSubscription string, basedir string, ruleFilename string) error
func (*ClashConfig) Export ¶
func (cc *ClashConfig) Export() ([]byte, error)
func (*ClashConfig) Setup ¶
func (cc *ClashConfig) Setup(client string, cachestore *cache.Cache)
type Experimental ¶
type Experimental struct{}
type Generator ¶
type Generator interface { // function to gather intel Collect(encSubscription string, basedir string, ruleFilename string) error // export data to bytes Export() (data []byte, err error) // set up generator with cache Setup(client string, cache *cache.Cache) }
func NewCachedGenerator ¶
func NewGenerator ¶
type RawConfig ¶
type RawConfig struct { Port int `yaml:"port,omitempty"` SocksPort int `yaml:"socks-port,omitempty"` RedirPort int `yaml:"redir-port,omitempty"` TProxyPort int `yaml:"tproxy-port,omitempty"` MixedPort int `yaml:"mixed-port,omitempty"` Authentication []string `yaml:"authentication,omitempty"` AllowLan bool `yaml:"allow-lan,omitempty"` BindAddress string `yaml:"bind-address,omitempty"` Mode TunnelMode `yaml:"mode,omitempty"` LogLevel LogLevel `yaml:"log-level,omitempty"` IPv6 bool `yaml:"ipv6,omitempty"` ExternalController string `yaml:"external-controller,omitempty"` ExternalUI string `yaml:"external-ui,omitempty"` Secret string `yaml:"secret,omitempty"` Interface string `yaml:"interface-name,omitempty"` RoutingMark int `yaml:"routing-mark,omitempty"` ProxyProvider map[string]map[string]any `yaml:"proxy-providers,omitempty"` Hosts map[string]string `yaml:"hosts,omitempty"` DNS RawDNS `yaml:"dns,omitempty"` Experimental Experimental `yaml:"experimental,omitempty"` Profile Profile `yaml:"profile,omitempty"` Proxy []parser.Proxy `yaml:"proxies,omitempty"` ProxyGroup []map[string]any `yaml:"proxy-groups,omitempty"` Rule []string `yaml:"rules,omitempty"` }
type RawDNS ¶
type RawDNS struct { Enable bool `yaml:"enable"` IPv6 bool `yaml:"ipv6"` UseHosts bool `yaml:"use-hosts"` NameServer []string `yaml:"nameserver"` Fallback []string `yaml:"fallback"` FallbackFilter RawFallbackFilter `yaml:"fallback-filter"` Listen string `yaml:"listen"` EnhancedMode DNSMode `yaml:"enhanced-mode"` FakeIPRange string `yaml:"fake-ip-range"` FakeIPFilter []string `yaml:"fake-ip-filter"` DefaultNameserver []string `yaml:"default-nameserver"` NameServerPolicy map[string]string `yaml:"nameserver-policy"` }
type RawFallbackFilter ¶
type TunnelMode ¶
type TunnelMode int
const ( Global TunnelMode = iota Rule Direct )
func (TunnelMode) MarshalYAML ¶
func (t TunnelMode) MarshalYAML() (any, error)
func (TunnelMode) String ¶
func (t TunnelMode) String() string
Click to show internal directories.
Click to hide internal directories.