Versions in this module Expand all Collapse all v1 v1.0.2 Apr 25, 2024 Changes in this version type DNS + func ParseDNS(rawCfg *RawConfig) (*DNS, error) v1.0.1 Apr 24, 2024 Changes in this version + var ErrIncompleteConf = errors.New("ExternalUI configure incomplete") + var ExternalUIFolder string + var ExternalUIName string + var ExternalUIPath string + var ExternalUIURL string + var GroupsList = list.New() + var ParsingProxiesCallback func(groupsList *list.List, proxiesList *list.List) + var ProxiesList = list.New() + func Init(dir string) error + func UpdateGeoDatabases() error + func UpdateUI() error + type Config struct + DNS *DNS + Experimental *Experimental + General *General + Hosts *trie.DomainTrie[resolver.HostValue] + IPTables *IPTables + Listeners map[string]C.InboundListener + NTP *NTP + Profile *Profile + Providers map[string]providerTypes.ProxyProvider + Proxies map[string]C.Proxy + RuleProviders map[string]providerTypes.RuleProvider + Rules []C.Rule + 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 + 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 struct + 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 + LogLevel log.LogLevel + Mode T.TunnelMode + 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 + UseHosts 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 + AutoRoute bool + DNSHijack []string + Device string + Enable bool + EndpointIndependentNat bool + ExcludeInterface []string + ExcludePackage []string + ExcludeUID []uint32 + ExcludeUIDRange []string + FileDescriptor int + GSO bool + GSOMaxSize uint32 + 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 + RedirectToTun []string + Stack C.TUNStack + StrictRoute bool + TableIndex int + 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