From 8676cabc42ab95d42a969702965c72b89ee54f27 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 10 Oct 2019 12:32:15 +0300 Subject: [PATCH 1/3] * whois/rdns: process up to 100 top clients on startup --- home/dns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/dns.go b/home/dns.go index 8e755e06..e3ec128c 100644 --- a/home/dns.go +++ b/home/dns.go @@ -75,7 +75,7 @@ func initDNSServer() { config.dnsctx.rdns = InitRDNS(&config.clients) config.dnsctx.whois = initWhois(&config.clients) - const topClientsNumber = 30 // the number of clients to get + const topClientsNumber = 100 // the number of clients to get topClients := config.stats.GetTopClientsIP(topClientsNumber) for _, ip := range topClients { ipAddr := net.ParseIP(ip) From 6a08a9faa67f8bd06fc3898c315577adbcc69df3 Mon Sep 17 00:00:00 2001 From: Simon Zolin Date: Thu, 10 Oct 2019 13:54:26 +0300 Subject: [PATCH 2/3] - whois/rdns: start processing top clients on startup after DNS server is started --- home/dns.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/home/dns.go b/home/dns.go index e3ec128c..8db03f49 100644 --- a/home/dns.go +++ b/home/dns.go @@ -75,18 +75,6 @@ func initDNSServer() { config.dnsctx.rdns = InitRDNS(&config.clients) config.dnsctx.whois = initWhois(&config.clients) - 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) - } - } - 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 } From 701233a4b786495be2f7f8e5e33ebf041481df01 Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Thu, 10 Oct 2019 13:55:32 +0300 Subject: [PATCH 3/3] - client: fix default page size for dashboard tables --- client/src/components/Dashboard/BlockedDomains.js | 1 + client/src/components/Dashboard/Clients.js | 1 + client/src/components/Dashboard/QueriedDomains.js | 1 + 3 files changed, 3 insertions(+) diff --git a/client/src/components/Dashboard/BlockedDomains.js b/client/src/components/Dashboard/BlockedDomains.js index 00c9b64e..42288ca8 100644 --- a/client/src/components/Dashboard/BlockedDomains.js +++ b/client/src/components/Dashboard/BlockedDomains.js @@ -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" /> diff --git a/client/src/components/Dashboard/Clients.js b/client/src/components/Dashboard/Clients.js index 54ca8b7a..ace7ed21 100644 --- a/client/src/components/Dashboard/Clients.js +++ b/client/src/components/Dashboard/Clients.js @@ -72,6 +72,7 @@ const Clients = ({ showPagination={false} noDataText={t('no_clients_found')} minRows={6} + defaultPageSize={100} className="-striped -highlight card-table-overflow" /> diff --git a/client/src/components/Dashboard/QueriedDomains.js b/client/src/components/Dashboard/QueriedDomains.js index 79f77c11..0058ed64 100644 --- a/client/src/components/Dashboard/QueriedDomains.js +++ b/client/src/components/Dashboard/QueriedDomains.js @@ -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" />