Documentation ¶
Overview ¶
Package querylog defines the AdGuard DNS query log constants and types and provides implementations of the log.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { // RemoteIP is the remote IP address of the client. RemoteIP netip.Addr // RequestResult is the result of filtering the DNS request. RequestResult filter.Result // ResponseResult is the result of filtering the DNS response. ResponseResult filter.Result // Time is the time of receiving the request. Time time.Time // ProfileID is the detected profile ID, if any. ProfileID agd.ProfileID // DeviceID is the detected device ID, if any. DeviceID agd.DeviceID // ClientCountry is the detected country of the client's IP address, if any. ClientCountry geoip.Country // ResponseCountry is the detected country of the first IP in the response // sent to the client, if any. ResponseCountry geoip.Country // DomainFQDN is the fully-qualified name of the requested resource. DomainFQDN string // RequestID is the ID of the request. RequestID agd.RequestID // ClientASN is the detected autonomous system number of the client's IP // address, if any. ClientASN geoip.ASN // Elapsed is the time passed since the beginning of the request processing // in milliseconds. Elapsed uint16 // RequestType is the type of the resource record of the query. RequestType dnsmsg.RRType // Protocol is the DNS protocol used. Protocol agd.Protocol // DNSSEC is set to true if the response was validated with DNSSEC. DNSSEC bool // ResponseCode is the response code sent to the client. ResponseCode dnsmsg.RCode }
Entry is a single query log entry.
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem is the file system implementation of the AdGuard DNS query log.
func NewFileSystem ¶
func NewFileSystem(c *FileSystemConfig) (l *FileSystem)
NewFileSystem creates a new file system query log. The log is safe for concurrent use.
type FileSystemConfig ¶
type FileSystemConfig struct { // Path is the path to the log file. Path string }
FileSystemConfig is the configuration of the file system query log.
Click to show internal directories.
Click to hide internal directories.