Versions in this module Expand all Collapse all v1 v1.31.1 Nov 1, 2023 v1.31.0 Oct 20, 2023 Changes in this version + func Init(dir string) error + func ParseAuthentication(rawRecords []string) []auth.AuthUser + func UpdateGeoDatabases() error + type Config struct + DNS *DNS + Experimental *Experimental + General *General + Hosts *trie.DomainTrie[netip.Addr] + Inbounds []C.Inbound + MainMatcher C.Matcher + Mitm *Mitm + Profile *Profile + Providers map[string]providerTypes.ProxyProvider + Proxies map[string]C.Proxy + RuleProviders map[string]C.Rule + Rules []C.Rule + Tunnels []Tunnel + Users []auth.AuthUser + func Parse(buf []byte) (*Config, error) + func ParseRawConfig(rawCfg *RawConfig) (config *Config, err error) + type Controller struct + ExternalController string + ExternalUI string + PPROF bool + Secret string + type DNS struct + DefaultNameserver []dns.NameServer + Enable bool + EnhancedMode C.DNSMode + FakeIPRange *fakeip.Pool + Fallback []dns.NameServer + FallbackFilter FallbackFilter + Hosts *trie.DomainTrie[netip.Addr] + IPv6 bool + Listen string + NameServer []dns.NameServer + NameServerPolicy map[string]dns.NameServer + ProxyServerNameserver []dns.NameServer + RemoteDnsResolve bool + RemoteNameserver []dns.NameServer + SearchDomains []string + type EBpf struct + AutoRedir []string + RedirectToTun []string + type Experimental struct + UDPFallbackMatch bool + UDPFallbackPolicy string + type FallbackFilter struct + Domain []string + GeoIP bool + GeoIPCode string + GeoSite []*router.DomainMatcher + IPCIDR []*netip.Prefix + type General struct + Authentication []string + EBpf EBpf + IPv6 bool + Interface string + LogLevel L.LogLevel + Mode T.TunnelMode + RoutingMark int + Sniffing bool + Tun C.Tun + type LegacyInbound struct + AllowLan bool + BindAddress string + MitmPort int + MixedPort int + Port int + RedirPort int + SocksPort int + TProxyPort int + type Mitm struct + Hosts *trie.DomainTrie[bool] + Rules C.RewriteRule + type Profile struct + StoreFakeIP bool + StoreSelected bool + Tracing bool + type RawConfig struct + AllowLan bool + Authentication []string + BindAddress string + DNS RawDNS + EBpf EBpf + Experimental Experimental + ExternalController string + ExternalUI string + ForceCertVerify bool + Hosts map[string]string + IPv6 bool + Inbounds []C.Inbound + Interface string + LogLevel L.LogLevel + MITM RawMitm + MitmPort int + MixedPort int + Mode T.TunnelMode + PPROF bool + Port int + Profile Profile + Proxy []C.RawProxy + ProxyGroup []map[string]any + ProxyProvider map[string]map[string]any + RedirPort int + RoutingMark int + Rule []RawRule + Script Script + Secret string + Sniffing bool + SocksPort int + TProxyPort int + Tun C.Tun + Tunnels []Tunnel + func UnmarshalRawConfig(buf []byte) (*RawConfig, error) + type RawDNS struct + DefaultNameserver []string + Enable bool + EnhancedMode C.DNSMode + FakeIPFilter []string + FakeIPRange string + Fallback []string + FallbackFilter RawFallbackFilter + IPv6 *bool + Listen string + NameServer []string + NameServerPolicy map[string]string + ProxyServerNameserver []string + RemoteDnsResolve bool + RemoteNameserver []string + SearchDomains []string + UseHosts bool + type RawFallbackFilter struct + Domain []string + GeoIP bool + GeoIPCode string + GeoSite []string + IPCIDR []string + type RawMitm struct + Hosts []string + Rules []string + type RawRule rawRule + func (r *RawRule) UnmarshalYAML(unmarshal func(any) error) error + type Script struct + Engine string + MainCode string + MainPath string + ShortcutsCode map[string]string + type Tunnel tunnel + func (t *Tunnel) UnmarshalYAML(unmarshal func(any) error) error