Versions in this module Expand all Collapse all v4 v4.23.2 Apr 17, 2020 Changes in this version + var DomainMatchingType_name = map[int32]string + var DomainMatchingType_value = map[string]int32 + func Fqdn(domain string) string + func NewLocalNameServer() *localNameServer + type ClassicNameServer struct + func NewClassicNameServer(address net.Destination, dispatcher routing.Dispatcher, clientIP net.IP) *ClassicNameServer + func (s *ClassicNameServer) Cleanup() error + func (s *ClassicNameServer) HandleResponse(ctx context.Context, packet *udp_proto.Packet) + func (s *ClassicNameServer) Name() string + func (s *ClassicNameServer) QueryIP(ctx context.Context, domain string, option IPOption) ([]net.IP, error) + type Client interface + Name func() string + QueryIP func(ctx context.Context, domain string, option IPOption) ([]net.IP, error) + type Config struct + ClientIp []byte + Hosts map[string]*net.IPOrDomain + NameServer []*NameServer + NameServers []*net.Endpoint + StaticHosts []*Config_HostMapping + Tag string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Config) Descriptor() ([]byte, []int) + func (*Config) ProtoMessage() + func (m *Config) GetClientIp() []byte + func (m *Config) GetHosts() map[string]*net.IPOrDomain + func (m *Config) GetNameServer() []*NameServer + func (m *Config) GetNameServers() []*net.Endpoint + func (m *Config) GetStaticHosts() []*Config_HostMapping + func (m *Config) GetTag() string + func (m *Config) Reset() + func (m *Config) String() string + func (m *Config) XXX_DiscardUnknown() + func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Config) XXX_Merge(src proto.Message) + func (m *Config) XXX_Size() int + func (m *Config) XXX_Unmarshal(b []byte) error + type Config_HostMapping struct + Domain string + Ip [][]byte + ProxiedDomain string + Type DomainMatchingType + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Config_HostMapping) Descriptor() ([]byte, []int) + func (*Config_HostMapping) ProtoMessage() + func (m *Config_HostMapping) GetDomain() string + func (m *Config_HostMapping) GetIp() [][]byte + func (m *Config_HostMapping) GetProxiedDomain() string + func (m *Config_HostMapping) GetType() DomainMatchingType + func (m *Config_HostMapping) Reset() + func (m *Config_HostMapping) String() string + func (m *Config_HostMapping) XXX_DiscardUnknown() + func (m *Config_HostMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Config_HostMapping) XXX_Merge(src proto.Message) + func (m *Config_HostMapping) XXX_Size() int + func (m *Config_HostMapping) XXX_Unmarshal(b []byte) error + type DoHNameServer struct + func NewDoHLocalNameServer(url *url.URL, clientIP net.IP) *DoHNameServer + func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.IP) (*DoHNameServer, error) + func (s *DoHNameServer) Cleanup() error + func (s *DoHNameServer) Name() string + func (s *DoHNameServer) QueryIP(ctx context.Context, domain string, option IPOption) ([]net.IP, error) + type DomainMatchingType int32 + const DomainMatchingType_Full + const DomainMatchingType_Keyword + const DomainMatchingType_Regex + const DomainMatchingType_Subdomain + func (DomainMatchingType) EnumDescriptor() ([]byte, []int) + func (x DomainMatchingType) String() string + type IPOption struct + IPv4Enable bool + IPv6Enable bool + type IPRecord struct + Expire time.Time + IP []net.Address + RCode dnsmessage.RCode + ReqID uint16 + type MultiGeoIPMatcher struct + func (c *MultiGeoIPMatcher) HasMatcher() bool + func (c *MultiGeoIPMatcher) Match(ip net.IP) bool + type NameServer struct + Address *net.Endpoint + Geoip []*router.GeoIP + PrioritizedDomain []*NameServer_PriorityDomain + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*NameServer) Descriptor() ([]byte, []int) + func (*NameServer) ProtoMessage() + func (m *NameServer) GetAddress() *net.Endpoint + func (m *NameServer) GetGeoip() []*router.GeoIP + func (m *NameServer) GetPrioritizedDomain() []*NameServer_PriorityDomain + func (m *NameServer) Reset() + func (m *NameServer) String() string + func (m *NameServer) XXX_DiscardUnknown() + func (m *NameServer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *NameServer) XXX_Merge(src proto.Message) + func (m *NameServer) XXX_Size() int + func (m *NameServer) XXX_Unmarshal(b []byte) error + type NameServer_PriorityDomain struct + Domain string + Type DomainMatchingType + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*NameServer_PriorityDomain) Descriptor() ([]byte, []int) + func (*NameServer_PriorityDomain) ProtoMessage() + func (m *NameServer_PriorityDomain) GetDomain() string + func (m *NameServer_PriorityDomain) GetType() DomainMatchingType + func (m *NameServer_PriorityDomain) Reset() + func (m *NameServer_PriorityDomain) String() string + func (m *NameServer_PriorityDomain) XXX_DiscardUnknown() + func (m *NameServer_PriorityDomain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *NameServer_PriorityDomain) XXX_Merge(src proto.Message) + func (m *NameServer_PriorityDomain) XXX_Size() int + func (m *NameServer_PriorityDomain) XXX_Unmarshal(b []byte) error + type Server struct + func New(ctx context.Context, config *Config) (*Server, error) + func (*Server) Type() interface{} + func (s *Server) Close() error + func (s *Server) IsOwnLink(ctx context.Context) bool + func (s *Server) LookupIP(domain string) ([]net.IP, error) + func (s *Server) LookupIPv4(domain string) ([]net.IP, error) + func (s *Server) LookupIPv6(domain string) ([]net.IP, error) + func (s *Server) Match(idx uint32, client Client, domain string, ips []net.IP) ([]net.IP, error) + func (s *Server) Start() error + type StaticHosts struct + func NewStaticHosts(hosts []*Config_HostMapping, legacy map[string]*net.IPOrDomain) (*StaticHosts, error) + func (h *StaticHosts) LookupIP(domain string, option IPOption) []net.Address Other modules containing this package github.com/unifyproxy/v2ray-core