Documentation ¶
Overview ¶
Package devicefinder contains the default implementation of the agd.DeviceFinder interface.
Index ¶
Constants ¶
View Source
const ( ErrAuthenticationFailed errors.Error = "basic authentication failed" ErrNoPassword errors.Error = "no password" ErrNoUserInfo errors.Error = "no userinfo" ErrNotDoH errors.Error = "not doh" )
Authentication errors.
View Source
const DnsmasqCPEIDOption uint16 = 65074
DnsmasqCPEIDOption is the identifier of dnsmasq EDNS0 option EDNS0_OPTION_NOMCPEID.
See https://github.com/PowerDNS/dnsmasq/blob/master/src/dns-protocol.h.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Logger is used to log the operation of the device finder. It must not be // nil. Logger *slog.Logger // ProfileDB is used to find the profiles. It must not be nil. ProfileDB profiledb.Interface // HumanIDParser is used to normalize and parse human-readable device // identifiers. It must not be nil. HumanIDParser *agd.HumanIDParser // Server contains the data of the server for which the profiles are found. // It must not be nil. Server *agd.Server // DeviceDomains, if any, provides the domain names to use for looking up // device ID from TLS server names. DeviceDomains []string }
Config is the configuration structure for the default device finder.
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
Default is the default device finder.
TODO(a.garipov): Use.
func NewDefault ¶
NewDefault returns a new default device finder. c must be valid and non-nil.
func (*Default) Find ¶
func (f *Default) Find( ctx context.Context, req *dns.Msg, raddr netip.AddrPort, laddr netip.AddrPort, ) (r agd.DeviceResult)
Find implements the agd.DeviceFinder interface for *Default. ctx must contain *dnsserver.RequestInfo.
Click to show internal directories.
Click to hide internal directories.