docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtest" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter" <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/miekg/dns" <mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghnet" </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts } </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/dnsforward/dnsforward_test.go
EtcHosts: &aghnet.EtcHostsContainer{},
<mask> } <mask> <mask> func TestPTRResponseFromHosts(t *testing.T) { <mask> c := dnsfilter.Config{ <mask> AutoHosts: &util.AutoHosts{}, <mask> } <mask> <mask> // Prepare test hosts file. <mask> hf, err := ioutil.TempFile("", "") <mask> require.NoError(t, err) </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove Context.autoHosts.Start() </s> add Context.etcHosts.Start() </s> remove c.AutoHosts.Init(hf.Name()) t.Cleanup(c.AutoHosts.Close) </s> add c.EtcHosts.Init(hf.Name()) t.Cleanup(c.EtcHosts.Close) </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/dnsforward/dnsforward_test.go
c.EtcHosts.Init(hf.Name()) t.Cleanup(c.EtcHosts.Close)
<mask> _, _ = hf.WriteString(" 127.0.0.1 host # comment \n") <mask> _, _ = hf.WriteString(" ::1 localhost#comment \n") <mask> <mask> // Init auto hosts. <mask> c.AutoHosts.Init(hf.Name()) <mask> t.Cleanup(c.AutoHosts.Close) <mask> <mask> var snd *aghnet.SubnetDetector <mask> snd, err = aghnet.NewSubnetDetector() <mask> require.NoError(t, err) <mask> require.NotNil(t, snd) </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove AutoHosts: &util.AutoHosts{}, </s> add EtcHosts: &aghnet.EtcHostsContainer{}, </s> remove "Print this help. Show more detailed version description with -v", </s> add "Print this help", </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove autoHosts *util.AutoHosts // get entries from system hosts-files </s> add etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/dnsforward/dnsforward_test.go
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter" <mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward" <mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog" <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/dnsproxy/proxy" <mask> "github.com/AdguardTeam/dnsproxy/upstream" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghnet" </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files
<mask> <mask> // dnsServer is used for checking clients IP status access list status <mask> dnsServer *dnsforward.Server <mask> <mask> autoHosts *util.AutoHosts // get entries from system hosts-files <mask> <mask> testing bool // if TRUE, this object is used for internal tests <mask> } <mask> <mask> // Init initializes clients container </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` </s> remove clients clientsContainer // per-client-settings module stats stats.Stats // statistics module queryLog querylog.QueryLog // query log module dnsServer *dnsforward.Server // DNS module rdns *RDNS // rDNS module whois *Whois // WHOIS module dnsFilter *dnsfilter.DNSFilter // DNS filtering module dhcpServer *dhcpd.Server // DHCP module auth *Auth // HTTP authentication module filters Filtering // DNS filtering module web *Web // Web (HTTP, HTTPS) module tls *TLSMod // TLS module autoHosts util.AutoHosts // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files </s> add clients clientsContainer // per-client-settings module stats stats.Stats // statistics module queryLog querylog.QueryLog // query log module dnsServer *dnsforward.Server // DNS module rdns *RDNS // rDNS module whois *Whois // WHOIS module dnsFilter *dnsfilter.DNSFilter // DNS filtering module dhcpServer *dhcpd.Server // DHCP module auth *Auth // HTTP authentication module filters Filtering // DNS filtering module web *Web // Web (HTTP, HTTPS) module tls *TLSMod // TLS module etcHosts *aghnet.EtcHostsContainer // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) {
<mask> <mask> // Init initializes clients container <mask> // dhcpServer: optional <mask> // Note: this function must be called only once <mask> func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { <mask> if clients.list != nil { <mask> log.Fatal("clients.list != nil") <mask> } <mask> clients.list = make(map[string]*Client) <mask> clients.idIndex = make(map[string]*Client) </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove autoHosts *util.AutoHosts // get entries from system hosts-files </s> add etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
if etcHosts != nil { clients.etcHosts = etcHosts }
<mask> clients.allTags[t] = false <mask> } <mask> <mask> clients.dhcpServer = dhcpServer <mask> clients.autoHosts = autoHosts <mask> clients.addFromConfig(objects) <mask> <mask> if !clients.testing { <mask> clients.addFromDHCP() <mask> if clients.dhcpServer != nil { </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove Context.autoHosts.Close() </s> add Context.etcHosts.Close() </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) }
<mask> clients.addFromDHCP() <mask> if clients.dhcpServer != nil { <mask> clients.dhcpServer.SetOnLeaseChanged(clients.onDHCPLeaseChanged) <mask> } <mask> clients.autoHosts.SetOnChanged(clients.onHostsChanged) <mask> } <mask> } <mask> <mask> // Start - start the module <mask> func (clients *clientsContainer) Start() { </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts } </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove Context.autoHosts.Close() </s> add Context.etcHosts.Close()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
if clients.etcHosts == nil { return } hosts := clients.etcHosts.List()
<mask> <mask> // addFromHostsFile fills the client-hostname pairing index from the system's <mask> // hosts files. <mask> func (clients *clientsContainer) addFromHostsFile() { <mask> hosts := clients.autoHosts.List() <mask> <mask> clients.lock.Lock() <mask> defer clients.lock.Unlock() <mask> <mask> clients.rmHostsBySrc(ClientSourceHostsFile) </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove AutoHosts: &util.AutoHosts{}, </s> add EtcHosts: &aghnet.EtcHostsContainer{}, </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/clients.go
filterConf.EtcHosts = Context.etcHosts
<mask> } <mask> Context.queryLog = querylog.New(conf) <mask> <mask> filterConf := config.DNS.DnsfilterConf <mask> filterConf.AutoHosts = &Context.autoHosts <mask> filterConf.ConfigModified = onConfigModified <mask> filterConf.HTTPRegister = httpRegister <mask> Context.dnsFilter = dnsfilter.New(&filterConf, nil) <mask> <mask> p := dnsforward.DNSCreateParams{ </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove AutoHosts: &util.AutoHosts{}, </s> add EtcHosts: &aghnet.EtcHostsContainer{}, </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove Context.autoHosts.Start() </s> add Context.etcHosts.Start()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/dns.go
clients clientsContainer // per-client-settings module stats stats.Stats // statistics module queryLog querylog.QueryLog // query log module dnsServer *dnsforward.Server // DNS module rdns *RDNS // rDNS module whois *Whois // WHOIS module dnsFilter *dnsfilter.DNSFilter // DNS filtering module dhcpServer *dhcpd.Server // DHCP module auth *Auth // HTTP authentication module filters Filtering // DNS filtering module web *Web // Web (HTTP, HTTPS) module tls *TLSMod // TLS module etcHosts *aghnet.EtcHostsContainer // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files
<mask> type homeContext struct { <mask> // Modules <mask> // -- <mask> <mask> clients clientsContainer // per-client-settings module <mask> stats stats.Stats // statistics module <mask> queryLog querylog.QueryLog // query log module <mask> dnsServer *dnsforward.Server // DNS module <mask> rdns *RDNS // rDNS module <mask> whois *Whois // WHOIS module <mask> dnsFilter *dnsfilter.DNSFilter // DNS filtering module <mask> dhcpServer *dhcpd.Server // DHCP module <mask> auth *Auth // HTTP authentication module <mask> filters Filtering // DNS filtering module <mask> web *Web // Web (HTTP, HTTPS) module <mask> tls *TLSMod // TLS module <mask> autoHosts util.AutoHosts // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files <mask> updater *updater.Updater <mask> <mask> subnetDetector *aghnet.SubnetDetector <mask> <mask> // mux is our custom http.ServeMux. </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove autoHosts *util.AutoHosts // get entries from system hosts-files </s> add etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/home.go
<mask> if Context.dhcpServer == nil { <mask> log.Fatalf("can't initialize dhcp module") <mask> } <mask> <mask> Context.autoHosts.Init("") <mask> <mask> Context.updater = updater.NewUpdater(&updater.Config{ <mask> Client: Context.client, <mask> Version: version.Version(), <mask> Channel: version.Channel(), <mask> GOARCH: runtime.GOARCH, </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove Context.autoHosts.Close() </s> add Context.etcHosts.Close() </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove Context.clients.Init(config.Clients, Context.dhcpServer, &Context.autoHosts) </s> add if !args.noEtcHosts { Context.etcHosts = &aghnet.EtcHostsContainer{} Context.etcHosts.Init("") Context.clients.Init(config.Clients, Context.dhcpServer, Context.etcHosts) } </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List()
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/home.go
if !args.noEtcHosts { Context.etcHosts = &aghnet.EtcHostsContainer{} Context.etcHosts.Init("") Context.clients.Init(config.Clients, Context.dhcpServer, Context.etcHosts) }
<mask> WorkDir: Context.workDir, <mask> ConfName: config.getConfigFilename(), <mask> }) <mask> <mask> Context.clients.Init(config.Clients, Context.dhcpServer, &Context.autoHosts) <mask> config.Clients = nil <mask> <mask> if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") && <mask> config.RlimitNoFile != 0 { <mask> aghos.SetRlimit(config.RlimitNoFile) </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) </s> remove Context.autoHosts.Init("") </s> add </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/home.go
Context.etcHosts.Start()
<mask> log.Fatalf("%s", err) <mask> } <mask> <mask> Context.tls.Start() <mask> Context.autoHosts.Start() <mask> <mask> go func() { <mask> serr := startDNSServer() <mask> if serr != nil { <mask> closeDNSServer() </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove AutoHosts: &util.AutoHosts{}, </s> add EtcHosts: &aghnet.EtcHostsContainer{}, </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype) </s> remove Context.autoHosts.Close() </s> add Context.etcHosts.Close()
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/home.go
Context.etcHosts.Close()
<mask> if Context.dhcpServer != nil { <mask> Context.dhcpServer.Stop() <mask> } <mask> <mask> Context.autoHosts.Close() <mask> <mask> if Context.tls != nil { <mask> Context.tls.Close() <mask> Context.tls = nil <mask> } </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts } </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove Context.autoHosts.Init("") </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/home.go
// noEtcHosts flag should be provided when /etc/hosts file shouldn't be // used. noEtcHosts bool
<mask> // see memoryUsage() function for the details <mask> disableMemoryOptimization bool <mask> <mask> glinetMode bool // Activate GL-Inet compatibility mode <mask> } <mask> <mask> // functions used for their side-effects <mask> type effect func() error <mask> <mask> type arg struct { </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove autoHosts *util.AutoHosts // get entries from system hosts-files </s> add etcHosts *aghnet.EtcHostsContainer // get entries from system hosts-files </s> remove clients clientsContainer // per-client-settings module stats stats.Stats // statistics module queryLog querylog.QueryLog // query log module dnsServer *dnsforward.Server // DNS module rdns *RDNS // rDNS module whois *Whois // WHOIS module dnsFilter *dnsfilter.DNSFilter // DNS filtering module dhcpServer *dhcpd.Server // DHCP module auth *Auth // HTTP authentication module filters Filtering // DNS filtering module web *Web // Web (HTTP, HTTPS) module tls *TLSMod // TLS module autoHosts util.AutoHosts // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files </s> add clients clientsContainer // per-client-settings module stats stats.Stats // statistics module queryLog querylog.QueryLog // query log module dnsServer *dnsforward.Server // DNS module rdns *RDNS // rDNS module whois *Whois // WHOIS module dnsFilter *dnsfilter.DNSFilter // DNS filtering module dhcpServer *dhcpd.Server // DHCP module auth *Auth // HTTP authentication module filters Filtering // DNS filtering module web *Web // Web (HTTP, HTTPS) module tls *TLSMod // TLS module etcHosts *aghnet.EtcHostsContainer // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files </s> remove func (clients *clientsContainer) Init(objects []clientObject, dhcpServer *dhcpd.Server, autoHosts *util.AutoHosts) { </s> add func (clients *clientsContainer) Init( objects []clientObject, dhcpServer *dhcpd.Server, etcHosts *aghnet.EtcHostsContainer, ) { </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"`
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/options.go
description: "Show the version and exit. Show more detailed version description with -v",
<mask> func(o options) []string { return boolSliceOrNil(o.glinetMode) }, <mask> } <mask> <mask> var versionArg = arg{ <mask> description: "Show the version and exit", <mask> longName: "version", <mask> shortName: "", <mask> updateWithValue: nil, <mask> updateNoValue: nil, <mask> effect: func(o options, exec string) (effect, error) { </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove "Print this help. Show more detailed version description with -v", </s> add "Print this help", </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/options.go
"Print this help",
<mask> serialize: func(o options) []string { return nil }, <mask> } <mask> <mask> var helpArg = arg{ <mask> "Print this help. Show more detailed version description with -v", <mask> "help", "", <mask> nil, nil, func(o options, exec string) (effect, error) { <mask> return func() error { _ = printHelp(exec); os.Exit(64); return nil }, nil <mask> }, <mask> func(o options) []string { return nil }, </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove description: "Show the version and exit", </s> add description: "Show the version and exit. Show more detailed version description with -v", </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/options.go
var noEtcHostsArg = arg{ description: "Do not use the OS-provided hosts.", longName: "no-etc-hosts", shortName: "", updateWithValue: nil, updateNoValue: func(o options) (options, error) { o.noEtcHosts = true; return o, nil }, effect: nil, serialize: func(o options) []string { return boolSliceOrNil(o.noEtcHosts) }, }
<mask> }, <mask> func(o options) []string { return nil }, <mask> } <mask> <mask> func init() { <mask> args = []arg{ <mask> configArg, <mask> workDirArg, </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove "Print this help. Show more detailed version description with -v", </s> add "Print this help", </s> remove description: "Show the version and exit", </s> add description: "Show the version and exit. Show more detailed version description with -v", </s> remove clients.autoHosts.SetOnChanged(clients.onHostsChanged) </s> add if clients.etcHosts != nil { clients.etcHosts.SetOnChanged(clients.onHostsChanged) } </s> remove hosts := clients.autoHosts.List() </s> add if clients.etcHosts == nil { return } hosts := clients.etcHosts.List() </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype)
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/options.go
noEtcHostsArg,
<mask> noCheckUpdateArg, <mask> disableMemoryOptimizationArg, <mask> verboseArg, <mask> glinetArg, <mask> versionArg, <mask> helpArg, </s> Pull request: 1947 disable autohosts option Merge in DNS/adguard-home from 1947-hosts-opt to master Updates #1947. Updates #2829. Squashed commit of the following: commit d09285c3dbfa7816469eec223b88c320c255c8fe Merge: cff8c4cd 7c6557b0 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 18:23:20 2021 +0300 Merge branch 'master' into 1947-hosts-opt commit cff8c4cdbf4bcd1f5f413c541d7f4a9e42b8b05b Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:46:19 2021 +0300 home: fix help commit 1fa01d5b30f5adeda564dcc85a7064e2921d5981 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:40:48 2021 +0300 home: fix option order commit 9d83cb604aaddcc8cbe99bafa544636f8f0b7e54 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:28:30 2021 +0300 aghnet: add important todo commit 7f1386ff5c3081e07e975b640164a7a05e1319c9 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 17:17:17 2021 +0300 all: correct naming commit cbe2b2e4b21d5bceb3ee88e09cad154ba62b5cef Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:55:46 2021 +0300 all: mv functionality from util commit e82ad53862682d903dd0dd10844db65997a758bc Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:41:35 2021 +0300 home: imp code, docs commit 9058977f3ff99648fabaebbd7c1c354c71671327 Author: Eugene Burkov <e.burkov@adguard.com> Date: Mon Apr 12 15:02:34 2021 +0300 home: add an option to disable autohosts </s> remove clients.autoHosts = autoHosts </s> add if etcHosts != nil { clients.etcHosts = etcHosts } </s> remove // IP-hostname pairs taken from system configuration (e.g. /etc/hosts) files AutoHosts *util.AutoHosts `yaml:"-"` </s> add // EtcHosts is a container of IP-hostname pairs taken from the operating // system configuration files (e.g. /etc/hosts). EtcHosts *aghnet.EtcHostsContainer `yaml:"-"` </s> remove if d.Config.AutoHosts == nil { </s> add if d.Config.EtcHosts == nil { </s> remove ips := d.Config.AutoHosts.Process(host, qtype) </s> add ips := d.Config.EtcHosts.Process(host, qtype) </s> remove revHosts := d.Config.AutoHosts.ProcessReverse(host, qtype) </s> add revHosts := d.Config.EtcHosts.ProcessReverse(host, qtype)
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e671f43a2fa8ebf860217936fd11e1b568154a30
internal/home/options.go
debug
<mask> .DS_Store <mask> .vscode <mask> /AdguardDNS <mask> /AdguardDNS.yaml <mask> /build/ <mask> /client/node_modules/ <mask> /coredns <mask> /Corefile </s> Fix some UI issues, rename DNS->Home </s> remove title: 'AdGuard DNS' description: 'Control AdGuard DNS server with this API' </s> add title: 'AdGuard Home' description: 'Control AdGuard Home server with this API' </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database. </s> remove <div className="row align-items-center flex-row-reverse"> <div className="col-12 col-lg-auto ml-lg-auto"> </s> add <div className="row align-items-center flex-row"> <div className="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
.gitignore
log.Printf("AdGuard Home web interface backend, version %s\n", VersionString)
<mask> // VersionString will be set through ldflags, contains current version <mask> var VersionString = "undefined" <mask> <mask> func main() { <mask> log.Printf("AdGuard DNS web interface backend, version %s\n", VersionString) <mask> box := packr.NewBox("build/static") <mask> { <mask> executable, err := os.Executable() <mask> if err != nil { <mask> panic(err) </s> Fix some UI issues, rename DNS->Home </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> add subtitle: 'AdGuard Home can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
app.go
<code>127.0.0.1 example.org</code> - AdGuard Home will now return
<mask> <code> @@||example.org^</code> - unblock access to the example.org <mask> domain and all its subdomains <mask> </li> <mask> <li> <mask> <code>127.0.0.1 example.org</code> - AdGuard DNS will now return <mask> 127.0.0.1 address for the example.org domain (but not its subdomains). <mask> </li> <mask> <li> <mask> <code>! Here goes a comment</code> - just a comment <mask> </li> </s> Fix some UI issues, rename DNS->Home </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database. </s> remove title: 'AdGuard DNS' description: 'Control AdGuard DNS server with this API' </s> add title: 'AdGuard Home' description: 'Control AdGuard Home server with this API' </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> remove subtitle="AdGuard DNS understands basic adblock rules and hosts files syntax." </s> add subtitle="AdGuard Home understands basic adblock rules and hosts files syntax."
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/Filters/UserRules.js
subtitle="AdGuard Home understands basic adblock rules and hosts files syntax."
<mask> <div className="row"> <mask> <div className="col-md-12"> <mask> <Card <mask> title="Filters and hosts blocklists" <mask> subtitle="AdGuard DNS understands basic adblock rules and hosts files syntax." <mask> > <mask> <ReactTable <mask> data={filters} <mask> columns={this.columns} <mask> showPagination={false} </s> Fix some UI issues, rename DNS->Home </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home </s> remove <div className="row align-items-center flex-row-reverse"> <div className="col-12 col-lg-auto ml-lg-auto"> </s> add <div className="row align-items-center flex-row"> <div className="col-12 col-lg-auto mt-3 mt-lg-0 text-center"> </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/Filters/index.js
subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.',
<mask> }, <mask> safebrowsing: { <mask> enabled: false, <mask> title: 'Use AdGuard browsing security web service', <mask> subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', <mask> }, <mask> parental: { <mask> enabled: false, <mask> title: 'Use AdGuard parental control web service', <mask> subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> Fix some UI issues, rename DNS->Home </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> remove subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> add subtitle: 'AdGuard Home can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> remove log.Printf("AdGuard DNS web interface backend, version %s\n", VersionString) </s> add log.Printf("AdGuard Home web interface backend, version %s\n", VersionString) </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/Settings/index.js
subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.',
<mask> }, <mask> parental: { <mask> enabled: false, <mask> title: 'Use AdGuard parental control web service', <mask> subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', <mask> }, <mask> safesearch: { <mask> enabled: false, <mask> title: 'Enforce safe search', <mask> subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> Fix some UI issues, rename DNS->Home </s> remove subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> add subtitle: 'AdGuard Home can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove log.Printf("AdGuard DNS web interface backend, version %s\n", VersionString) </s> add log.Printf("AdGuard Home web interface backend, version %s\n", VersionString) </s> remove title: 'AdGuard DNS' description: 'Control AdGuard DNS server with this API' </s> add title: 'AdGuard Home' description: 'Control AdGuard Home server with this API' </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/Settings/index.js
subtitle: 'AdGuard Home can enforce safe search in the following search engines: Google, Bing, Yandex.',
<mask> }, <mask> safesearch: { <mask> enabled: false, <mask> title: 'Enforce safe search', <mask> subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', <mask> }, <mask> }; <mask> <mask> componentDidMount() { <mask> this.props.initSettings(this.settings); </s> Fix some UI issues, rename DNS->Home </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove title: 'AdGuard DNS' description: 'Control AdGuard DNS server with this API' </s> add title: 'AdGuard Home' description: 'Control AdGuard Home server with this API' </s> remove log.Printf("AdGuard DNS web interface backend, version %s\n", VersionString) </s> add log.Printf("AdGuard Home web interface backend, version %s\n", VersionString) </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/Settings/index.js
<div className="row align-items-center flex-row"> <div className="col-12 col-lg-auto mt-3 mt-lg-0 text-center">
<mask> render() { <mask> return ( <mask> <footer className="footer"> <mask> <div className="container"> <mask> <div className="row align-items-center flex-row-reverse"> <mask> <div className="col-12 col-lg-auto ml-lg-auto"> <mask> <div className="row align-items-center justify-content-center"> <mask> <div className="col-auto"> <mask> <ul className="list-inline text-center mb-0"> <mask> <li className="list-inline-item"> <mask> <a href="https://github.com/AdguardTeam/AdguardDNS" target="_blank" rel="noopener noreferrer">Homepage</a> </s> Fix some UI issues, rename DNS->Home </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database. </s> remove subtitle="AdGuard DNS understands basic adblock rules and hosts files syntax." </s> add subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/ui/Footer.js
This domain belongs to the Whotracksme database.
<mask> </div> <mask> <div className="popover__body"> <mask> <div className="popover__list"> <mask> <div className="popover__list-title"> <mask> This domain belongs to a known tracker. <mask> </div> <mask> <div className="popover__list-item"> <mask> Name: <strong>{data.name}</strong> <mask> </div> <mask> <div className="popover__list-item"> </s> Fix some UI issues, rename DNS->Home </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove <div className="row align-items-center flex-row-reverse"> <div className="col-12 col-lg-auto ml-lg-auto"> </s> add <div className="row align-items-center flex-row"> <div className="col-12 col-lg-auto mt-3 mt-lg-0 text-center"> </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/ui/Popover.js
You are currently not using AdGuard Home
<mask> const Status = props => ( <mask> <div className="status"> <mask> <Card bodyType="card-body card-body--status"> <mask> <div className="h4 font-weight-light mb-4"> <mask> You are currently not using AdGuard DNS <mask> </div> <mask> <button className="btn btn-success" onClick={props.handleStatusChange}> <mask> Enable AdGuard DNS <mask> </button> <mask> </Card> </s> Fix some UI issues, rename DNS->Home </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home </s> remove subtitle="AdGuard DNS understands basic adblock rules and hosts files syntax." </s> add subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database. </s> remove <div className="row align-items-center flex-row-reverse"> <div className="col-12 col-lg-auto ml-lg-auto"> </s> add <div className="row align-items-center flex-row"> <div className="col-12 col-lg-auto mt-3 mt-lg-0 text-center"> </s> remove log.Printf("AdGuard DNS web interface backend, version %s\n", VersionString) </s> add log.Printf("AdGuard Home web interface backend, version %s\n", VersionString)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/ui/Status.js
Enable AdGuard Home
<mask> <div className="h4 font-weight-light mb-4"> <mask> You are currently not using AdGuard DNS <mask> </div> <mask> <button className="btn btn-success" onClick={props.handleStatusChange}> <mask> Enable AdGuard DNS <mask> </button> <mask> </Card> <mask> </div> <mask> ); <mask> </s> Fix some UI issues, rename DNS->Home </s> remove You are currently not using AdGuard DNS </s> add You are currently not using AdGuard Home </s> remove This domain belongs to a known tracker. </s> add This domain belongs to the Whotracksme database. </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return </s> remove subtitle="AdGuard DNS understands basic adblock rules and hosts files syntax." </s> add subtitle="AdGuard Home understands basic adblock rules and hosts files syntax." </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.',
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
client/src/components/ui/Status.js
title: 'AdGuard Home' description: 'Control AdGuard Home server with this API'
<mask> swagger: '2.0' <mask> info: <mask> title: 'AdGuard DNS' <mask> description: 'Control AdGuard DNS server with this API' <mask> version: 0.0.0 <mask> basePath: /control <mask> schemes: <mask> - http <mask> produces: </s> Fix some UI issues, rename DNS->Home </s> remove <code>127.0.0.1 example.org</code> - AdGuard DNS will now return </s> add <code>127.0.0.1 example.org</code> - AdGuard Home will now return </s> remove subtitle: 'AdGuard DNS will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> add subtitle: 'AdGuard Home will check if domain contains adult materials. It uses the same privacy-friendly API as the browsing security web service.', </s> remove subtitle: 'AdGuard DNS can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> add subtitle: 'AdGuard Home can enforce safe search in the following search engines: Google, Bing, Yandex.', </s> remove subtitle: 'AdGuard DNS will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> add subtitle: 'AdGuard Home will check if domain is blacklisted by the browsing security web service. It will use privacy-friendly lookup API to perform the check: only a short prefix of the domain name SHA256 hash is sent to the server.', </s> remove Enable AdGuard DNS </s> add Enable AdGuard Home
[ "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e67695df8b3f5581c96f156b707ebb8cfaac0cab
openapi.yaml
github.com/AdguardTeam/urlfilter v0.13.0
<mask> <mask> require ( <mask> github.com/AdguardTeam/dnsproxy v0.33.2 <mask> github.com/AdguardTeam/golibs v0.4.3 <mask> github.com/AdguardTeam/urlfilter v0.12.3 <mask> github.com/NYTimes/gziphandler v1.1.1 <mask> github.com/beefsack/go-rate v0.0.0-20200827232406-6cde80facd47 // indirect <mask> github.com/fsnotify/fsnotify v1.4.9 <mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663 <mask> github.com/gobuffalo/envy v1.9.0 // indirect </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
go.mod
github.com/AdguardTeam/urlfilter v0.13.0 h1:MfO46K81JVTkhgP6gRu/buKl5wAOSfusjiDwjT1JN1c= github.com/AdguardTeam/urlfilter v0.13.0/go.mod h1:klx4JbOfc4EaNb5lWLqOwfg+pVcyRukmoJRvO55lL5U=
<mask> github.com/AdguardTeam/golibs v0.4.3/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= <mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= <mask> github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs= <mask> github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0= <mask> github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= <mask> github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= <mask> github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= <mask> github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= <mask> github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= <mask> github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove github.com/AdguardTeam/urlfilter v0.12.3 </s> add github.com/AdguardTeam/urlfilter v0.13.0 </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove ureq := urlfilter.DNSRequest{} ureq.Hostname = host ureq.ClientIP = setts.ClientIP ureq.ClientName = setts.ClientName ureq.SortedClientTags = setts.ClientTags </s> add ureq := urlfilter.DNSRequest{ Hostname: host, SortedClientTags: setts.ClientTags, ClientIP: setts.ClientIP, ClientName: setts.ClientName, DNSType: qtype, }
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
go.sum
ureq := urlfilter.DNSRequest{ Hostname: host, SortedClientTags: setts.ClientTags, ClientIP: setts.ClientIP, ClientName: setts.ClientName, DNSType: qtype, }
<mask> // Keep in mind that this lock must be held no just when calling Match() <mask> // but also while using the rules returned by it. <mask> defer d.engineLock.RUnlock() <mask> <mask> ureq := urlfilter.DNSRequest{} <mask> ureq.Hostname = host <mask> ureq.ClientIP = setts.ClientIP <mask> ureq.ClientName = setts.ClientName <mask> ureq.SortedClientTags = setts.ClientTags <mask> <mask> if d.filteringEngineWhite != nil { <mask> rr, ok := d.filteringEngineWhite.MatchRequest(ureq) <mask> if ok { <mask> var rule rules.Rule </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove ret, err := d.CheckHost(test.hostname, dns.TypeA, &setts) </s> add ret, err := d.CheckHost(test.hostname, test.dnsType, &setts) </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/dnsfilter.go
dnstypeRules = `||example.org^$dnstype=AAAA` + nl + `@@||test.example.org^` + nl
<mask> importantRules = `@@||example.org^` + nl + `||test.example.org^$important` + nl <mask> regexRules = `/example\.org/` + nl + `@@||test.example.org^` + nl <mask> maskRules = `test*.example.org^` + nl + `exam*.com` + nl <mask> ) <mask> <mask> var tests = []struct { <mask> testname string <mask> rules string </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil}, </s> remove ureq := urlfilter.DNSRequest{} ureq.Hostname = host ureq.ClientIP = setts.ClientIP ureq.ClientName = setts.ClientName ureq.SortedClientTags = setts.ClientTags </s> add ureq := urlfilter.DNSRequest{ Hostname: host, SortedClientTags: setts.ClientTags, ClientIP: setts.ClientIP, ClientName: setts.ClientName, DNSType: qtype, } </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/dnsfilter_test.go
dnsType uint16
<mask> isFiltered bool <mask> reason Reason <mask> }{ <mask> {"sanity", "||doubleclick.net^", "www.doubleclick.net", true, FilteredBlackList, dns.TypeA}, <mask> {"sanity", "||doubleclick.net^", "nodoubleclick.net", false, NotFilteredNotFound, dns.TypeA}, <mask> {"sanity", "||doubleclick.net^", "doubleclick.net.ru", false, NotFilteredNotFound, dns.TypeA}, <mask> {"sanity", "||doubleclick.net^", "wmconvirus.narod.ru", false, NotFilteredNotFound, dns.TypeA}, </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove {"sanity", "||doubleclick.net^", "www.doubleclick.net", true, FilteredBlackList}, {"sanity", "||doubleclick.net^", "nodoubleclick.net", false, NotFilteredNotFound}, {"sanity", "||doubleclick.net^", "doubleclick.net.ru", false, NotFilteredNotFound}, {"sanity", "||doubleclick.net^", "wmconvirus.narod.ru", false, NotFilteredNotFound}, {"blocking", blockingRules, "example.org", true, FilteredBlackList}, {"blocking", blockingRules, "test.example.org", true, FilteredBlackList}, {"blocking", blockingRules, "test.test.example.org", true, FilteredBlackList}, {"blocking", blockingRules, "testexample.org", false, NotFilteredNotFound}, {"blocking", blockingRules, "onemoreexample.org", false, NotFilteredNotFound}, {"whitelist", whitelistRules, "example.org", true, FilteredBlackList}, {"whitelist", whitelistRules, "test.example.org", false, NotFilteredWhiteList}, {"whitelist", whitelistRules, "test.test.example.org", false, NotFilteredWhiteList}, {"whitelist", whitelistRules, "testexample.org", false, NotFilteredNotFound}, {"whitelist", whitelistRules, "onemoreexample.org", false, NotFilteredNotFound}, {"important", importantRules, "example.org", false, NotFilteredWhiteList}, {"important", importantRules, "test.example.org", true, FilteredBlackList}, {"important", importantRules, "test.test.example.org", true, FilteredBlackList}, {"important", importantRules, "testexample.org", false, NotFilteredNotFound}, {"important", importantRules, "onemoreexample.org", false, NotFilteredNotFound}, {"regex", regexRules, "example.org", true, FilteredBlackList}, {"regex", regexRules, "test.example.org", false, NotFilteredWhiteList}, {"regex", regexRules, "test.test.example.org", false, NotFilteredWhiteList}, {"regex", regexRules, "testexample.org", true, FilteredBlackList}, {"regex", regexRules, "onemoreexample.org", true, FilteredBlackList}, {"mask", maskRules, "test.example.org", true, FilteredBlackList}, {"mask", maskRules, "test2.example.org", true, FilteredBlackList}, {"mask", maskRules, "example.com", true, FilteredBlackList}, {"mask", maskRules, "exampleeee.com", true, FilteredBlackList}, {"mask", maskRules, "onemoreexamsite.com", true, FilteredBlackList}, {"mask", maskRules, "example.org", false, NotFilteredNotFound}, {"mask", maskRules, "testexample.org", false, NotFilteredNotFound}, {"mask", maskRules, "example.co.uk", false, NotFilteredNotFound}, </s> add {"sanity", "||doubleclick.net^", "www.doubleclick.net", true, FilteredBlackList, dns.TypeA}, {"sanity", "||doubleclick.net^", "nodoubleclick.net", false, NotFilteredNotFound, dns.TypeA}, {"sanity", "||doubleclick.net^", "doubleclick.net.ru", false, NotFilteredNotFound, dns.TypeA}, {"sanity", "||doubleclick.net^", "wmconvirus.narod.ru", false, NotFilteredNotFound, dns.TypeA}, {"blocking", blockingRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "test.test.example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"blocking", blockingRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"whitelist", whitelistRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"whitelist", whitelistRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"whitelist", whitelistRules, "test.test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"whitelist", whitelistRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"whitelist", whitelistRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"important", importantRules, "example.org", false, NotFilteredWhiteList, dns.TypeA}, {"important", importantRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"important", importantRules, "test.test.example.org", true, FilteredBlackList, dns.TypeA}, {"important", importantRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"important", importantRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"regex", regexRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"regex", regexRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"regex", regexRules, "test.test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"regex", regexRules, "testexample.org", true, FilteredBlackList, dns.TypeA}, {"regex", regexRules, "onemoreexample.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "test2.example.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "example.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "exampleeee.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "onemoreexamsite.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "example.org", false, NotFilteredNotFound, dns.TypeA}, {"mask", maskRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"mask", maskRules, "example.co.uk", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "example.org", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "example.org", true, FilteredBlackList, dns.TypeAAAA}, {"dnstype", dnstypeRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"dnstype", dnstypeRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeAAAA}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"somecname", "somehost.com", 0, nil}, RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, </s> add {"somecname", "somehost.com", 0, nil}, {"somehost.com", "0.0.0.0", 0, nil},
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/dnsfilter_test.go
{"sanity", "||doubleclick.net^", "www.doubleclick.net", true, FilteredBlackList, dns.TypeA}, {"sanity", "||doubleclick.net^", "nodoubleclick.net", false, NotFilteredNotFound, dns.TypeA}, {"sanity", "||doubleclick.net^", "doubleclick.net.ru", false, NotFilteredNotFound, dns.TypeA}, {"sanity", "||doubleclick.net^", "wmconvirus.narod.ru", false, NotFilteredNotFound, dns.TypeA}, {"blocking", blockingRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "test.test.example.org", true, FilteredBlackList, dns.TypeA}, {"blocking", blockingRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"blocking", blockingRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"whitelist", whitelistRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"whitelist", whitelistRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"whitelist", whitelistRules, "test.test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"whitelist", whitelistRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"whitelist", whitelistRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"important", importantRules, "example.org", false, NotFilteredWhiteList, dns.TypeA}, {"important", importantRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"important", importantRules, "test.test.example.org", true, FilteredBlackList, dns.TypeA}, {"important", importantRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"important", importantRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"regex", regexRules, "example.org", true, FilteredBlackList, dns.TypeA}, {"regex", regexRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"regex", regexRules, "test.test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"regex", regexRules, "testexample.org", true, FilteredBlackList, dns.TypeA}, {"regex", regexRules, "onemoreexample.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "test.example.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "test2.example.org", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "example.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "exampleeee.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "onemoreexamsite.com", true, FilteredBlackList, dns.TypeA}, {"mask", maskRules, "example.org", false, NotFilteredNotFound, dns.TypeA}, {"mask", maskRules, "testexample.org", false, NotFilteredNotFound, dns.TypeA}, {"mask", maskRules, "example.co.uk", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "onemoreexample.org", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "example.org", false, NotFilteredNotFound, dns.TypeA}, {"dnstype", dnstypeRules, "example.org", true, FilteredBlackList, dns.TypeAAAA}, {"dnstype", dnstypeRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeA}, {"dnstype", dnstypeRules, "test.example.org", false, NotFilteredWhiteList, dns.TypeAAAA},
<mask> hostname string <mask> isFiltered bool <mask> reason Reason <mask> }{ <mask> {"sanity", "||doubleclick.net^", "www.doubleclick.net", true, FilteredBlackList}, <mask> {"sanity", "||doubleclick.net^", "nodoubleclick.net", false, NotFilteredNotFound}, <mask> {"sanity", "||doubleclick.net^", "doubleclick.net.ru", false, NotFilteredNotFound}, <mask> {"sanity", "||doubleclick.net^", "wmconvirus.narod.ru", false, NotFilteredNotFound}, <mask> <mask> {"blocking", blockingRules, "example.org", true, FilteredBlackList}, <mask> {"blocking", blockingRules, "test.example.org", true, FilteredBlackList}, <mask> {"blocking", blockingRules, "test.test.example.org", true, FilteredBlackList}, <mask> {"blocking", blockingRules, "testexample.org", false, NotFilteredNotFound}, <mask> {"blocking", blockingRules, "onemoreexample.org", false, NotFilteredNotFound}, <mask> <mask> {"whitelist", whitelistRules, "example.org", true, FilteredBlackList}, <mask> {"whitelist", whitelistRules, "test.example.org", false, NotFilteredWhiteList}, <mask> {"whitelist", whitelistRules, "test.test.example.org", false, NotFilteredWhiteList}, <mask> {"whitelist", whitelistRules, "testexample.org", false, NotFilteredNotFound}, <mask> {"whitelist", whitelistRules, "onemoreexample.org", false, NotFilteredNotFound}, <mask> <mask> {"important", importantRules, "example.org", false, NotFilteredWhiteList}, <mask> {"important", importantRules, "test.example.org", true, FilteredBlackList}, <mask> {"important", importantRules, "test.test.example.org", true, FilteredBlackList}, <mask> {"important", importantRules, "testexample.org", false, NotFilteredNotFound}, <mask> {"important", importantRules, "onemoreexample.org", false, NotFilteredNotFound}, <mask> <mask> {"regex", regexRules, "example.org", true, FilteredBlackList}, <mask> {"regex", regexRules, "test.example.org", false, NotFilteredWhiteList}, <mask> {"regex", regexRules, "test.test.example.org", false, NotFilteredWhiteList}, <mask> {"regex", regexRules, "testexample.org", true, FilteredBlackList}, <mask> {"regex", regexRules, "onemoreexample.org", true, FilteredBlackList}, <mask> <mask> {"mask", maskRules, "test.example.org", true, FilteredBlackList}, <mask> {"mask", maskRules, "test2.example.org", true, FilteredBlackList}, <mask> {"mask", maskRules, "example.com", true, FilteredBlackList}, <mask> {"mask", maskRules, "exampleeee.com", true, FilteredBlackList}, <mask> {"mask", maskRules, "onemoreexamsite.com", true, FilteredBlackList}, <mask> {"mask", maskRules, "example.org", false, NotFilteredNotFound}, <mask> {"mask", maskRules, "testexample.org", false, NotFilteredNotFound}, <mask> {"mask", maskRules, "example.co.uk", false, NotFilteredNotFound}, <mask> } <mask> <mask> func TestMatching(t *testing.T) { <mask> for _, test := range tests { <mask> t.Run(fmt.Sprintf("%s-%s", test.testname, test.hostname), func(t *testing.T) { </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/dnsfilter_test.go
ret, err := d.CheckHost(test.hostname, test.dnsType, &setts)
<mask> }} <mask> d := NewForTest(nil, filters) <mask> defer d.Close() <mask> <mask> ret, err := d.CheckHost(test.hostname, dns.TypeA, &setts) <mask> if err != nil { <mask> t.Errorf("Error while matching host %s: %s", test.hostname, err) <mask> } <mask> if ret.IsFiltered != test.isFiltered { <mask> t.Errorf("Hostname %s has wrong result (%v must be %v)", test.hostname, ret.IsFiltered, test.isFiltered) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove ureq := urlfilter.DNSRequest{} ureq.Hostname = host ureq.ClientIP = setts.ClientIP ureq.ClientName = setts.ClientName ureq.SortedClientTags = setts.ClientTags </s> add ureq := urlfilter.DNSRequest{ Hostname: host, SortedClientTags: setts.ClientTags, ClientIP: setts.ClientIP, ClientName: setts.ClientName, DNSType: qtype, } </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/dnsfilter_test.go
{"somecname", "somehost.com", 0, nil}, {"somehost.com", "0.0.0.0", 0, nil},
<mask> func TestRewrites(t *testing.T) { <mask> d := Dnsfilter{} <mask> // CNAME, A, AAAA <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"somecname", "somehost.com", 0, nil}, <mask> RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, <mask> <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"host.com", "1.2.3.5", 0, nil}, <mask> RewriteEntry{"host.com", "1:2:3::4", 0, nil}, <mask> RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil},
<mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"somecname", "somehost.com", 0, nil}, <mask> RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, <mask> <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"host.com", "1.2.3.5", 0, nil}, <mask> RewriteEntry{"host.com", "1:2:3::4", 0, nil}, <mask> RewriteEntry{"www.host.com", "host.com", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r := d.processRewrites("host2.com", dns.TypeA) <mask> assert.Equal(t, NotFilteredNotFound, r.Reason) <mask> </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"somecname", "somehost.com", 0, nil}, RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, </s> add {"somecname", "somehost.com", 0, nil}, {"somehost.com", "0.0.0.0", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1:2:3::4"))) <mask> <mask> // wildcard <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r = d.processRewrites("host.com", dns.TypeA) <mask> assert.Equal(t, ReasonRewrite, r.Reason) <mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4"))) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
<mask> assert.Equal(t, NotFilteredNotFound, r.Reason) <mask> <mask> // override a wildcard <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r = d.processRewrites("a.host.com", dns.TypeA) <mask> assert.Equal(t, ReasonRewrite, r.Reason) <mask> assert.True(t, len(r.IPList) == 1) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil},
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4"))) <mask> <mask> // wildcard + CNAME <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"*.host.com", "host.com", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r = d.processRewrites("www.host.com", dns.TypeA) <mask> assert.Equal(t, ReasonRewrite, r.Reason) <mask> assert.Equal(t, "host.com", r.CanonName) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil},
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4"))) <mask> <mask> // 2 CNAMEs <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"b.host.com", "a.host.com", 0, nil}, <mask> RewriteEntry{"a.host.com", "host.com", 0, nil}, <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r = d.processRewrites("b.host.com", dns.TypeA) <mask> assert.Equal(t, ReasonRewrite, r.Reason) <mask> assert.Equal(t, "host.com", r.CanonName) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "x.somehost.com", 0, nil}, {"*.somehost.com", "1.2.3.4", 0, nil},
<mask> assert.True(t, r.IPList[0].Equal(net.ParseIP("1.2.3.4"))) <mask> <mask> // 2 CNAMEs + wildcard <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"b.host.com", "a.host.com", 0, nil}, <mask> RewriteEntry{"a.host.com", "x.somehost.com", 0, nil}, <mask> RewriteEntry{"*.somehost.com", "1.2.3.4", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> r = d.processRewrites("b.host.com", dns.TypeA) <mask> assert.Equal(t, ReasonRewrite, r.Reason) <mask> assert.Equal(t, "x.somehost.com", r.CanonName) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"b.host.com", "a.host.com", 0, nil}, RewriteEntry{"a.host.com", "host.com", 0, nil}, RewriteEntry{"host.com", "1.2.3.4", 0, nil}, </s> add {"b.host.com", "a.host.com", 0, nil}, {"a.host.com", "host.com", 0, nil}, {"host.com", "1.2.3.4", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "1.2.3.5", 0, nil}, RewriteEntry{"host.com", "1:2:3::4", 0, nil}, RewriteEntry{"www.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "1.2.3.5", 0, nil}, {"host.com", "1:2:3::4", 0, nil}, {"www.host.com", "host.com", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil},
<mask> func TestRewritesLevels(t *testing.T) { <mask> d := Dnsfilter{} <mask> // exact host, wildcard L2, wildcard L3 <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"host.com", "1.1.1.1", 0, nil}, <mask> RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, <mask> RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> <mask> // match exact <mask> r := d.processRewrites("host.com", dns.TypeA) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "host.com", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "host.com", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil},
<mask> func TestRewritesExceptionCNAME(t *testing.T) { <mask> d := Dnsfilter{} <mask> // wildcard; exception for a sub-domain <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, <mask> RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> <mask> // match sub-domain <mask> r := d.processRewrites("my.host.com", dns.TypeA) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil},
<mask> func TestRewritesExceptionWC(t *testing.T) { <mask> d := Dnsfilter{} <mask> // wildcard; exception for a sub-wildcard <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, <mask> RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> <mask> // match sub-domain <mask> r := d.processRewrites("my.host.com", dns.TypeA) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"host.com", "AAAA", 0, nil}, RewriteEntry{"host2.com", "::1", 0, nil}, RewriteEntry{"host2.com", "A", 0, nil}, RewriteEntry{"host3.com", "A", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil}, </s> remove RewriteEntry{"a.host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"a.host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
{"host.com", "1.2.3.4", 0, nil}, {"host.com", "AAAA", 0, nil}, {"host2.com", "::1", 0, nil}, {"host2.com", "A", 0, nil}, {"host3.com", "A", 0, nil},
<mask> func TestRewritesExceptionIP(t *testing.T) { <mask> d := Dnsfilter{} <mask> // exception for AAAA record <mask> d.Rewrites = []RewriteEntry{ <mask> RewriteEntry{"host.com", "1.2.3.4", 0, nil}, <mask> RewriteEntry{"host.com", "AAAA", 0, nil}, <mask> RewriteEntry{"host2.com", "::1", 0, nil}, <mask> RewriteEntry{"host2.com", "A", 0, nil}, <mask> RewriteEntry{"host3.com", "A", 0, nil}, <mask> } <mask> d.prepareRewrites() <mask> <mask> // match domain <mask> r := d.processRewrites("host.com", dns.TypeA) </s> Pull request #847: dnsfilter: add $dnstype handling Merge in DNS/adguard-home from 2337-dnstype to master Updates #2102. Updates #2337. Squashed commit of the following: commit ac4b7522c732c0bf8ee06539fd4c95b5dc1c87b8 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 24 17:50:33 2020 +0300 dnsfilter: add $dnstype handling </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"sub.host.com", "sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"sub.host.com", "sub.host.com", 0, nil}, </s> remove RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> add {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "*.sub.host.com", 0, nil}, </s> remove RewriteEntry{"host.com", "1.1.1.1", 0, nil}, RewriteEntry{"*.host.com", "2.2.2.2", 0, nil}, RewriteEntry{"*.sub.host.com", "3.3.3.3", 0, nil}, </s> add {"host.com", "1.1.1.1", 0, nil}, {"*.host.com", "2.2.2.2", 0, nil}, {"*.sub.host.com", "3.3.3.3", 0, nil}, </s> remove RewriteEntry{"somecname", "somehost.com", 0, nil}, RewriteEntry{"somehost.com", "0.0.0.0", 0, nil}, </s> add {"somecname", "somehost.com", 0, nil}, {"somehost.com", "0.0.0.0", 0, nil}, </s> remove RewriteEntry{"host.com", "1.2.3.4", 0, nil}, RewriteEntry{"*.host.com", "1.2.3.5", 0, nil}, </s> add {"host.com", "1.2.3.4", 0, nil}, {"*.host.com", "1.2.3.5", 0, nil},
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e685d81c92a0eb56d0799d08cb983a805112b065
internal/dnsfilter/rewrites_test.go
<mask> // Package dhcpd provides a DHCP server. <mask> package dhcpd <mask> <mask> import ( <mask> "encoding/hex" <mask> "encoding/json" <mask> "fmt" <mask> "net" <mask> "net/http" <mask> "path/filepath" </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove "strconv" "strings" </s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/dhcpd.go
<mask> "net" <mask> "net/http" <mask> "path/filepath" <mask> "runtime" <mask> "strconv" <mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util" </s> add </s> remove "encoding/hex" </s> add </s> remove val: val, </s> add data: data, </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove var err error </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/dhcpd.go
<mask> "strconv" <mask> "strings" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/util" <mask> "github.com/AdguardTeam/golibs/log" <mask> ) <mask> <mask> const ( <mask> defaultDiscoverTime = time.Second * 3 </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove "strconv" "strings" </s> add </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove "encoding/hex" </s> add </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/dhcpd.go
<mask> // AddStaticLease - add static v4 lease <mask> func (s *Server) AddStaticLease(lease Lease) error { <mask> return s.srv4.AddStaticLease(lease) <mask> } <mask> <mask> // Parse option string <mask> // Format: <mask> // CODE TYPE VALUE <mask> func parseOptionString(s string) (uint8, []byte) { <mask> s = strings.TrimSpace(s) <mask> scode := util.SplitNext(&s, ' ') <mask> t := util.SplitNext(&s, ' ') <mask> sval := util.SplitNext(&s, ' ') <mask> <mask> code, err := strconv.Atoi(scode) <mask> if err != nil || code <= 0 || code > 255 { <mask> return 0, nil <mask> } <mask> <mask> var val []byte <mask> <mask> switch t { <mask> case "hex": <mask> val, err = hex.DecodeString(sval) <mask> if err != nil { <mask> return 0, nil <mask> } <mask> case "ip": <mask> ip := net.ParseIP(sval) <mask> if ip == nil { <mask> return 0, nil <mask> } <mask> <mask> // Most DHCP options require IPv4, so do not put the 16-byte <mask> // version if we can. Otherwise, the clients will receive weird <mask> // data that looks like four IPv4 addresses. <mask> // <mask> // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. <mask> if ip4 := ip.To4(); ip4 != nil { <mask> val = ip4 <mask> } else { <mask> val = ip <mask> } <mask> default: <mask> return 0, nil <mask> } <mask> <mask> return uint8(code), val <mask> } </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) { </s> remove func TestOptions(t *testing.T) { testCases := []struct { name string optStr string wantVal []byte wantCode uint8 }{{ name: "success_hex", optStr: "12 hex abcdef", wantVal: []byte{0xab, 0xcd, 0xef}, wantCode: 12, }, { name: "bad_hex", optStr: "12 hex abcdefx", wantVal: nil, wantCode: 0, }, { name: "success_ip", optStr: "123 ip 1.2.3.4", wantVal: net.IP{1, 2, 3, 4}, wantCode: 123, }, { name: "success_ipv6", optStr: "123 ip ::1234", wantVal: net.IP{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12, 0x34, }, wantCode: 123, }, { name: "bad_code", optStr: "256 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "negative_code", optStr: "-1 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "bad_ip", optStr: "12 ip 1.1.1.1x", wantVal: nil, wantCode: 0, }, { name: "bad_mode", wantVal: nil, optStr: "12 x 1.1.1.1", wantCode: 0, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { code, val := parseOptionString(tc.optStr) require.Equal(t, tc.wantCode, code) if tc.wantVal != nil { assert.Equal(t, tc.wantVal, val) } }) } } </s> add </s> remove var err error </s> add </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/dhcpd.go
<mask> assert.Equal(t, leases[0].IP, staticLeases[0].IP) <mask> assert.Equal(t, leases[1].HWAddr, staticLeases[1].HWAddr) <mask> assert.Equal(t, leases[2].HWAddr, dynLeases[1].HWAddr) <mask> } <mask> <mask> func TestOptions(t *testing.T) { <mask> testCases := []struct { <mask> name string <mask> optStr string <mask> wantVal []byte <mask> wantCode uint8 <mask> }{{ <mask> name: "success_hex", <mask> optStr: "12 hex abcdef", <mask> wantVal: []byte{0xab, 0xcd, 0xef}, <mask> wantCode: 12, <mask> }, { <mask> name: "bad_hex", <mask> optStr: "12 hex abcdefx", <mask> wantVal: nil, <mask> wantCode: 0, <mask> }, { <mask> name: "success_ip", <mask> optStr: "123 ip 1.2.3.4", <mask> wantVal: net.IP{1, 2, 3, 4}, <mask> wantCode: 123, <mask> }, { <mask> name: "success_ipv6", <mask> optStr: "123 ip ::1234", <mask> wantVal: net.IP{ <mask> 0, 0, 0, 0, <mask> 0, 0, 0, 0, <mask> 0, 0, 0, 0, <mask> 0, 0, 0x12, 0x34, <mask> }, <mask> wantCode: 123, <mask> }, { <mask> name: "bad_code", <mask> optStr: "256 ip 1.1.1.1", <mask> wantVal: nil, <mask> wantCode: 0, <mask> }, { <mask> name: "negative_code", <mask> optStr: "-1 ip 1.1.1.1", <mask> wantVal: nil, <mask> wantCode: 0, <mask> }, { <mask> name: "bad_ip", <mask> optStr: "12 ip 1.1.1.1x", <mask> wantVal: nil, <mask> wantCode: 0, <mask> }, { <mask> name: "bad_mode", <mask> wantVal: nil, <mask> optStr: "12 x 1.1.1.1", <mask> wantCode: 0, <mask> }} <mask> <mask> for _, tc := range testCases { <mask> t.Run(tc.name, func(t *testing.T) { <mask> code, val := parseOptionString(tc.optStr) <mask> require.Equal(t, tc.wantCode, code) <mask> if tc.wantVal != nil { <mask> assert.Equal(t, tc.wantVal, val) <mask> } <mask> }) <mask> } <mask> } </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) { </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data </s> remove val []byte </s> add data []byte
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/dhcpd_test.go
data []byte
<mask> } <mask> <mask> type dhcpOption struct { <mask> code uint8 <mask> val []byte <mask> } </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove func TestOptions(t *testing.T) { testCases := []struct { name string optStr string wantVal []byte wantCode uint8 }{{ name: "success_hex", optStr: "12 hex abcdef", wantVal: []byte{0xab, 0xcd, 0xef}, wantCode: 12, }, { name: "bad_hex", optStr: "12 hex abcdefx", wantVal: nil, wantCode: 0, }, { name: "success_ip", optStr: "123 ip 1.2.3.4", wantVal: net.IP{1, 2, 3, 4}, wantCode: 123, }, { name: "success_ipv6", optStr: "123 ip ::1234", wantVal: net.IP{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12, 0x34, }, wantCode: 123, }, { name: "bad_code", optStr: "256 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "negative_code", optStr: "-1 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "bad_ip", optStr: "12 ip 1.1.1.1x", wantVal: nil, wantCode: 0, }, { name: "bad_mode", wantVal: nil, optStr: "12 x 1.1.1.1", wantCode: 0, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { code, val := parseOptionString(tc.optStr) require.Equal(t, tc.wantCode, code) if tc.wantVal != nil { assert.Equal(t, tc.wantVal, val) } }) } } </s> add </s> remove var err error </s> add </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/server.go
resp.Options[opt.code] = opt.data
<mask> resp.UpdateOption(dhcpv4.OptSubnetMask(s.conf.subnetMask)) <mask> resp.UpdateOption(dhcpv4.OptDNS(s.conf.dnsIPAddrs...)) <mask> <mask> for _, opt := range s.conf.options { <mask> resp.Options[opt.code] = opt.val <mask> } <mask> return 1 <mask> } <mask> <mask> // client(0.0.0.0:68) -> (Request:ClientMAC,Type=Discover,ClientID,ReqIP,HostName) -> server(255.255.255.255:67) </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove val: val, </s> add data: data, </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) { </s> remove func TestOptions(t *testing.T) { testCases := []struct { name string optStr string wantVal []byte wantCode uint8 }{{ name: "success_hex", optStr: "12 hex abcdef", wantVal: []byte{0xab, 0xcd, 0xef}, wantCode: 12, }, { name: "bad_hex", optStr: "12 hex abcdefx", wantVal: nil, wantCode: 0, }, { name: "success_ip", optStr: "123 ip 1.2.3.4", wantVal: net.IP{1, 2, 3, 4}, wantCode: 123, }, { name: "success_ipv6", optStr: "123 ip ::1234", wantVal: net.IP{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12, 0x34, }, wantCode: 123, }, { name: "bad_code", optStr: "256 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "negative_code", optStr: "-1 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "bad_ip", optStr: "12 ip 1.1.1.1x", wantVal: nil, wantCode: 0, }, { name: "bad_mode", wantVal: nil, optStr: "12 x 1.1.1.1", wantCode: 0, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { code, val := parseOptionString(tc.optStr) require.Equal(t, tc.wantCode, code) if tc.wantVal != nil { assert.Equal(t, tc.wantVal, val) } }) } } </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/v4.go
func v4Create(conf V4ServerConf) (srv DHCPServer, err error) {
<mask> s.srv = nil <mask> } <mask> <mask> // Create DHCPv4 server <mask> func v4Create(conf V4ServerConf) (DHCPServer, error) { <mask> s := &v4Server{} <mask> s.conf = conf <mask> <mask> if !conf.Enabled { <mask> return s, nil </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove var err error </s> add </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove val: val, </s> add data: data, </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/v4.go
<mask> if !conf.Enabled { <mask> return s, nil <mask> } <mask> <mask> var err error <mask> s.conf.routerIP, err = tryTo4(s.conf.GatewayIP) <mask> if err != nil { <mask> return s, fmt.Errorf("dhcpv4: %w", err) <mask> } <mask> </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) { </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove val: val, </s> add data: data, </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/v4.go
p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err)
<mask> } else { <mask> s.conf.leaseTime = time.Second * time.Duration(conf.LeaseDuration) <mask> } <mask> <mask> for _, o := range conf.Options { <mask> code, val := parseOptionString(o) <mask> if code == 0 { <mask> log.Debug("dhcpv4: bad option string: %s", o) <mask> continue <mask> } <mask> <mask> opt := dhcpOption{ <mask> code: code, </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove val: val, </s> add data: data, </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data </s> remove func TestOptions(t *testing.T) { testCases := []struct { name string optStr string wantVal []byte wantCode uint8 }{{ name: "success_hex", optStr: "12 hex abcdef", wantVal: []byte{0xab, 0xcd, 0xef}, wantCode: 12, }, { name: "bad_hex", optStr: "12 hex abcdefx", wantVal: nil, wantCode: 0, }, { name: "success_ip", optStr: "123 ip 1.2.3.4", wantVal: net.IP{1, 2, 3, 4}, wantCode: 123, }, { name: "success_ipv6", optStr: "123 ip ::1234", wantVal: net.IP{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x12, 0x34, }, wantCode: 123, }, { name: "bad_code", optStr: "256 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "negative_code", optStr: "-1 ip 1.1.1.1", wantVal: nil, wantCode: 0, }, { name: "bad_ip", optStr: "12 ip 1.1.1.1x", wantVal: nil, wantCode: 0, }, { name: "bad_mode", wantVal: nil, optStr: "12 x 1.1.1.1", wantCode: 0, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { code, val := parseOptionString(tc.optStr) require.Equal(t, tc.wantCode, code) if tc.wantVal != nil { assert.Equal(t, tc.wantVal, val) } }) } } </s> add </s> remove val []byte </s> add data []byte
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/v4.go
data: data,
<mask> } <mask> <mask> opt := dhcpOption{ <mask> code: code, <mask> val: val, <mask> } <mask> s.conf.options = append(s.conf.options, opt) <mask> } <mask> <mask> return s, nil </s> Pull request: dhcpd: add ips and text option types Updates #2385. Squashed commit of the following: commit ce8467f1c013c6b3fef59667084e2c6569a7213c Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 15 19:02:17 2021 +0300 dhcpd: add ips and text option types </s> remove for _, o := range conf.Options { code, val := parseOptionString(o) if code == 0 { log.Debug("dhcpv4: bad option string: %s", o) </s> add p := newDHCPOptionParser() for i, o := range conf.Options { var code uint8 var data []byte code, data, err = p.parse(o) if err != nil { log.Error("dhcpv4: bad option string at index %d: %s", i, err) </s> remove resp.Options[opt.code] = opt.val </s> add resp.Options[opt.code] = opt.data </s> remove var err error </s> add </s> remove // Parse option string // Format: // CODE TYPE VALUE func parseOptionString(s string) (uint8, []byte) { s = strings.TrimSpace(s) scode := util.SplitNext(&s, ' ') t := util.SplitNext(&s, ' ') sval := util.SplitNext(&s, ' ') code, err := strconv.Atoi(scode) if err != nil || code <= 0 || code > 255 { return 0, nil } var val []byte switch t { case "hex": val, err = hex.DecodeString(sval) if err != nil { return 0, nil } case "ip": ip := net.ParseIP(sval) if ip == nil { return 0, nil } // Most DHCP options require IPv4, so do not put the 16-byte // version if we can. Otherwise, the clients will receive weird // data that looks like four IPv4 addresses. // // See https://github.com/AdguardTeam/AdGuardHome/issues/2688. if ip4 := ip.To4(); ip4 != nil { val = ip4 } else { val = ip } default: return 0, nil } return uint8(code), val } </s> add </s> remove func v4Create(conf V4ServerConf) (DHCPServer, error) { </s> add func v4Create(conf V4ServerConf) (srv DHCPServer, err error) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e6a8fe452c58dfd7700ead2b7f07929923260d4c
internal/dhcpd/v4.go
if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment {
<mask> config.DHCP.Conf4.LeaseDuration = 86400 <mask> config.DHCP.Conf4.ICMPTimeout = 1000 <mask> config.DHCP.Conf6.LeaseDuration = 86400 <mask> <mask> if ch := version.Channel(); ch == "edge" || ch == "development" { <mask> config.BetaBindPort = 3001 <mask> } <mask> } <mask> <mask> // getConfigFilename returns path to the current config file </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove Context.disableUpdate = args.disableUpdate </s> add Context.disableUpdate = args.disableUpdate || version.Channel() == version.ChannelDevelopment </s> remove channel string </s> add channel string = ChannelDevelopment </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/home/config.go
Context.disableUpdate = args.disableUpdate || version.Channel() == version.ChannelDevelopment
<mask> } <mask> <mask> func setupContext(args options) { <mask> Context.runningAsService = args.runningAsService <mask> Context.disableUpdate = args.disableUpdate <mask> <mask> Context.firstRun = detectFirstRun() <mask> if Context.firstRun { <mask> log.Info("This is the first time AdGuard Home is launched") <mask> checkPermissions() </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove if ch := version.Channel(); ch == "edge" || ch == "development" { </s> add if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment { </s> remove channel string </s> add channel string = ChannelDevelopment </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/home/home.go
"github.com/AdguardTeam/AdGuardHome/internal/version"
<mask> "testing" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/testutil" <mask> "github.com/stretchr/testify/assert" <mask> ) <mask> <mask> // TODO(a.garipov): Rewrite these tests. </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove channel string </s> add channel string = ChannelDevelopment </s> remove if ch := version.Channel(); ch == "edge" || ch == "development" { </s> add if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment { </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Channel: version.ChannelBeta,
<mask> <mask> u := NewUpdater(&Config{ <mask> Client: &http.Client{}, <mask> Version: "v0.103.0-beta.1", <mask> Channel: "beta", <mask> GOARCH: "arm", <mask> GOOS: "linux", <mask> }) <mask> <mask> fakeURL := &url.URL{ </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
<mask> <mask> fakeURL := &url.URL{ <mask> Scheme: "http", <mask> Host: net.JoinHostPort("127.0.0.1", lport), <mask> Path: path.Join("adguardhome", "beta", "version.json"), <mask> } <mask> u.versionCheckURL = fakeURL.String() <mask> <mask> info, err := u.VersionInfo(false) <mask> assert.Nil(t, err) </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove if ch := version.Channel(); ch == "edge" || ch == "development" { </s> add if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment { </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Channel: version.ChannelBeta,
<mask> <mask> u := NewUpdater(&Config{ <mask> Client: &http.Client{}, <mask> Version: "v0.103.0-beta.1", <mask> Channel: "beta", <mask> GOARCH: "arm", <mask> GOOS: "linux", <mask> GOARM: "7", <mask> }) <mask> </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
<mask> <mask> fakeURL := &url.URL{ <mask> Scheme: "http", <mask> Host: net.JoinHostPort("127.0.0.1", lport), <mask> Path: path.Join("adguardhome", "beta", "version.json"), <mask> } <mask> u.versionCheckURL = fakeURL.String() <mask> <mask> info, err := u.VersionInfo(false) <mask> assert.Nil(t, err) </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Channel: version.ChannelBeta,
<mask> <mask> u := NewUpdater(&Config{ <mask> Client: &http.Client{}, <mask> Version: "v0.103.0-beta.1", <mask> Channel: "beta", <mask> GOARCH: "mips", <mask> GOOS: "linux", <mask> GOMIPS: "softfloat", <mask> }) <mask> </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Channel: "beta", </s> add Channel: version.ChannelBeta, </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"), </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
<mask> <mask> fakeURL := &url.URL{ <mask> Scheme: "http", <mask> Host: net.JoinHostPort("127.0.0.1", lport), <mask> Path: path.Join("adguardhome", "beta", "version.json"), <mask> } <mask> u.versionCheckURL = fakeURL.String() <mask> <mask> info, err := u.VersionInfo(false) <mask> assert.Nil(t, err) </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/updater/updater_test.go
channel string = ChannelDevelopment
<mask> // <mask> // TODO(a.garipov): Find out if we can get GOARM and GOMIPS values the same way <mask> // we can GOARCH and GOOS. <mask> var ( <mask> channel string <mask> goarm string <mask> gomips string <mask> version string <mask> ) <mask> </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove if ch := version.Channel(); ch == "edge" || ch == "development" { </s> add if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment { </s> remove Context.disableUpdate = args.disableUpdate </s> add Context.disableUpdate = args.disableUpdate || version.Channel() == version.ChannelDevelopment </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/version/version.go
// Channel constants. const ( ChannelDevelopment = "development" ChannelEdge = "edge" ChannelBeta = "beta" ChannelRelease = "release" )
<mask> version string <mask> ) <mask> <mask> // Channel returns the current AdGuard Home release channel. <mask> func Channel() (v string) { <mask> return channel <mask> } </s> Pull request: all: imp dev version handling Merge in DNS/adguard-home from fix-version to master Squashed commit of the following: commit ecef63315fb49ae33b4c3f13c0e0be0668340e2b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:59:17 2021 +0300 updater: imp tests commit f5243918567430e467c44a48e45169db4560b58b Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Jan 22 18:48:10 2021 +0300 all: imp dev version handling </s> remove channel string </s> add channel string = ChannelDevelopment </s> remove Context.disableUpdate = args.disableUpdate </s> add Context.disableUpdate = args.disableUpdate || version.Channel() == version.ChannelDevelopment </s> remove if ch := version.Channel(); ch == "edge" || ch == "development" { </s> add if ch := version.Channel(); ch == version.ChannelEdge || ch == version.ChannelDevelopment { </s> remove Path: path.Join("adguardhome", "beta", "version.json"), </s> add Path: path.Join("adguardhome", version.ChannelBeta, "version.json"),
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e71019a1f3548fa834e5538e8ad4ce173baabdc4
internal/version/version.go
"example_upstream_sdns": "du kan bruge <0>DNS Stamps</0> til <1>DNSCrypt</1> eller <2>DNS-over-HTTPS</2>-resolvers",
<mask> "example_upstream_regular": "almindelig DNS (over UDP)", <mask> "example_upstream_dot": "krypteret <0>DNS-over-TLS</0>", <mask> "example_upstream_doh": "krypteret <0>DNS-over-HTTPS</0>", <mask> "example_upstream_doq": "krypteret <0>DNS-over-QUIC</0>", <mask> "example_upstream_sdns": "du kan bruge <0>DNS Stamps<0> til <1>DNSCrypt>/1> eller <2>DNS-over-HTTPS</2> resolvers", <mask> "example_upstream_tcp": "almindelig DNS (over TCP)", <mask> "all_lists_up_to_date_toast": "Alle lister er allerede opdaterede", <mask> "updated_upstream_dns_toast": "Opdaterede upstream DNS-servere", <mask> "dns_test_ok_toast": "De angivne DNS-servere fungerer korrekt", <mask> "dns_test_not_ok_toast": "Server \"{{key}}\": kunne ikke bruges, kontroller venligst at du har skrevet det korrekt", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "updated_upstream_dns_toast": "Opdaterede upstream DNS-servere", "dns_test_ok_toast": "De angivne DNS-servere fungerer korrekt", "dns_test_not_ok_toast": "Server \"{{key}}\": kunne ikke bruges, kontroller venligst at du har skrevet det korrekt", "unblock": "Fjern blokering", "block": "Bloker", </s> add "updated_upstream_dns_toast": "Opdaterede upstream DNS-serverene", "dns_test_ok_toast": "Angivne DNS-servere fungerer korrekt", "dns_test_not_ok_toast": "Server \"{{key}}\": Kunne ikke bruges. Tjek, at du har angivet den korrekt", "unblock": "Afblokering", "block": "Blokering", </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", </s> add "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/da.json
"updated_upstream_dns_toast": "Opdaterede upstream DNS-serverene", "dns_test_ok_toast": "Angivne DNS-servere fungerer korrekt", "dns_test_not_ok_toast": "Server \"{{key}}\": Kunne ikke bruges. Tjek, at du har angivet den korrekt", "unblock": "Afblokering", "block": "Blokering",
<mask> "example_upstream_doq": "krypteret <0>DNS-over-QUIC</0>", <mask> "example_upstream_sdns": "du kan bruge <0>DNS Stamps<0> til <1>DNSCrypt>/1> eller <2>DNS-over-HTTPS</2> resolvers", <mask> "example_upstream_tcp": "almindelig DNS (over TCP)", <mask> "all_lists_up_to_date_toast": "Alle lister er allerede opdaterede", <mask> "updated_upstream_dns_toast": "Opdaterede upstream DNS-servere", <mask> "dns_test_ok_toast": "De angivne DNS-servere fungerer korrekt", <mask> "dns_test_not_ok_toast": "Server \"{{key}}\": kunne ikke bruges, kontroller venligst at du har skrevet det korrekt", <mask> "unblock": "Fjern blokering", <mask> "block": "Bloker", <mask> "disallow_this_client": "Afvis denne klient", <mask> "allow_this_client": "Tillad denne klient", <mask> "block_for_this_client_only": "Bloker kun for denne klient", <mask> "unblock_for_this_client_only": "Fjern blokering kun for denne klient", <mask> "time_table_header": "Tid", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "example_upstream_sdns": "du kan bruge <0>DNS Stamps<0> til <1>DNSCrypt>/1> eller <2>DNS-over-HTTPS</2> resolvers", </s> add "example_upstream_sdns": "du kan bruge <0>DNS Stamps</0> til <1>DNSCrypt</1> eller <2>DNS-over-HTTPS</2>-resolvers", </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", </s> add "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.",
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/da.json
"empty_response_status": "Tomt",
<mask> "type_table_header": "Type", <mask> "response_table_header": "Svar", <mask> "response_code": "Responskode", <mask> "client_table_header": "Klient", <mask> "empty_response_status": "Tom", <mask> "show_all_filter_type": "Vis alle", <mask> "show_filtered_type": "Vis filtrerede", <mask> "no_logs_found": "Ingen logfiler fundet", <mask> "refresh_btn": "Opdater", <mask> "previous_btn": "Forrige", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", </s> add "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.", </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/da.json
<mask> "use_adguard_browsing_sec_hint": "AdGuard Home akan mengecek jika domain diblacklist oleh layanan web keamanan penjelajahan. Akan menggunakan lookup API yang ramah privasi untuk melakukan cek: hanya awalan singkat hash SHA256 dari nama domain yang dikirim ke server.", <mask> "use_adguard_parental": "Gunakan layanan web kontrol orang tua AdGuard", <mask> "use_adguard_parental_hint": "AdGuard Home akan mengecek jika domain mengandung materi dewasa. Akan menggunakan API yang ramah privasi yang sama sebagai layanan web keamanan penjelajahan.", <mask> "enforce_safe_search": "Paksa penelusuran aman", <mask> "enforce_save_search_hint": "AdGuard Home dapat memaksa penelusuran aman pada mesin pencari berikut: Google, Youtube, Bing, dan Yandex.", <mask> "no_servers_specified": "Sever tidak disebutkan", <mask> "general_settings": "Pengaturan umum", <mask> "dns_settings": "Pengaturan DNS", <mask> "dns_blocklists": "Daftar blokir DNS", <mask> "dns_allowlists": "Daftar putih DNS", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", </s> add "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.", </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/id.json
"dhcp_form_subnet_input": "Maschera di sottorete",
<mask> "form_error_positive": "Deve essere maggiore di 0", <mask> "form_error_negative": "Deve essere maggiore o uguale a 0 (zero)", <mask> "range_end_error": "Deve essere maggiore dell'intervallo di inizio", <mask> "dhcp_form_gateway_input": "IP Gateway", <mask> "dhcp_form_subnet_input": "Subnet mask", <mask> "dhcp_form_range_title": "Range indirizzi IP", <mask> "dhcp_form_range_start": "Inizio range", <mask> "dhcp_form_range_end": "Fine range", <mask> "dhcp_form_lease_title": "Tempo di lease DHCP (in secondi)", <mask> "dhcp_form_lease_input": "Durata lease", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "choose_allowlist": "Scegli liste di autorizzazione", </s> add "choose_allowlist": "Scegli liste bianche",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"homepage": "Pagina principale",
<mask> "protocol": "Protocollo", <mask> "on": "ATTIVO", <mask> "off": "DISATTIVATO", <mask> "copyright": "Copyright", <mask> "homepage": "Pagina iniziale", <mask> "report_an_issue": "Segnala un problema", <mask> "privacy_policy": "Politica sulla riservatezza", <mask> "enable_protection": "Attiva protezione", <mask> "enabled_protection": "Protezione attiva", <mask> "disable_protection": "Disattiva protezione", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "disabled_safe_search_toast": "Disattiva Ricerca Sicura", "enabled_save_search_toast": "Attiva Ricerca Sicura", </s> add "disabled_safe_search_toast": "Ricerca sicura disattivata", "enabled_save_search_toast": "Attiva ricerca sicura", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "edit_allowlist": "Modifica lista dei consentiti", </s> add "edit_allowlist": "Modifica lista bianca",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"disabled_safe_search_toast": "Ricerca sicura disattivata", "enabled_save_search_toast": "Attiva ricerca sicura",
<mask> "disabled_safe_browsing_toast": "Disattiva navigazione sicura", <mask> "enabled_safe_browsing_toast": "Attiva navigazione sicura", <mask> "disabled_parental_toast": "Disattiva il Controllo Parentale", <mask> "enabled_parental_toast": "Attiva Controllo Parentale", <mask> "disabled_safe_search_toast": "Disattiva Ricerca Sicura", <mask> "enabled_save_search_toast": "Attiva Ricerca Sicura", <mask> "enabled_table_header": "Attivo", <mask> "name_table_header": "Nome", <mask> "list_url_table_header": "Elenco URL", <mask> "rules_count_table_header": "Numero regole", <mask> "last_time_updated_table_header": "Ultimo aggiornamento", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "homepage": "Pagina iniziale", </s> add "homepage": "Pagina principale", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca",
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"check_updates_btn": "Ricerca aggiornamenti",
<mask> "add_allowlist": "Aggiungi lista dei consentiti", <mask> "cancel_btn": "Annulla", <mask> "enter_name_hint": "Inserisci nome", <mask> "enter_url_or_path_hint": "Inmetti un URL o il percorso assoluto della lista", <mask> "check_updates_btn": "Controlla aggiornamenti", <mask> "new_blocklist": "Nuova lista di blocco", <mask> "new_allowlist": "Nuova lista dei consentiti", <mask> "edit_blocklist": "Modifica lista di blocco", <mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "choose_blocklist": "Scegli liste di blocco", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "edit_allowlist": "Modifica lista dei consentiti", </s> add "edit_allowlist": "Modifica lista bianca", </s> remove "choose_allowlist": "Scegli liste di autorizzazione", </s> add "choose_allowlist": "Scegli liste bianche", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"new_allowlist": "Nuova lista bianca",
<mask> "enter_name_hint": "Inserisci nome", <mask> "enter_url_or_path_hint": "Inmetti un URL o il percorso assoluto della lista", <mask> "check_updates_btn": "Controlla aggiornamenti", <mask> "new_blocklist": "Nuova lista di blocco", <mask> "new_allowlist": "Nuova lista dei consentiti", <mask> "edit_blocklist": "Modifica lista di blocco", <mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "choose_blocklist": "Scegli liste di blocco", <mask> "choose_allowlist": "Scegli liste di autorizzazione", <mask> "enter_valid_blocklist": "Inserisci un URL valido nella lista di blocco.", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "edit_allowlist": "Modifica lista dei consentiti", </s> add "edit_allowlist": "Modifica lista bianca", </s> remove "choose_allowlist": "Scegli liste di autorizzazione", </s> add "choose_allowlist": "Scegli liste bianche", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"edit_allowlist": "Modifica lista bianca",
<mask> "check_updates_btn": "Controlla aggiornamenti", <mask> "new_blocklist": "Nuova lista di blocco", <mask> "new_allowlist": "Nuova lista dei consentiti", <mask> "edit_blocklist": "Modifica lista di blocco", <mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "choose_blocklist": "Scegli liste di blocco", <mask> "choose_allowlist": "Scegli liste di autorizzazione", <mask> "enter_valid_blocklist": "Inserisci un URL valido nella lista di blocco.", <mask> "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", <mask> "form_error_url_format": "Formato url non valido", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "choose_allowlist": "Scegli liste di autorizzazione", </s> add "choose_allowlist": "Scegli liste bianche", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"choose_allowlist": "Scegli liste bianche",
<mask> "new_allowlist": "Nuova lista dei consentiti", <mask> "edit_blocklist": "Modifica lista di blocco", <mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "choose_blocklist": "Scegli liste di blocco", <mask> "choose_allowlist": "Scegli liste di autorizzazione", <mask> "enter_valid_blocklist": "Inserisci un URL valido nella lista di blocco.", <mask> "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", <mask> "form_error_url_format": "Formato url non valido", <mask> "form_error_url_or_path_format": "URL o percorso assoluto della lista non valido", <mask> "custom_filter_rules": "Regole filtri personalizzate", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "edit_allowlist": "Modifica lista dei consentiti", </s> add "edit_allowlist": "Modifica lista bianca", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.",
<mask> "edit_allowlist": "Modifica lista dei consentiti", <mask> "choose_blocklist": "Scegli liste di blocco", <mask> "choose_allowlist": "Scegli liste di autorizzazione", <mask> "enter_valid_blocklist": "Inserisci un URL valido nella lista di blocco.", <mask> "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", <mask> "form_error_url_format": "Formato url non valido", <mask> "form_error_url_or_path_format": "URL o percorso assoluto della lista non valido", <mask> "custom_filter_rules": "Regole filtri personalizzate", <mask> "custom_filter_rules_hint": "Inserisci una regola per riga. Puoi utilizzare la sintassi delle regole di blocco per annunci o quelle dei file hosts.", <mask> "examples_title": "Esempi", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "choose_allowlist": "Scegli liste di autorizzazione", </s> add "choose_allowlist": "Scegli liste bianche", </s> remove "edit_allowlist": "Modifica lista dei consentiti", </s> add "edit_allowlist": "Modifica lista bianca", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"install_saved": "Salvataggio riuscito",
<mask> "install_devices_ios_list_4": "Nel campo DNS inserisci gli indirizzi del tuo server AdGuard Home.", <mask> "get_started": "Inizia", <mask> "next": "Prossimo", <mask> "open_dashboard": "Apri pannello di controllo", <mask> "install_saved": "Salvataggio riuscito con successo", <mask> "encryption_title": "crittografia", <mask> "encryption_desc": "Supporto di crittografia (HTTPS / TLS) per interfaccia web sia di DNS che di amministrazione", <mask> "encryption_config_saved": "Configurazione della crittografia salvata", <mask> "encryption_server": "Nome server", <mask> "encryption_server_enter": "Inserisci il tuo nome di dominio", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "example_upstream_sdns": "du kan bruge <0>DNS Stamps<0> til <1>DNSCrypt>/1> eller <2>DNS-over-HTTPS</2> resolvers", </s> add "example_upstream_sdns": "du kan bruge <0>DNS Stamps</0> til <1>DNSCrypt</1> eller <2>DNS-over-HTTPS</2>-resolvers", </s> remove "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", </s> add "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.",
<mask> "password_placeholder": "Inserisci password", <mask> "sign_in": "Accedi", <mask> "sign_out": "Esci", <mask> "forgot_password": "Hai perso la password?", <mask> "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", <mask> "location": "Locazione", <mask> "orgname": "Nome dell'organizzazione", <mask> "netname": "Nome Network", <mask> "network": "Rete", <mask> "descr": "Descrizione", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
<mask> "filter_category_general": "Generali", <mask> "filter_category_security": "Sicurezza", <mask> "filter_category_regional": "Regionale", <mask> "filter_category_other": "Altro", <mask> "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", <mask> "filter_category_security_desc": "Liste specializzate sul blocco di malware, phishing o domini scam", <mask> "filter_category_regional_desc": "Liste focalizzate su annunci regionali e server traccianti", <mask> "filter_category_other_desc": "Altre liste di blocco", <mask> "setup_config_to_enable_dhcp_server": "Configurazione dell'installazione per abilitare il server DHCP", <mask> "original_response": "Responso originale", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "enter_valid_allowlist": "Inserisci un URL valido nella lista dei consentiti.", </s> add "enter_valid_allowlist": "Inserisci un URL valido nella lista bianca.", </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "forgot_password_desc": "Per favore segui <0>questi punti</0> per creare una nuova password per il tuo account.", </s> add "forgot_password_desc": "Per favore segui <0>questi passaggi</0> per creare una nuova password per il tuo profilo.", </s> remove "check_updates_btn": "Controlla aggiornamenti", </s> add "check_updates_btn": "Ricerca aggiornamenti", </s> remove "new_allowlist": "Nuova lista dei consentiti", </s> add "new_allowlist": "Nuova lista bianca",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/it.json
"enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en DuckDuckGo, Yandex, Pixabay.",
<mask> "use_adguard_browsing_sec_hint": "AdGuard Home controleert of het domein in de blokkeerlijst voorkomt dmv Browsing Security web service. Dit gebeurt dmv een privacy vriendelijk API verzoek:een korte prefix van de domein naam met SHA256 hash wordt verzonden naar de server.", <mask> "use_adguard_parental": "Gebruik AdGuard Ouderlijk toezicht web service", <mask> "use_adguard_parental_hint": "AdGuard Home controleert of het domein 18+ content bevat. Dit gebeurt dmv dezelfde privacy vriendelijke API als de Browsing Security web service.", <mask> "enforce_safe_search": "Forceer Veilig Zoeken", <mask> "enforce_save_search_hint": "AdGuard Home kan veilig zoeken forceren voor de volgende zoekmachines: Google, Youtube, Bing, en Yandex.", <mask> "no_servers_specified": "Geen servers gespecificeerd", <mask> "general_settings": "Generieke instellingen", <mask> "dns_settings": "DNS Instellingen", <mask> "dns_blocklists": "DNS blokkeerlijsten", <mask> "dns_allowlists": "DNS toestemmingslijsten", </s> Pull request: client: upd i18n Updates #2643. Squashed commit of the following: commit 4f6098ce31fb3e9e81d66ca613e02c9573763e13 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Mar 29 14:01:33 2021 +0300 client: upd i18n </s> remove "enforce_save_search_hint": "AdGuard Home dapat memaksa penelusuran aman pada mesin pencari berikut: Google, Youtube, Bing, dan Yandex.", </s> add </s> remove "install_saved": "Salvataggio riuscito con successo", </s> add "install_saved": "Salvataggio riuscito", </s> remove "example_upstream_sdns": "du kan bruge <0>DNS Stamps<0> til <1>DNSCrypt>/1> eller <2>DNS-over-HTTPS</2> resolvers", </s> add "example_upstream_sdns": "du kan bruge <0>DNS Stamps</0> til <1>DNSCrypt</1> eller <2>DNS-over-HTTPS</2>-resolvers", </s> remove "updated_upstream_dns_toast": "Opdaterede upstream DNS-servere", "dns_test_ok_toast": "De angivne DNS-servere fungerer korrekt", "dns_test_not_ok_toast": "Server \"{{key}}\": kunne ikke bruges, kontroller venligst at du har skrevet det korrekt", "unblock": "Fjern blokering", "block": "Bloker", </s> add "updated_upstream_dns_toast": "Opdaterede upstream DNS-serverene", "dns_test_ok_toast": "Angivne DNS-servere fungerer korrekt", "dns_test_not_ok_toast": "Server \"{{key}}\": Kunne ikke bruges. Tjek, at du har angivet den korrekt", "unblock": "Afblokering", "block": "Blokering", </s> remove "filter_category_general_desc": "Liste per blocco tracciamenti e annunci sulla maggioranza dei dispositivi", </s> add "filter_category_general_desc": "Liste per il blocco dei traccianti e degli annunci sulla maggioranza dei dispositivi",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e710ce11008cd61279e7e1c346f4b60ed62a2982
client/src/__locales/nl.json
"updates_checked": "A new version of AdGuard Home is available",
<mask> "access_disallowed_desc": "A list of CIDRs, IP addresses, or <a>ClientIDs</a>. If this list has entries, AdGuard Home will drop requests from these clients. This field is ignored if there are entries in Allowed clients.", <mask> "access_blocked_title": "Disallowed domains", <mask> "access_blocked_desc": "Not to be confused with filters. AdGuard Home drops DNS queries matching these domains, and these queries don't even appear in the query log. You can specify exact domain names, wildcards, or URL filter rules, e.g. \"example.org\", \"*.example.org\", or \"||example.org^\" correspondingly.", <mask> "access_settings_saved": "Access settings successfully saved", <mask> "updates_checked": "Updates successfully checked", <mask> "updates_version_equal": "AdGuard Home is up-to-date", <mask> "check_updates_now": "Check for updates now", <mask> "dns_privacy": "DNS Privacy", <mask> "setup_dns_privacy_1": "<0>DNS-over-TLS:</0> Use <1>{{address}}</1> string.", <mask> "setup_dns_privacy_2": "<0>DNS-over-HTTPS:</0> Use <1>{{address}}</1> string.", </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove if vr.CanAutoUpdate == nil || !*vr.CanAutoUpdate { return </s> add if vr.CanAutoUpdate != aghalg.NBTrue { return nil </s> remove assert.Equal(t, "v0.0", info.SelfUpdateMinVersion) if assert.NotNil(t, info.CanAutoUpdate) { assert.True(t, *info.CanAutoUpdate) } </s> add assert.Equal(t, aghalg.NBTrue, info.CanAutoUpdate) </s> remove if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { </s> add if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled { </s> remove assert.Equal(t, "v0.0", info.SelfUpdateMinVersion) if assert.NotNil(t, info.CanAutoUpdate) { assert.True(t, *info.CanAutoUpdate) } </s> add assert.Equal(t, aghalg.NBTrue, info.CanAutoUpdate) </s> remove assert.Equal(t, "v0.0", info.SelfUpdateMinVersion) if assert.NotNil(t, info.CanAutoUpdate) { assert.True(t, *info.CanAutoUpdate) } </s> add assert.Equal(t, aghalg.NBTrue, info.CanAutoUpdate)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
client/src/__locales/en.json
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/AdguardTeam/golibs/timeutil" </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove "strings" </s> add </s> remove assert.Equal(t, "v0.0", info.SelfUpdateMinVersion) if assert.NotNil(t, info.CanAutoUpdate) { assert.True(t, *info.CanAutoUpdate) } </s> add assert.Equal(t, aghalg.NBTrue, info.CanAutoUpdate)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
Enabled aghalg.NullBool `json:"enabled"`
<mask> type dhcpServerConfigJSON struct { <mask> V4 *v4ServerConfJSON `json:"v4"` <mask> V6 *v6ServerConfJSON `json:"v6"` <mask> InterfaceName string `json:"interface_name"` <mask> Enabled nullBool `json:"enabled"` <mask> } <mask> <mask> func (s *Server) handleDHCPSetConfigV4( <mask> conf *dhcpServerConfigJSON, <mask> ) (srv4 DHCPServer, enabled bool, err error) { </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove Flags string `json:"flags"` </s> add </s> remove GatewayIP net.IP `json:"gateway_ip"` </s> add </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled) </s> remove CanAutoUpdate *bool `json:"can_autoupdate,omitempty"` NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` SelfUpdateMinVersion string `json:"-"` </s> add NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` // TODO(a.garipov): See if the frontend actually still cares about // nullability. CanAutoUpdate aghalg.NullBool `json:"can_autoupdate,omitempty"` </s> remove func (u *Updater) Update() error { </s> add func (u *Updater) Update() (err error) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
v4Conf.Enabled = conf.Enabled == aghalg.NBTrue
<mask> return nil, false, nil <mask> } <mask> <mask> v4Conf := v4JSONToServerConf(conf.V4) <mask> v4Conf.Enabled = conf.Enabled == nbTrue <mask> if len(v4Conf.RangeStart) == 0 { <mask> v4Conf.Enabled = false <mask> } <mask> <mask> enabled = v4Conf.Enabled </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove v6Conf.Enabled = conf.Enabled == nbTrue </s> add v6Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove if conf.Enabled != nbNull { s.conf.Enabled = conf.Enabled == nbTrue </s> add if conf.Enabled != aghalg.NBNull { s.conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { </s> add if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled { </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled) </s> remove if vr.CanAutoUpdate == nil || !*vr.CanAutoUpdate { return </s> add if vr.CanAutoUpdate != aghalg.NBTrue { return nil
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
v6Conf.Enabled = conf.Enabled == aghalg.NBTrue
<mask> return nil, false, nil <mask> } <mask> <mask> v6Conf := v6JSONToServerConf(conf.V6) <mask> v6Conf.Enabled = conf.Enabled == nbTrue <mask> if len(v6Conf.RangeStart) == 0 { <mask> v6Conf.Enabled = false <mask> } <mask> <mask> // Don't overwrite the RA/SLAAC settings from the config file. </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove v4Conf.Enabled = conf.Enabled == nbTrue </s> add v4Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove if conf.Enabled != nbNull { s.conf.Enabled = conf.Enabled == nbTrue </s> add if conf.Enabled != aghalg.NBNull { s.conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { </s> add if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled { </s> remove if vr.CanAutoUpdate == nil || !*vr.CanAutoUpdate { return </s> add if vr.CanAutoUpdate != aghalg.NBTrue { return nil </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled)
<mask> } <mask> <mask> func (s *Server) handleDHCPSetConfig(w http.ResponseWriter, r *http.Request) { <mask> conf := &dhcpServerConfigJSON{} <mask> conf.Enabled = boolToNullBool(s.conf.Enabled) <mask> conf.InterfaceName = s.conf.InterfaceName <mask> <mask> err := json.NewDecoder(r.Body).Decode(conf) <mask> if err != nil { <mask> aghhttp.Error(r, w, http.StatusBadRequest, "failed to parse new dhcp config json: %s", err) </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove Flags string `json:"flags"` </s> add </s> remove if conf.Enabled != nbNull { s.conf.Enabled = conf.Enabled == nbTrue </s> add if conf.Enabled != aghalg.NBNull { s.conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { </s> add if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled { </s> remove Enabled nullBool `json:"enabled"` </s> add Enabled aghalg.NullBool `json:"enabled"` </s> remove log.Debug("updater: renaming: %s -> %s", u.currentExeName, u.backupExeName) </s> add log.Debug("updater: renaming: %s to %s", u.currentExeName, u.backupExeName)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled {
<mask> <mask> return <mask> } <mask> <mask> if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { <mask> aghhttp.Error(r, w, http.StatusBadRequest, "dhcpv4 or dhcpv6 configuration must be complete") <mask> <mask> return <mask> } <mask> </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove if conf.Enabled != nbNull { s.conf.Enabled = conf.Enabled == nbTrue </s> add if conf.Enabled != aghalg.NBNull { s.conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove v4Conf.Enabled = conf.Enabled == nbTrue </s> add v4Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled) </s> remove v6Conf.Enabled = conf.Enabled == nbTrue </s> add v6Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove log.Debug("updater: copied: %q -> %q", src, dst) </s> add log.Debug("updater: copied: %q to %q", src, dst)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
if conf.Enabled != aghalg.NBNull { s.conf.Enabled = conf.Enabled == aghalg.NBTrue
<mask> <mask> return <mask> } <mask> <mask> if conf.Enabled != nbNull { <mask> s.conf.Enabled = conf.Enabled == nbTrue <mask> } <mask> <mask> if conf.InterfaceName != "" { <mask> s.conf.InterfaceName = conf.InterfaceName <mask> } </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove v4Conf.Enabled = conf.Enabled == nbTrue </s> add v4Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled) </s> remove if conf.Enabled == nbTrue && !v4Enabled && !v6Enabled { </s> add if conf.Enabled == aghalg.NBTrue && !v4Enabled && !v6Enabled { </s> remove v6Conf.Enabled = conf.Enabled == nbTrue </s> add v6Conf.Enabled = conf.Enabled == aghalg.NBTrue </s> remove log.Debug("updater: renaming: %s -> %s", u.currentExeName, u.backupExeName) </s> add log.Debug("updater: renaming: %s to %s", u.currentExeName, u.backupExeName)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
<mask> } <mask> <mask> type netInterfaceJSON struct { <mask> Name string `json:"name"` <mask> GatewayIP net.IP `json:"gateway_ip"` <mask> HardwareAddr string `json:"hardware_address"` <mask> Addrs4 []net.IP `json:"ipv4_addresses"` <mask> Addrs6 []net.IP `json:"ipv6_addresses"` <mask> Flags string `json:"flags"` <mask> } </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove Flags string `json:"flags"` </s> add </s> remove CanAutoUpdate *bool `json:"can_autoupdate,omitempty"` NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` SelfUpdateMinVersion string `json:"-"` </s> add NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` // TODO(a.garipov): See if the frontend actually still cares about // nullability. CanAutoUpdate aghalg.NullBool `json:"can_autoupdate,omitempty"` </s> remove Enabled nullBool `json:"enabled"` </s> add Enabled aghalg.NullBool `json:"enabled"` </s> remove log.Debug("updater: %s: unknown file type %d, skipping", name, hdr.Typeflag) </s> add log.Info("updater: %s: unknown file type %d, skipping", name, hdr.Typeflag)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
Flags string `json:"flags"` GatewayIP net.IP `json:"gateway_ip"`
<mask> Name string `json:"name"` <mask> HardwareAddr string `json:"hardware_address"` <mask> Addrs4 []net.IP `json:"ipv4_addresses"` <mask> Addrs6 []net.IP `json:"ipv6_addresses"` <mask> } <mask> </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove GatewayIP net.IP `json:"gateway_ip"` </s> add </s> remove Flags string `json:"flags"` </s> add </s> remove CanAutoUpdate *bool `json:"can_autoupdate,omitempty"` NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` SelfUpdateMinVersion string `json:"-"` </s> add NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` // TODO(a.garipov): See if the frontend actually still cares about // nullability. CanAutoUpdate aghalg.NullBool `json:"can_autoupdate,omitempty"` </s> remove Enabled nullBool `json:"enabled"` </s> add Enabled aghalg.NullBool `json:"enabled"` </s> remove log.Debug("updater: copied: %q -> %q", src, dst) </s> add log.Debug("updater: copied: %q to %q", src, dst)
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
<mask> GatewayIP net.IP `json:"gateway_ip"` <mask> HardwareAddr string `json:"hardware_address"` <mask> Addrs4 []net.IP `json:"ipv4_addresses"` <mask> Addrs6 []net.IP `json:"ipv6_addresses"` <mask> Flags string `json:"flags"` <mask> } <mask> <mask> func (s *Server) handleDHCPInterfaces(w http.ResponseWriter, r *http.Request) { <mask> response := map[string]netInterfaceJSON{} <mask> </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove GatewayIP net.IP `json:"gateway_ip"` </s> add </s> remove conf.Enabled = boolToNullBool(s.conf.Enabled) </s> add conf.Enabled = aghalg.BoolToNullBool(s.conf.Enabled) </s> remove Enabled nullBool `json:"enabled"` </s> add Enabled aghalg.NullBool `json:"enabled"` </s> remove CanAutoUpdate *bool `json:"can_autoupdate,omitempty"` NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` SelfUpdateMinVersion string `json:"-"` </s> add NewVersion string `json:"new_version,omitempty"` Announcement string `json:"announcement,omitempty"` AnnouncementURL string `json:"announcement_url,omitempty"` // TODO(a.garipov): See if the frontend actually still cares about // nullability. CanAutoUpdate aghalg.NullBool `json:"can_autoupdate,omitempty"`
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/dhcpd/http.go
"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet" <mask> "github.com/AdguardTeam/AdGuardHome/internal/updater" <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: all: imp updater Merge in DNS/adguard-home from imp-updater to master Squashed commit of the following: commit 6ed487359e56a35b36f13dcbf2efbf2a7a2d8734 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 16:29:35 2022 +0300 all: imp logs, err handling commit e930044cb619a43e5a44c230dadbe2228e9a93f5 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Jun 9 15:53:35 2022 +0300 all: imp updater </s> remove "strings" </s> add </s> remove assert.Equal(t, "v0.0", info.SelfUpdateMinVersion) if assert.NotNil(t, info.CanAutoUpdate) { assert.True(t, *info.CanAutoUpdate) } </s> add assert.Equal(t, aghalg.NBTrue, info.CanAutoUpdate)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/e738508d7a5e09e257724c557069000506e055ad
internal/home/controlupdate.go