cherry-pick: home: imp client http api, docs
Updates #3075. Squashed commit of the following: commit c88fd2e24a19474bce736e5b6af7e094b43be390 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu May 6 16:09:49 2021 +0300 home: imp code, docs commit 8ae7d9001927d56394d2177c22fe114d98f01732 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu May 6 15:35:49 2021 +0300 home: imp client http api, docs
This commit is contained in:
committed by
Ainar Garipov
parent
66d47b1462
commit
199e1f6a60
@@ -29,25 +29,25 @@ var webHandlersRegistered = false
|
||||
|
||||
// Client contains information about persistent clients.
|
||||
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
|
||||
|
||||
// Custom upstream config for this client
|
||||
// nil: not yet initialized
|
||||
// not nil, but empty: initialized, no good upstreams
|
||||
// not nil, not empty: Upstreams ready to be used
|
||||
// upstreamConfig is the custom upstream config for this client. If
|
||||
// it's nil, it has not been initialized yet. If it's non-nil and
|
||||
// empty, there are no valid upstreams. If it's non-nil and non-empty,
|
||||
// these upstream must be used.
|
||||
upstreamConfig *proxy.UpstreamConfig
|
||||
|
||||
Name string
|
||||
|
||||
IDs []string
|
||||
Tags []string
|
||||
BlockedServices []string
|
||||
Upstreams []string
|
||||
|
||||
UseOwnSettings bool
|
||||
FilteringEnabled bool
|
||||
SafeSearchEnabled bool
|
||||
SafeBrowsingEnabled bool
|
||||
ParentalEnabled bool
|
||||
UseOwnBlockedServices bool
|
||||
}
|
||||
|
||||
type clientSource uint
|
||||
@@ -63,9 +63,9 @@ const (
|
||||
|
||||
// RuntimeClient information
|
||||
type RuntimeClient struct {
|
||||
WhoisInfo *RuntimeClientWhoisInfo
|
||||
Host string
|
||||
Source clientSource
|
||||
WhoisInfo *RuntimeClientWhoisInfo
|
||||
}
|
||||
|
||||
// RuntimeClientWhoisInfo is the filtered WHOIS data for a runtime client.
|
||||
|
||||
Reference in New Issue
Block a user