Documentation ¶
Overview ¶
Package home contains AdGuard Home's HTTP API methods.
Index ¶
Constants ¶
const ( ClientSourceWHOIS clientSource = iota ClientSourceRDNS ClientSourceDHCP ClientSourceARP ClientSourceHostsFile )
Client sources. The order determines the priority.
const MaxConnReadSize = 64 * 1024
MaxConnReadSize is an upper limit in bytes for reading from net.Conn.
const MaxFileSize = 1024 * 1024
MaxFileSize is a maximum file length in bytes.
Variables ¶
var Context homeContext
Context - a global context object
var GLMode bool
GLMode - enable GL-Inet compatibility mode
Functions ¶
func StartMods ¶
func StartMods() error
StartMods initializes and starts the DNS server after installation.
func WebCheckPortAvailable ¶
WebCheckPortAvailable - check if port is available BUT: if we are already using this port, no need
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
Auth - global object
func (*Auth) AuthRequired ¶
AuthRequired - if authentication is required
func (*Auth) RemoveSession ¶
RemoveSession - remove session
type Client ¶
type Client struct { IDs []string Tags []string Name string UseOwnSettings bool // false: use global settings FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool UseOwnBlockedServices bool // false: use global settings BlockedServices []string Upstreams []string // list of upstream servers to be used for the client's requests // contains filtered or unexported fields }
Client contains information about persistent clients.
type Filtering ¶
type Filtering struct {
// contains filtered or unexported fields
}
Filtering - module object
func (*Filtering) RegisterFilteringHandlers ¶
func (f *Filtering) RegisterFilteringHandlers()
RegisterFilteringHandlers - register handlers
type HTTPSServer ¶
type HTTPSServer struct {
// contains filtered or unexported fields
}
HTTPSServer - HTTPS Server
type RDNS ¶
type RDNS struct {
// contains filtered or unexported fields
}
RDNS resolves clients' addresses to enrich their metadata.
func NewRDNS ¶ added in v0.106.0
func NewRDNS( exchanger dnsforward.RDNSExchanger, clients *clientsContainer, ) (rDNS *RDNS)
NewRDNS creates and returns initialized RDNS.
type RuntimeClient ¶ added in v0.106.0
type RuntimeClient struct { Host string Source clientSource WhoisInfo *RuntimeClientWhoisInfo }
RuntimeClient information
type RuntimeClientWhoisInfo ¶ added in v0.106.0
type RuntimeClientWhoisInfo struct { City string `json:"city,omitempty"` Country string `json:"country,omitempty"` Orgname string `json:"orgname,omitempty"` }
RuntimeClientWhoisInfo is the filtered WHOIS data for a runtime client.
type TLSMod ¶
type TLSMod struct {
// contains filtered or unexported fields
}
TLSMod - TLS module object
func (*TLSMod) Reload ¶
func (t *TLSMod) Reload()
Reload updates the configuration of TLSMod and restarts it.
func (*TLSMod) Start ¶
func (t *TLSMod) Start()
Start updates the configuration of TLSMod and starts it.
func (*TLSMod) WriteDiskConfig ¶
func (t *TLSMod) WriteDiskConfig(conf *tlsConfigSettings)
WriteDiskConfig - write config