mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-12-15 19:31:45 +03:00
Merge: * whois/rdns: process up to 100 top clients on startup
Close #1055 Close #1035 * commit '701233a4b786495be2f7f8e5e33ebf041481df01': - client: fix default page size for dashboard tables - whois/rdns: start processing top clients on startup after DNS server is started * whois/rdns: process up to 100 top clients on startup
This commit is contained in:
commit
32e87b6efb
@ -57,6 +57,7 @@ const BlockedDomains = ({
|
||||
showPagination={false}
|
||||
noDataText={t('no_domains_found')}
|
||||
minRows={6}
|
||||
defaultPageSize={100}
|
||||
className="-striped -highlight card-table-overflow stats__table"
|
||||
/>
|
||||
</Card>
|
||||
|
@ -72,6 +72,7 @@ const Clients = ({
|
||||
showPagination={false}
|
||||
noDataText={t('no_clients_found')}
|
||||
minRows={6}
|
||||
defaultPageSize={100}
|
||||
className="-striped -highlight card-table-overflow"
|
||||
/>
|
||||
</Card>
|
||||
|
@ -58,6 +58,7 @@ const QueriedDomains = ({
|
||||
showPagination={false}
|
||||
noDataText={t('no_domains_found')}
|
||||
minRows={6}
|
||||
defaultPageSize={100}
|
||||
className="-striped -highlight card-table-overflow stats__table"
|
||||
/>
|
||||
</Card>
|
||||
|
24
home/dns.go
24
home/dns.go
@ -75,18 +75,6 @@ func initDNSServer() {
|
||||
config.dnsctx.rdns = InitRDNS(&config.clients)
|
||||
config.dnsctx.whois = initWhois(&config.clients)
|
||||
|
||||
const topClientsNumber = 30 // the number of clients to get
|
||||
topClients := config.stats.GetTopClientsIP(topClientsNumber)
|
||||
for _, ip := range topClients {
|
||||
ipAddr := net.ParseIP(ip)
|
||||
if !ipAddr.IsLoopback() {
|
||||
config.dnsctx.rdns.Begin(ip)
|
||||
}
|
||||
if isPublicIP(ipAddr) {
|
||||
config.dnsctx.whois.Begin(ip)
|
||||
}
|
||||
}
|
||||
|
||||
initFiltering()
|
||||
}
|
||||
|
||||
@ -242,6 +230,18 @@ func startDNSServer() error {
|
||||
return errorx.Decorate(err, "Couldn't start forwarding DNS server")
|
||||
}
|
||||
|
||||
const topClientsNumber = 100 // the number of clients to get
|
||||
topClients := config.stats.GetTopClientsIP(topClientsNumber)
|
||||
for _, ip := range topClients {
|
||||
ipAddr := net.ParseIP(ip)
|
||||
if !ipAddr.IsLoopback() {
|
||||
config.dnsctx.rdns.Begin(ip)
|
||||
}
|
||||
if isPublicIP(ipAddr) {
|
||||
config.dnsctx.whois.Begin(ip)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user