Versions in this module Expand all Collapse all v1 v1.0.0 Nov 12, 2023 Changes in this version + const DHCPTTL + const DHCPTimeout + const DefaultTimeout + const IfaceTTL + const MaxMsgSize + const NextProtoDQ + const QUICCodeInternalError + const QUICCodeNoError + const QUICKeepAlivePeriod + const SystemDnsDeleteTimes + const SystemDnsFlushTime + var DefaultHTTPVersions = []C.HTTPVersion + var ParseNameServer func(servers []string) ([]NameServer, error) + func AddPrefix(b []byte) (m []byte) + func NewDomainFilter(domains []string) *domainFilter + func NewGeoSite(group string) (fallbackDomainFilter, error) + func NewHandler(resolver *Resolver, mapper *ResolverEnhancer) handler + func ReCreateServer(addr string, resolver *Resolver, mapper *ResolverEnhancer) + type Config struct + Default []NameServer + DomainSetPolicy map[provider.RuleProvider][]NameServer + EnhancedMode C.DNSMode + Fallback []NameServer + FallbackFilter FallbackFilter + GeositePolicy map[router.DomainMatcher][]NameServer + Hosts *trie.DomainTrie[resolver.HostValue] + IPv6 bool + IPv6Timeout uint + Main []NameServer + Policy map[string][]NameServer + Pool *fakeip.Pool + ProxyServer []NameServer + type FallbackFilter struct + Domain []string + GeoIP bool + GeoIPCode string + GeoSite []*router.DomainMatcher + IPCIDR []netip.Prefix + type LocalServer struct + func NewLocalServer(resolver *Resolver, mapper *ResolverEnhancer) *LocalServer + func (s *LocalServer) ServeMsg(ctx context.Context, msg *D.Msg) (*D.Msg, error) + type NameServer struct + Addr string + Interface string + Net string + Params map[string]string + PreferH3 bool + ProxyAdapter C.ProxyAdapter + ProxyName string + type Policy struct + func NewPolicy(data []dnsClient) *Policy + func (p *Policy) Compare(p2 *Policy) int + func (p *Policy) GetData() []dnsClient + type Resolver struct + func NewProxyServerHostResolver(old *Resolver) *Resolver + func NewResolver(config Config) *Resolver + func (r *Resolver) ExchangeContext(ctx context.Context, m *D.Msg) (msg *D.Msg, err error) + func (r *Resolver) Invalid() bool + func (r *Resolver) LookupIP(ctx context.Context, host string) (ips []netip.Addr, err error) + func (r *Resolver) LookupIPPrimaryIPv4(ctx context.Context, host string) (ips []netip.Addr, err error) + func (r *Resolver) LookupIPv4(ctx context.Context, host string) ([]netip.Addr, error) + func (r *Resolver) LookupIPv6(ctx context.Context, host string) ([]netip.Addr, error) + type ResolverEnhancer struct + func NewEnhancer(cfg Config) *ResolverEnhancer + func (h *ResolverEnhancer) FakeIPEnabled() bool + func (h *ResolverEnhancer) FindHostByIP(ip netip.Addr) (string, bool) + func (h *ResolverEnhancer) FlushFakeIP() error + func (h *ResolverEnhancer) InsertHostByIP(ip netip.Addr, host string) + func (h *ResolverEnhancer) IsExistFakeIP(ip netip.Addr) bool + func (h *ResolverEnhancer) IsFakeBroadcastIP(ip netip.Addr) bool + func (h *ResolverEnhancer) IsFakeIP(ip netip.Addr) bool + func (h *ResolverEnhancer) MappingEnabled() bool + func (h *ResolverEnhancer) PatchFrom(o *ResolverEnhancer) + func (h *ResolverEnhancer) StoreFakePoolState() + type Server struct + func (s *Server) ServeDNS(w D.ResponseWriter, r *D.Msg) + func (s *Server) SetHandler(handler handler)