Versions in this module Expand all Collapse all v1 v1.18.12 Jul 2, 2024 v1.18.11 Jul 2, 2024 v1.18.10 Jul 2, 2024 v1.18.9 Jul 2, 2024 v1.18.8 Jul 2, 2024 Changes in this version + var GroupsList = list.New() + var ParsingProxiesCallback func(groupsList *list.List, proxiesList *list.List) + var ProxiesList = list.New() type Config + DNS *DNS + Experimental *Experimental + Hosts *trie.DomainTrie[resolver.HostValue] + IPTables *IPTables + Listeners map[string]C.InboundListener + NTP *NTP + Profile *Profile + Providers map[string]providerTypes.ProxyProvider + RuleProviders map[string]providerTypes.RuleProvider + Sniffer *Sniffer + SubRules map[string][]C.Rule + TLS *TLS + Tunnels []LC.Tunnel + Users []auth.AuthUser + func Parse(buf []byte) (*Config, error) + func ParseRawConfig(rawCfg *RawConfig) (*Config, error) + type Controller struct + ExternalController string + ExternalControllerTLS string + ExternalControllerUnix string + ExternalUI string + Secret string + type DNS struct + CacheAlgorithm string + DefaultNameserver []dns.NameServer + Enable bool + EnhancedMode C.DNSMode + FakeIPRange *fakeip.Pool + Fallback []dns.NameServer + FallbackFilter FallbackFilter + Hosts *trie.DomainTrie[resolver.HostValue] + IPv6 bool + IPv6Timeout uint + Listen string + NameServer []dns.NameServer + NameServerPolicy *orderedmap.OrderedMap[string, []dns.NameServer] + PreferH3 bool + ProxyServerNameserver []dns.NameServer + UseSystemHosts bool + type EBpf struct + AutoRedir []string + RedirectToTun []string + type Experimental struct + Fingerprints []string + IP4PEnable bool + QUICGoDisableECN bool + QUICGoDisableGSO bool + type FallbackFilter struct + Domain []string + GeoIP bool + GeoIPCode string + GeoSite []router.DomainMatcher + IPCIDR []netip.Prefix type General + EBpf EBpf + FindProcessMode P.FindProcessMode + GeoAutoUpdate bool + GeoUpdateInterval int + GeoXUrl GeoXUrl + GeodataLoader string + GeodataMode bool + GeositeMatcher string + GlobalClientFingerprint string + GlobalUA string + IPv6 bool + Interface string + RoutingMark int + Sniffing bool + TCPConcurrent bool + UnifiedDelay bool + type GeoXUrl struct + ASN string + GeoIp string + GeoSite string + Mmdb string + type IPTables struct + Bypass []string + DnsRedirect bool + Enable bool + InboundInterface string + type Inbound struct + AllowLan bool + Authentication []string + BindAddress string + InboundMPTCP bool + InboundTfo bool + LanAllowedIPs []netip.Prefix + LanDisAllowedIPs []netip.Prefix + MixedPort int + Port int + RedirPort int + ShadowSocksConfig string + SkipAuthPrefixes []netip.Prefix + SocksPort int + TProxyPort int + TuicServer LC.TuicServer + Tun LC.Tun + VmessConfig string + type NTP struct + DialerProxy string + Enable bool + Interval int + Port int + Server string + WriteToSystem bool + type Profile struct + StoreFakeIP bool + StoreSelected bool + type RawClashForAndroid struct + AppendSystemDNS bool + UiSubtitlePattern string + type RawConfig struct + AllowLan bool + Authentication []string + BindAddress string + ClashForAndroid RawClashForAndroid + DNS RawDNS + EBpf EBpf + Experimental Experimental + ExternalController string + ExternalControllerTLS string + ExternalControllerUnix string + ExternalUI string + ExternalUIName string + ExternalUIURL string + FindProcessMode P.FindProcessMode + GeoAutoUpdate bool + GeoUpdateInterval int + GeoXUrl GeoXUrl + GeodataLoader string + GeodataMode bool + GeositeMatcher string + GlobalClientFingerprint string + GlobalUA string + Hosts map[string]any + IPTables IPTables + IPv6 bool + InboundMPTCP bool + InboundTfo bool + Interface string + KeepAliveInterval int + LanAllowedIPs []netip.Prefix + LanDisAllowedIPs []netip.Prefix + Listeners []map[string]any + LogLevel log.LogLevel + MixedPort int + Mode T.TunnelMode + NTP RawNTP + Port int + Profile Profile + Proxy []map[string]any + ProxyGroup []map[string]any + ProxyProvider map[string]map[string]any + RawTLS TLS + RedirPort int + RoutingMark int + Rule []string + RuleProvider map[string]map[string]any + Secret string + ShadowSocksConfig string + SkipAuthPrefixes []netip.Prefix + Sniffer RawSniffer + SocksPort int + SubRules map[string][]string + TCPConcurrent bool + TProxyPort int + TuicServer RawTuicServer + Tun RawTun + Tunnels []LC.Tunnel + UnifiedDelay bool + VmessConfig string + func UnmarshalRawConfig(buf []byte) (*RawConfig, error) + type RawDNS struct + CacheAlgorithm string + DefaultNameserver []string + Enable bool + EnhancedMode C.DNSMode + FakeIPFilter []string + FakeIPRange string + Fallback []string + FallbackFilter RawFallbackFilter + IPv6 bool + IPv6Timeout uint + Listen string + NameServer []string + NameServerPolicy *orderedmap.OrderedMap[string, any] + PreferH3 bool + ProxyServerNameserver []string + RespectRules bool + UseHosts bool + UseSystemHosts bool + type RawFallbackFilter struct + Domain []string + GeoIP bool + GeoIPCode string + GeoSite []string + IPCIDR []string + type RawNTP struct + DialerProxy string + Enable bool + Interval int + Server string + ServerPort int + WriteToSystem bool + type RawSniffer struct + Enable bool + ForceDnsMapping bool + ForceDomain []string + OverrideDest bool + ParsePureIp bool + Ports []string + SkipDomain []string + Sniff map[string]RawSniffingConfig + Sniffing []string + type RawSniffingConfig struct + OverrideDest *bool + Ports []string + type RawTuicServer struct + ALPN []string + AuthenticationTimeout int + CWND int + Certificate string + CongestionController string + Enable bool + Listen string + MaxIdleTime int + MaxUdpRelayPacketSize int + PrivateKey string + Token []string + Users map[string]string + type RawTun struct + AutoDetectInterface bool + AutoRedirect bool + AutoRedirectInputMark uint32 + AutoRedirectOutputMark uint32 + AutoRoute bool + DNSHijack []string + Device string + Enable bool + EndpointIndependentNat bool + ExcludeInterface []string + ExcludePackage []string + ExcludeUID []uint32 + ExcludeUIDRange []string + FileDescriptor int + GSO bool + GSOMaxSize uint32 + IPRoute2RuleIndex int + IPRoute2TableIndex int + IncludeAndroidUser []int + IncludeInterface []string + IncludePackage []string + IncludeUID []uint32 + IncludeUIDRange []string + Inet4RouteAddress []netip.Prefix + Inet4RouteExcludeAddress []netip.Prefix + Inet6Address []netip.Prefix + Inet6RouteAddress []netip.Prefix + Inet6RouteExcludeAddress []netip.Prefix + MTU uint32 + RouteAddress []netip.Prefix + RouteAddressSet []string + RouteExcludeAddress []netip.Prefix + RouteExcludeAddressSet []string + Stack C.TUNStack + StrictRoute bool + UDPTimeout int64 + type Sniffer struct + Enable bool + ForceDnsMapping bool + ForceDomain *trie.DomainSet + ParsePureIp bool + SkipDomain *trie.DomainSet + Sniffers map[snifferTypes.Type]SNIFF.SnifferConfig + type TLS struct + Certificate string + CustomTrustCert []string + PrivateKey string v0 v0.7.1 Sep 21, 2018 v0.7.0 Sep 16, 2018 v0.6.0 Aug 12, 2018 Changes in this version + var ModeMapping = map[string]Mode + func Init() + type Config struct + func Instance() *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 struct + Payload interface{} + Type string + type General struct + AllowLan bool + LogLevel C.LogLevel + Mode Mode + Port int + RedirPort int + SocksPort int + type Mode int + const Direct + const Global + const Rule + func (m Mode) String() string + type ProxyConfig struct + AllowLan *bool + Port *int + RedirPort *int + SocksPort *int