docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
sequencelengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
<mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal", <mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: knownIP, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_unknown", </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove qtyp: dns.TypeA, </s> add </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host",
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
<mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: knownIP, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_unknown", <mask> host: "example-new.lan", <mask> suffix: defaultAutohostSuffix, </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
isLocalCli: true,
<mask> name: "local_client_success", <mask> host: "example.lan", <mask> wantIP: knownIP, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "local_client_unknown_host", <mask> host: "wronghost.lan", <mask> wantIP: nil, <mask> wantRes: resultCodeFinish, </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
name: "local_client_unknown_host", host: "wronghost.lan",
<mask> wantIP: knownIP, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_unknown", <mask> host: "example-new.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: nil, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_aaaa", </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove qtyp: dns.TypeA, </s> add </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host", </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success",
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
wantRes: resultCodeFinish, isLocalCli: true,
<mask> host: "example-new.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: nil, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_aaaa", <mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host", </s> remove qtyp: dns.TypeA, </s> add </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
name: "external_client_known_host",
<mask> wantIP: nil, <mask> qtyp: dns.TypeA, <mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_aaaa", <mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: nil, <mask> qtyp: dns.TypeAAAA, </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
<mask> wantRes: resultCodeSuccess, <mask> }, { <mask> name: "success_internal_aaaa", <mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: nil, <mask> qtyp: dns.TypeAAAA, <mask> wantRes: resultCodeSuccess, <mask> }} <mask> </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host", </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true, </s> remove name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add name: "local_client_unknown_host", host: "wronghost.lan", </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA,
<mask> host: "example.lan", <mask> suffix: defaultAutohostSuffix, <mask> wantErrMsg: "", <mask> wantIP: nil, <mask> qtyp: dns.TypeAAAA, <mask> wantRes: resultCodeSuccess, <mask> }} <mask> <mask> for _, tc := range testCases { <mask> t.Run(tc.name, func(t *testing.T) { <mask> s := &Server{ </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove func TestServer_ProcessInternalHosts(t *testing.T) { </s> add func TestServer_ProcessDetermineLocal(t *testing.T) { snd, err := aghnet.NewSubnetDetector() require.NoError(t, err) s := &Server{ subnetDetector: snd, } testCases := []struct { name string cliIP net.IP want bool }{{ name: "local", cliIP: net.IP{192, 168, 0, 1}, want: true, }, { name: "external", cliIP: net.IP{250, 249, 0, 1}, want: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { proxyCtx := &proxy.DNSContext{ Addr: &net.TCPAddr{ IP: tc.cliIP, }, } dctx := &dnsContext{ proxyCtx: proxyCtx, } s.processDetermineLocal(dctx) assert.Equal(t, tc.want, dctx.isLocalClient) }) } } func TestServer_ProcessInternalHosts_localRestriction(t *testing.T) { </s> remove suffix: defaultAutohostSuffix, wantErrMsg: "", </s> add </s> remove name: "success_internal_aaaa", </s> add name: "external_client_known_host", </s> remove name: "success_external", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeA, wantRes: resultCodeSuccess, }, { name: "success_external_non_a", host: "example.com", suffix: defaultAutohostSuffix, wantErrMsg: "", wantIP: nil, qtyp: dns.TypeCNAME, wantRes: resultCodeSuccess, }, { name: "success_internal", </s> add name: "local_client_success", </s> remove qtyp: dns.TypeA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: true,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
isLocalClient: true,
<mask> dctx := &dnsContext{ <mask> proxyCtx: &proxy.DNSContext{ <mask> Req: req, <mask> }, <mask> } <mask> <mask> res := s.processInternalHosts(dctx) <mask> pctx := dctx.proxyCtx </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, </s> remove if tc.wantErrMsg == "" { assert.NoError(t, dctx.err) } else { require.Error(t, dctx.err) assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) </s> add return </s> remove func TestServer_ProcessInternalHosts(t *testing.T) { </s> add func TestServer_ProcessDetermineLocal(t *testing.T) { snd, err := aghnet.NewSubnetDetector() require.NoError(t, err) s := &Server{ subnetDetector: snd, } testCases := []struct { name string cliIP net.IP want bool }{{ name: "local", cliIP: net.IP{192, 168, 0, 1}, want: true, }, { name: "external", cliIP: net.IP{250, 249, 0, 1}, want: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { proxyCtx := &proxy.DNSContext{ Addr: &net.TCPAddr{ IP: tc.cliIP, }, } dctx := &dnsContext{ proxyCtx: proxyCtx, } s.processDetermineLocal(dctx) assert.Equal(t, tc.want, dctx.isLocalClient) }) } } func TestServer_ProcessInternalHosts_localRestriction(t *testing.T) {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
pctx := dctx.proxyCtx
<mask> } <mask> <mask> res := s.processInternalHosts(dctx) <mask> assert.Equal(t, tc.wantRes, res) <mask> if tc.wantRes == resultCodeFinish { <mask> require.NotNil(t, pctx.Res) <mask> assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove if tc.wantErrMsg == "" { assert.NoError(t, dctx.err) } else { require.Error(t, dctx.err) assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) </s> add return </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, </s> remove pctx := dctx.proxyCtx </s> add require.NoError(t, dctx.err)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode)
<mask> res := s.processInternalHosts(dctx) <mask> pctx := dctx.proxyCtx <mask> assert.Equal(t, tc.wantRes, res) <mask> <mask> return <mask> } <mask> <mask> require.NoError(t, dctx.err) </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove if tc.wantErrMsg == "" { assert.NoError(t, dctx.err) } else { require.Error(t, dctx.err) assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) </s> add return </s> remove pctx := dctx.proxyCtx </s> add require.NoError(t, dctx.err) </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
return
<mask> <mask> res := s.processInternalHosts(dctx) <mask> assert.Equal(t, tc.wantRes, res) <mask> <mask> if tc.wantErrMsg == "" { <mask> assert.NoError(t, dctx.err) <mask> } else { <mask> require.Error(t, dctx.err) <mask> <mask> assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) <mask> } <mask> <mask> pctx := dctx.proxyCtx <mask> if tc.qtyp == dns.TypeAAAA { <mask> // TODO(a.garipov): Remove this special handling </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove pctx := dctx.proxyCtx </s> add require.NoError(t, dctx.err) </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, </s> remove // TODO(e.burkov): Restrict the access for external clients. </s> add d := dctx.proxyCtx if !dctx.isLocalClient { log.Debug("dns: %q requests for internal host", d.Addr) d.Res = s.genNXDomain(req) // Do not even put into query log. return resultCodeFinish }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
require.NoError(t, dctx.err)
<mask> <mask> assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) <mask> } <mask> <mask> pctx := dctx.proxyCtx <mask> if tc.qtyp == dns.TypeAAAA { <mask> // TODO(a.garipov): Remove this special handling <mask> // when we fully support AAAA. <mask> require.NotNil(t, pctx.Res) <mask> </s> Pull request: 2889 internal hosts restriction Merge in DNS/adguard-home from 2889-imp-autohosts to master Closes #2889. Squashed commit of the following: commit 1d3b649364f991c092851c02d99827769cce8b70 Merge: abc6e1c8 1a214eaa Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:59:51 2021 +0300 Merge branch 'master' into 2889-imp-autohosts commit abc6e1c8830e41a774c6d239ddd7b722b29df93e Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:34:56 2021 +0300 dnsforward: imp code commit 4b2b9140d3e2526a935216ba42faba9b86b9ef3f Author: Eugene Burkov <[email protected]> Date: Thu Apr 8 17:31:34 2021 +0300 dnsforward: respond with nxdomain commit 814667417a1b02c152a034852858b96412874f85 Author: Eugene Burkov <[email protected]> Date: Tue Apr 6 19:16:14 2021 +0300 dnsforward: restrict the access to intl hosts for ext clients </s> remove if tc.wantErrMsg == "" { assert.NoError(t, dctx.err) } else { require.Error(t, dctx.err) assert.Equal(t, tc.wantErrMsg, dctx.err.Error()) </s> add return </s> remove return resultCodeSuccess </s> add // TODO(e.burkov): Inspect special cases when user want to apply // some rules handled by other processors to the hosts with TLD. d.Res = s.genNXDomain(req) return resultCodeFinish </s> remove qtyp: dns.TypeAAAA, wantRes: resultCodeSuccess, </s> add wantRes: resultCodeFinish, isLocalCli: false, }, { name: "external_client_unknown_host", host: "wronghost.lan", wantIP: nil, wantRes: resultCodeFinish, isLocalCli: false, }} for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { s := &Server{ autohostSuffix: defaultAutohostSuffix, tableHostToIP: map[string]net.IP{ "example": knownIP, }, } req := &dns.Msg{ MsgHdr: dns.MsgHdr{ Id: dns.Id(), }, Question: []dns.Question{{ Name: dns.Fqdn(tc.host), Qtype: dns.TypeA, Qclass: dns.ClassINET, }}, } dctx := &dnsContext{ proxyCtx: &proxy.DNSContext{ Req: req, }, isLocalClient: tc.isLocalCli, } res := s.processInternalHosts(dctx) require.Equal(t, tc.wantRes, res) pctx := dctx.proxyCtx if tc.wantRes == resultCodeFinish { require.NotNil(t, pctx.Res) assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) assert.Len(t, pctx.Res.Answer, 0) return } if tc.wantIP == nil { assert.Nil(t, pctx.Res) } else { require.NotNil(t, pctx.Res) ans := pctx.Res.Answer require.Len(t, ans, 1) assert.Equal(t, tc.wantIP, ans[0].(*dns.A).A) } }) } } func TestServer_ProcessInternalHosts(t *testing.T) { const ( examplecom = "example.com" examplelan = "example.lan" ) knownIP := net.IP{1, 2, 3, 4} testCases := []struct { name string host string suffix string wantIP net.IP wantRes resultCode qtyp uint16 }{{ name: "success_external", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_external_non_a", host: examplecom, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeCNAME, }, { name: "success_internal", host: examplelan, suffix: defaultAutohostSuffix, wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA, }, { name: "success_internal_unknown", host: "example-new.lan", suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeFinish, qtyp: dns.TypeA, }, { name: "success_internal_aaaa", host: examplelan, suffix: defaultAutohostSuffix, wantIP: nil, wantRes: resultCodeSuccess, qtyp: dns.TypeAAAA, }, { name: "success_custom_suffix", host: "example.custom", suffix: ".custom.", wantIP: knownIP, wantRes: resultCodeSuccess, qtyp: dns.TypeA,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
internal/dnsforward/dns_test.go
<mask> <mask> // use same update period for failed filter downloads to avoid flooding with requests <mask> filter.LastUpdated = now <mask> <mask> log.Printf("Fetching URL %s...", filter.URL) <mask> resp, err := client.Get(filter.URL) <mask> if resp != nil && resp.Body != nil { <mask> defer resp.Body.Close() <mask> } <mask> if err != nil { </s> Be less noisy during long periods of time </s> remove log.Printf("Setting filter title to %s\n", m[0][1]) </s> add </s> remove log.Printf("Filter contents of URL %s are same, not considering it as an update", filter.URL) </s> add </s> remove log.Printf("%s: got %v bytes", filter.URL, len(body)) </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
control.go
<mask> log.Printf("Couldn't fetch filter contents from URL %s, skipping: %s", filter.URL, err) <mask> return false, err <mask> } <mask> <mask> log.Printf("%s: got %v bytes", filter.URL, len(body)) <mask> <mask> // extract filter name and count number of rules <mask> lines := strings.Split(string(body), "\n") <mask> rulesCount := 0 <mask> seenTitle := false <mask> d := dnsfilter.New() </s> Be less noisy during long periods of time </s> remove log.Printf("Setting filter title to %s\n", m[0][1]) </s> add </s> remove log.Printf("Fetching URL %s...", filter.URL) </s> add </s> remove log.Printf("Filter contents of URL %s are same, not considering it as an update", filter.URL) </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
control.go
<mask> for _, line := range lines { <mask> line = strings.TrimSpace(line) <mask> if len(line) > 0 && line[0] == '!' { <mask> if m := filterTitle.FindAllStringSubmatch(line, -1); len(m) > 0 && len(m[0]) >= 2 && !seenTitle { <mask> log.Printf("Setting filter title to %s\n", m[0][1]) <mask> filter.Name = m[0][1] <mask> seenTitle = true <mask> } <mask> } else if len(line) != 0 { <mask> err = d.AddRule(line, 0) </s> Be less noisy during long periods of time </s> remove log.Printf("Fetching URL %s...", filter.URL) </s> add </s> remove log.Printf("Filter contents of URL %s are same, not considering it as an update", filter.URL) </s> add </s> remove log.Printf("%s: got %v bytes", filter.URL, len(body)) </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
control.go
<mask> rulesCount++ <mask> } <mask> } <mask> if bytes.Equal(filter.contents, body) { <mask> log.Printf("Filter contents of URL %s are same, not considering it as an update", filter.URL) <mask> return false, nil <mask> } <mask> filter.RulesCount = rulesCount <mask> filter.contents = body <mask> return true, nil </s> Be less noisy during long periods of time </s> remove log.Printf("Fetching URL %s...", filter.URL) </s> add </s> remove log.Printf("%s: got %v bytes", filter.URL, len(body)) </s> add </s> remove log.Printf("Setting filter title to %s\n", m[0][1]) </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
control.go
log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount)
<mask> if bytes.Equal(filter.contents, body) { <mask> return false, nil <mask> } <mask> filter.RulesCount = rulesCount <mask> filter.contents = body <mask> return true, nil <mask> } <mask> <mask> // write filter file </s> Be less noisy during long periods of time </s> remove log.Printf("Filter contents of URL %s are same, not considering it as an update", filter.URL) </s> add </s> remove log.Printf("Fetching URL %s...", filter.URL) </s> add </s> remove log.Printf("Setting filter title to %s\n", m[0][1]) </s> add </s> remove log.Printf("%s: got %v bytes", filter.URL, len(body)) </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
control.go
<mask> return <mask> } <mask> } <mask> } <mask> <mask> // Get value from "key":"value" <mask> func readJSONValue(s, name string) string { <mask> i := strings.Index(s, "\""+name+"\":\"") <mask> if i == -1 { <mask> return "" <mask> } <mask> start := i + 1 + len(name) + 3 <mask> i = strings.IndexByte(s[start:], '"') <mask> if i == -1 { <mask> return "" <mask> } <mask> end := start + i <mask> return s[start:end] <mask> } </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove val := readJSONValue(string(buf), "T") </s> add val := readJSONValue(string(buf), `"T":"`) </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/decode.go
// parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) {
<mask> } <mask> return false <mask> } <mask> <mask> // parseSearchCriteria - parses "searchCriteria" from the specified query parameter <mask> func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { <mask> val := q.Get(name) <mask> if len(val) == 0 { <mask> return false, searchCriteria{}, nil <mask> } <mask> </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/http.go
return false, searchCriterion{}, nil
<mask> // parseSearchCriteria - parses "searchCriteria" from the specified query parameter <mask> func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { <mask> val := q.Get(name) <mask> if len(val) == 0 { <mask> return false, searchCriteria{}, nil <mask> } <mask> <mask> c := searchCriteria{ <mask> criteriaType: ct, <mask> value: val, </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val, </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove // Get value from "key":"value" func readJSONValue(s, name string) string { i := strings.Index(s, "\""+name+"\":\"") if i == -1 { return "" } start := i + 1 + len(name) + 3 i = strings.IndexByte(s[start:], '"') if i == -1 { return "" } end := start + i return s[start:end] } </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/http.go
c := searchCriterion{ criterionType: ct, value: val,
<mask> if len(val) == 0 { <mask> return false, searchCriteria{}, nil <mask> } <mask> <mask> c := searchCriteria{ <mask> criteriaType: ct, <mask> value: val, <mask> } <mask> if getDoubleQuotesEnclosedValue(&c.value) { <mask> c.strict = true <mask> } <mask> </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove var c searchCriteria ok, c, err = l.parseSearchCriteria(q, k, v) </s> add var c searchCriterion ok, c, err = l.parseSearchCriterion(q, k, v)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/http.go
paramNames := map[string]criterionType{
<mask> // and scan all log records until we found enough log entries <mask> p.maxFileScanEntries = 0 <mask> } <mask> <mask> paramNames := map[string]criteriaType{ <mask> "search": ctDomainOrClient, <mask> "response_status": ctFilteringStatus, <mask> } <mask> <mask> for k, v := range paramNames { </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove var c searchCriteria ok, c, err = l.parseSearchCriteria(q, k, v) </s> add var c searchCriterion ok, c, err = l.parseSearchCriterion(q, k, v) </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove searchCriteria []searchCriteria </s> add searchCriteria []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/http.go
var c searchCriterion ok, c, err = l.parseSearchCriterion(q, k, v)
<mask> } <mask> <mask> for k, v := range paramNames { <mask> var ok bool <mask> var c searchCriteria <mask> ok, c, err = l.parseSearchCriteria(q, k, v) <mask> if err != nil { <mask> return nil, err <mask> } <mask> <mask> if ok { </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove paramNames := map[string]criteriaType{ </s> add paramNames := map[string]criterionType{ </s> remove val := readJSONValue(string(buf), "T") </s> add val := readJSONValue(string(buf), `"T":"`) </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/http.go
sCr []searchCriterion
<mask> } <mask> <mask> testCases := []struct { <mask> name string <mask> sCr []searchCriteria <mask> want []tcAssertion <mask> }{{ <mask> name: "all", <mask> sCr: []searchCriteria{}, <mask> want: []tcAssertion{ </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{}, </s> add sCr: []searchCriterion{}, </s> remove // Get value from "key":"value" func readJSONValue(s, name string) string { i := strings.Index(s, "\""+name+"\":\"") if i == -1 { return "" } start := i + 1 + len(name) + 3 i = strings.IndexByte(s[start:], '"') if i == -1 { return "" } end := start + i return s[start:end] } </s> add </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "example.ORG", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
sCr: []searchCriterion{},
<mask> sCr []searchCriteria <mask> want []tcAssertion <mask> }{{ <mask> name: "all", <mask> sCr: []searchCriteria{}, <mask> want: []tcAssertion{ <mask> {num: 0, host: "example.com", answer: net.IPv4(1, 1, 1, 4), client: net.IPv4(2, 2, 2, 4)}, <mask> {num: 1, host: "test.example.org", answer: net.IPv4(1, 1, 1, 3), client: net.IPv4(2, 2, 2, 3)}, <mask> {num: 2, host: "example.org", answer: net.IPv4(1, 1, 1, 2), client: net.IPv4(2, 2, 2, 2)}, <mask> {num: 3, host: "example.org", answer: net.IPv4(1, 1, 1, 1), client: net.IPv4(2, 2, 2, 1)}, </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "example.ORG", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> remove sCr []searchCriteria </s> add sCr []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org",
<mask> {num: 3, host: "example.org", answer: net.IPv4(1, 1, 1, 1), client: net.IPv4(2, 2, 2, 1)}, <mask> }, <mask> }, { <mask> name: "by_domain_strict", <mask> sCr: []searchCriteria{{ <mask> criteriaType: ctDomainOrClient, <mask> strict: true, <mask> value: "TEST.example.org", <mask> }}, <mask> want: []tcAssertion{{ <mask> num: 0, host: "test.example.org", answer: net.IPv4(1, 1, 1, 3), client: net.IPv4(2, 2, 2, 3), <mask> }}, <mask> }, { </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "example.ORG", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2", </s> remove sCr: []searchCriteria{}, </s> add sCr: []searchCriterion{}, </s> remove sCr []searchCriteria </s> add sCr []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG",
<mask> num: 0, host: "test.example.org", answer: net.IPv4(1, 1, 1, 3), client: net.IPv4(2, 2, 2, 3), <mask> }}, <mask> }, { <mask> name: "by_domain_non-strict", <mask> sCr: []searchCriteria{{ <mask> criteriaType: ctDomainOrClient, <mask> strict: false, <mask> value: "example.ORG", <mask> }}, <mask> want: []tcAssertion{ <mask> {num: 0, host: "test.example.org", answer: net.IPv4(1, 1, 1, 3), client: net.IPv4(2, 2, 2, 3)}, <mask> {num: 1, host: "example.org", answer: net.IPv4(1, 1, 1, 2), client: net.IPv4(2, 2, 2, 2)}, <mask> {num: 2, host: "example.org", answer: net.IPv4(1, 1, 1, 1), client: net.IPv4(2, 2, 2, 1)}, </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2", </s> remove sCr: []searchCriteria{}, </s> add sCr: []searchCriterion{}, </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> remove sCr []searchCriteria </s> add sCr []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "2.2.2.2",
<mask> {num: 2, host: "example.org", answer: net.IPv4(1, 1, 1, 1), client: net.IPv4(2, 2, 2, 1)}, <mask> }, <mask> }, { <mask> name: "by_client_ip_strict", <mask> sCr: []searchCriteria{{ <mask> criteriaType: ctDomainOrClient, <mask> strict: true, <mask> value: "2.2.2.2", <mask> }}, <mask> want: []tcAssertion{{ <mask> num: 0, host: "example.org", answer: net.IPv4(1, 1, 1, 2), client: net.IPv4(2, 2, 2, 2), <mask> }}, <mask> }, { </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "example.ORG", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2", </s> remove sCr: []searchCriteria{}, </s> add sCr: []searchCriterion{}, </s> remove sCr []searchCriteria </s> add sCr []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "2.2.2",
<mask> num: 0, host: "example.org", answer: net.IPv4(1, 1, 1, 2), client: net.IPv4(2, 2, 2, 2), <mask> }}, <mask> }, { <mask> name: "by_client_ip_non-strict", <mask> sCr: []searchCriteria{{ <mask> criteriaType: ctDomainOrClient, <mask> strict: false, <mask> value: "2.2.2", <mask> }}, <mask> want: []tcAssertion{ <mask> {num: 0, host: "example.com", answer: net.IPv4(1, 1, 1, 4), client: net.IPv4(2, 2, 2, 4)}, <mask> {num: 1, host: "test.example.org", answer: net.IPv4(1, 1, 1, 3), client: net.IPv4(2, 2, 2, 3)}, <mask> {num: 2, host: "example.org", answer: net.IPv4(1, 1, 1, 2), client: net.IPv4(2, 2, 2, 2)}, </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: false, value: "example.ORG", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: false, value: "example.ORG", </s> remove sCr: []searchCriteria{}, </s> add sCr: []searchCriterion{}, </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "2.2.2.2", </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> remove sCr []searchCriteria </s> add sCr []searchCriterion
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlog_test.go
"strings"
<mask> "fmt" <mask> "io" <mask> "os" <mask> "sync" <mask> "time" <mask> <mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr" <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove sCr: []searchCriteria{{ criteriaType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> add sCr: []searchCriterion{{ criterionType: ctDomainOrClient, strict: true, value: "TEST.example.org", </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlogfile.go
val := readJSONValue(str, `"T":"`)
<mask> } <mask> <mask> // readQLogTimestamp reads the timestamp field from the query log line <mask> func readQLogTimestamp(str string) int64 { <mask> val := readJSONValue(str, "T") <mask> if len(val) == 0 { <mask> val = readJSONValue(str, "Time") <mask> } <mask> <mask> if len(val) == 0 { </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`) </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlogfile.go
val = readJSONValue(str, `"Time":"`)
<mask> // readQLogTimestamp reads the timestamp field from the query log line <mask> func readQLogTimestamp(str string) int64 { <mask> val := readJSONValue(str, "T") <mask> if len(val) == 0 { <mask> val = readJSONValue(str, "Time") <mask> } <mask> <mask> if len(val) == 0 { <mask> log.Error("Couldn't find timestamp: %s", str) <mask> return 0 </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/qlogfile.go
val := readJSONValue(string(buf), `"T":"`)
<mask> return -1 <mask> } <mask> buf = buf[:r] <mask> <mask> val := readJSONValue(string(buf), "T") <mask> t, err := time.Parse(time.RFC3339Nano, val) <mask> if err != nil { <mask> return -1 <mask> } <mask> </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove var c searchCriteria ok, c, err = l.parseSearchCriteria(q, k, v) </s> add var c searchCriterion ok, c, err = l.parseSearchCriterion(q, k, v) </s> remove // Get value from "key":"value" func readJSONValue(s, name string) string { i := strings.Index(s, "\""+name+"\":\"") if i == -1 { return "" } start := i + 1 + len(name) + 3 i = strings.IndexByte(s[start:], '"') if i == -1 { return "" } end := start + i return s[start:end] } </s> add </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/querylogfile.go
clientFinder := quickMatchClientFinder{ client: l.client, cache: cache, } if !params.quickMatch(line, clientFinder.findClient) { ts = readQLogTimestamp(line) return nil, ts, nil }
<mask> } <mask> <mask> e = &logEntry{} <mask> decodeLogEntry(e, line) <mask> <mask> e.client, err = l.client(e.ClientID, e.IP.String(), cache) </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove var c searchCriteria ok, c, err = l.parseSearchCriteria(q, k, v) </s> add var c searchCriterion ok, c, err = l.parseSearchCriterion(q, k, v) </s> remove val := readJSONValue(string(buf), "T") </s> add val := readJSONValue(string(buf), `"T":"`) </s> remove // Get value from "key":"value" func readJSONValue(s, name string) string { i := strings.Index(s, "\""+name+"\":\"") if i == -1 { return "" } start := i + 1 + len(name) + 3 i = strings.IndexByte(s[start:], '"') if i == -1 { return "" } end := start + i return s[start:end] } </s> add </s> remove c := searchCriteria{ criteriaType: ct, value: val, </s> add c := searchCriterion{ criterionType: ct, value: val, </s> remove paramNames := map[string]criteriaType{ </s> add paramNames := map[string]criterionType{
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/search.go
searchCriteria []searchCriterion
<mask> <mask> // searchParams represent the search query sent by the client <mask> type searchParams struct { <mask> // searchCriteria - list of search criteria that we use to get filter results <mask> searchCriteria []searchCriteria <mask> <mask> // olderThen - return entries that are older than this value <mask> // if not set - disregard it and return any value <mask> olderThan time.Time <mask> </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove paramNames := map[string]criteriaType{ </s> add paramNames := map[string]criterionType{ </s> remove // Get value from "key":"value" func readJSONValue(s, name string) string { i := strings.Index(s, "\""+name+"\":\"") if i == -1 { return "" } start := i + 1 + len(name) + 3 i = strings.IndexByte(s[start:], '"') if i == -1 { return "" } end := start + i return s[start:end] } </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/searchparams.go
// quickMatchClientFunc is a simplified client finder for quick matches. type quickMatchClientFunc = func(clientID, ip string) (c *Client) // quickMatch quickly checks if the line matches the given search parameters. // It returns false if the line doesn't match. This method is only here for // optimisation purposes. func (s *searchParams) quickMatch(line string, findClient quickMatchClientFunc) (ok bool) { for _, c := range s.searchCriteria { if !c.quickMatch(line, findClient) { return false } } return true }
<mask> } <mask> <mask> // match - checks if the logEntry matches the searchParams <mask> func (s *searchParams) match(entry *logEntry) bool { <mask> if !s.olderThan.IsZero() && entry.Time.UnixNano() >= s.olderThan.UnixNano() { <mask> // Ignore entries newer than what was requested <mask> return false <mask> } </s> Pull request: querylog: more opt Updates 1273. Squashed commit of the following: commit 167c0b5acaab8a2676de2cea556c861dc0efbc72 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 18:12:43 2021 +0300 querylog: imp naming commit 5010ad113e46335011a721cbcc9fc9b1fc623722 Author: Ainar Garipov <[email protected]> Date: Mon Apr 12 17:53:41 2021 +0300 querylog: more opt </s> remove searchCriteria []searchCriteria </s> add searchCriteria []searchCriterion </s> remove // parseSearchCriteria - parses "searchCriteria" from the specified query parameter func (l *queryLog) parseSearchCriteria(q url.Values, name string, ct criteriaType) (bool, searchCriteria, error) { </s> add // parseSearchCriterion parses a search criterion from the query parameter. func (l *queryLog) parseSearchCriterion(q url.Values, name string, ct criterionType) (bool, searchCriterion, error) { </s> remove val := readJSONValue(str, "T") </s> add val := readJSONValue(str, `"T":"`) </s> remove return false, searchCriteria{}, nil </s> add return false, searchCriterion{}, nil </s> remove val = readJSONValue(str, "Time") </s> add val = readJSONValue(str, `"Time":"`)
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
internal/querylog/searchparams.go
"fmt"
<mask> package aghtls <mask> <mask> import ( <mask> "crypto/tls" <mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> "golang.org/x/exp/slices" <mask> ) <mask> <mask> // SaferCipherSuites returns a set of default cipher suites with vulnerable and <mask> // weak cipher suites removed. <mask> func SaferCipherSuites() (safe []uint16) { </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) { </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove // getTLSCiphers check for overriden tls ciphers, if the slice is </s> add // getTLSCiphers check for overridden tls ciphers, if the slice is </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/aghtls/aghtls.go
func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID)
<mask> return safe <mask> } <mask> <mask> // ParseCipherIDs returns a set of cipher suites with the cipher names provided <mask> func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { <mask> for _, s := range tls.CipherSuites() { <mask> if slices.Contains(ciphers, s.Name) { <mask> userCiphers = append(userCiphers, s.ID) <mask> log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) <mask> } else { <mask> log.Error("unknown cipher : %s ", s) <mask> } <mask> } <mask> </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove "github.com/AdguardTeam/golibs/log" "golang.org/x/exp/slices" </s> add "fmt" </s> remove return userCiphers </s> add return false, 0 </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/aghtls/aghtls.go
return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID
<mask> if slices.Contains(ciphers, s.Name) { <mask> userCiphers = append(userCiphers, s.ID) <mask> log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) <mask> } else { <mask> log.Error("unknown cipher : %s ", s) <mask> } <mask> } <mask> <mask> return userCiphers <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove return userCiphers </s> add return false, 0 </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove return cipher </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/aghtls/aghtls.go
return false, 0
<mask> log.Error("unknown cipher : %s ", s) <mask> } <mask> } <mask> <mask> return userCiphers <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove return cipher </s> add </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/aghtls/aghtls.go
tlsCiphers, err := getTLSCiphers() if err != nil { return nil, err }
<mask> return nil, fmt.Errorf("getting embedded beta client subdir: %w", err) <mask> } <mask> } <mask> <mask> webConf := webConfig{ <mask> firstRun: Context.firstRun, <mask> BindHost: config.BindHost, <mask> BindPort: config.BindPort, </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove tlsCiphers: getTLSCiphers(), </s> add tlsCiphers: tlsCiphers, </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove return userCiphers </s> add return false, 0 </s> remove return cipher </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
tlsCiphers: tlsCiphers,
<mask> clientFS: clientFS, <mask> clientBetaFS: clientBetaFS, <mask> <mask> serveHTTP3: config.DNS.ServeHTTP3, <mask> tlsCiphers: getTLSCiphers(), <mask> } <mask> <mask> web = newWeb(&webConf) <mask> if web == nil { <mask> return nil, fmt.Errorf("initializing web: %w", err) </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
// getTLSCiphers check for overridden tls ciphers, if the slice is
<mask> // Message is the error message, an opaque string. <mask> Message string `json:"message"` <mask> } <mask> <mask> // getTLSCiphers check for overriden tls ciphers, if the slice is <mask> // empty, then default safe ciphers are used <mask> func getTLSCiphers() []uint16 { <mask> var cipher []uint16 <mask> <mask> if len(config.TLS.OverrideTLSCiphers) == 0 { </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) { </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
func getTLSCiphers() (cipherIds []uint16, err error) {
<mask> } <mask> <mask> // getTLSCiphers check for overriden tls ciphers, if the slice is <mask> // empty, then default safe ciphers are used <mask> func getTLSCiphers() []uint16 { <mask> var cipher []uint16 <mask> <mask> if len(config.TLS.OverrideTLSCiphers) == 0 { <mask> cipher = aghtls.SaferCipherSuites() <mask> } else { <mask> cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove // getTLSCiphers check for overriden tls ciphers, if the slice is </s> add // getTLSCiphers check for overridden tls ciphers, if the slice is </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID) </s> remove return cipher </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
return aghtls.SaferCipherSuites(), nil
<mask> func getTLSCiphers() []uint16 { <mask> var cipher []uint16 <mask> <mask> if len(config.TLS.OverrideTLSCiphers) == 0 { <mask> cipher = aghtls.SaferCipherSuites() <mask> } else { <mask> cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) <mask> } <mask> return cipher <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) { </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove return cipher </s> add </s> remove // getTLSCiphers check for overriden tls ciphers, if the slice is </s> add // getTLSCiphers check for overridden tls ciphers, if the slice is </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers)
<mask> <mask> if len(config.TLS.OverrideTLSCiphers) == 0 { <mask> cipher = aghtls.SaferCipherSuites() <mask> } else { <mask> cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) <mask> } <mask> return cipher <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove return cipher </s> add </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) { </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
<mask> cipher = aghtls.SaferCipherSuites() <mask> } else { <mask> cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) <mask> } <mask> return cipher <mask> } </s> changed based on review 1. exit AG is user defined cipher is invalid 2. updated changelog 3. golang naming tweaks </s> remove cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> add log.Info("Overriding TLS Ciphers : %s", config.TLS.OverrideTLSCiphers) return aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers) </s> remove cipher = aghtls.SaferCipherSuites() </s> add return aghtls.SaferCipherSuites(), nil </s> remove func getTLSCiphers() []uint16 { var cipher []uint16 </s> add func getTLSCiphers() (cipherIds []uint16, err error) { </s> remove log.Error("unknown cipher : %s ", s) </s> add return nil, fmt.Errorf("unknown cipher : %s ", cipher) } } return userCiphers, nil } // CipherExists returns cipherid if exists, else return false in boolean func CipherExists(cipher string) (exists bool, cipherID uint16) { for _, s := range tls.CipherSuites() { if s.Name == cipher { return true, s.ID </s> remove func ParseCipherIDs(ciphers []string) (userCiphers []uint16) { for _, s := range tls.CipherSuites() { if slices.Contains(ciphers, s.Name) { userCiphers = append(userCiphers, s.ID) log.Debug("user specified cipher : %s, ID : %d", s.Name, s.ID) </s> add func ParseCipherIDs(ciphers []string) (userCiphers []uint16, err error) { for _, cipher := range ciphers { exists, cipherID := CipherExists(cipher) if exists { userCiphers = append(userCiphers, cipherID)
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
internal/home/home.go
// TODO(e.burkov): Think about stroing the FQDN version of the server's // name somewhere. domainName := dns.Fqdn(s.conf.ServerName)
<mask> <mask> // makeDDRResponse creates DDR answer according to server configuration. <mask> func (s *Server) makeDDRResponse(req *dns.Msg) (resp *dns.Msg) { <mask> resp = s.makeResponse(req) <mask> domainName := s.conf.ServerName <mask> <mask> for _, addr := range s.dnsProxy.HTTPSListenAddr { <mask> values := []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"h2"}}, <mask> &dns.SVCBPort{Port: uint16(addr.Port)}, </s> Pull request: dnsforward: fix ddr target Updates #4463. Squashed commit of the following: commit 047155b585a1c762d709874f44abb2d8c5a9dbca Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:34:38 2022 +0300 dnsforward: imp code commit b0508ffec13ccf5fc5d3d2e37c9e1bd83c3c039e Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:27:02 2022 +0300 dnsforward: fix ddr target </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove const ddrTestDomainName = "dns.example.net" </s> add const ( ddrTestDomainName = "dns.example.net" ddrTestFQDN = ddrTestDomainName + "." ) </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
internal/dnsforward/dns.go
const ( ddrTestDomainName = "dns.example.net" ddrTestFQDN = ddrTestDomainName + "." )
<mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" <mask> ) <mask> <mask> const ddrTestDomainName = "dns.example.net" <mask> <mask> func TestServer_ProcessDDRQuery(t *testing.T) { <mask> dohSVCB := &dns.SVCB{ <mask> Priority: 1, <mask> Target: ddrTestDomainName, </s> Pull request: dnsforward: fix ddr target Updates #4463. Squashed commit of the following: commit 047155b585a1c762d709874f44abb2d8c5a9dbca Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:34:38 2022 +0300 dnsforward: imp code commit b0508ffec13ccf5fc5d3d2e37c9e1bd83c3c039e Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:27:02 2022 +0300 dnsforward: fix ddr target </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove domainName := s.conf.ServerName </s> add // TODO(e.burkov): Think about stroing the FQDN version of the server's // name somewhere. domainName := dns.Fqdn(s.conf.ServerName)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
internal/dnsforward/dns_test.go
Target: ddrTestFQDN,
<mask> <mask> func TestServer_ProcessDDRQuery(t *testing.T) { <mask> dohSVCB := &dns.SVCB{ <mask> Priority: 1, <mask> Target: ddrTestDomainName, <mask> Value: []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"h2"}}, <mask> &dns.SVCBPort{Port: 8044}, <mask> &dns.SVCBDoHPath{Template: "/dns-query?dns"}, <mask> }, </s> Pull request: dnsforward: fix ddr target Updates #4463. Squashed commit of the following: commit 047155b585a1c762d709874f44abb2d8c5a9dbca Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:34:38 2022 +0300 dnsforward: imp code commit b0508ffec13ccf5fc5d3d2e37c9e1bd83c3c039e Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:27:02 2022 +0300 dnsforward: fix ddr target </s> remove const ddrTestDomainName = "dns.example.net" </s> add const ( ddrTestDomainName = "dns.example.net" ddrTestFQDN = ddrTestDomainName + "." ) </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove domainName := s.conf.ServerName </s> add // TODO(e.burkov): Think about stroing the FQDN version of the server's // name somewhere. domainName := dns.Fqdn(s.conf.ServerName)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
internal/dnsforward/dns_test.go
Target: ddrTestFQDN,
<mask> } <mask> <mask> dotSVCB := &dns.SVCB{ <mask> Priority: 2, <mask> Target: ddrTestDomainName, <mask> Value: []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"dot"}}, <mask> &dns.SVCBPort{Port: 8043}, <mask> }, <mask> } </s> Pull request: dnsforward: fix ddr target Updates #4463. Squashed commit of the following: commit 047155b585a1c762d709874f44abb2d8c5a9dbca Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:34:38 2022 +0300 dnsforward: imp code commit b0508ffec13ccf5fc5d3d2e37c9e1bd83c3c039e Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:27:02 2022 +0300 dnsforward: fix ddr target </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove const ddrTestDomainName = "dns.example.net" </s> add const ( ddrTestDomainName = "dns.example.net" ddrTestFQDN = ddrTestDomainName + "." ) </s> remove domainName := s.conf.ServerName </s> add // TODO(e.burkov): Think about stroing the FQDN version of the server's // name somewhere. domainName := dns.Fqdn(s.conf.ServerName)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
internal/dnsforward/dns_test.go
Target: ddrTestFQDN,
<mask> } <mask> <mask> doqSVCB := &dns.SVCB{ <mask> Priority: 3, <mask> Target: ddrTestDomainName, <mask> Value: []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"doq"}}, <mask> &dns.SVCBPort{Port: 8042}, <mask> }, <mask> } </s> Pull request: dnsforward: fix ddr target Updates #4463. Squashed commit of the following: commit 047155b585a1c762d709874f44abb2d8c5a9dbca Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:34:38 2022 +0300 dnsforward: imp code commit b0508ffec13ccf5fc5d3d2e37c9e1bd83c3c039e Author: Eugene Burkov <[email protected]> Date: Mon May 30 15:27:02 2022 +0300 dnsforward: fix ddr target </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove Target: ddrTestDomainName, </s> add Target: ddrTestFQDN, </s> remove const ddrTestDomainName = "dns.example.net" </s> add const ( ddrTestDomainName = "dns.example.net" ddrTestFQDN = ddrTestDomainName + "." ) </s> remove domainName := s.conf.ServerName </s> add // TODO(e.burkov): Think about stroing the FQDN version of the server's // name somewhere. domainName := dns.Fqdn(s.conf.ServerName)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
internal/dnsforward/dns_test.go
import { useSelector } from 'react-redux';
<mask> import React, { useState } from 'react'; <mask> import PropTypes from 'prop-types'; <mask> import { Trans, useTranslation } from 'react-i18next'; <mask> import i18next from 'i18next'; <mask> import Tabs from './Tabs'; <mask> import Icons from './Icons'; <mask> import { getPathWithQueryString } from '../../helpers/helpers'; <mask> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove <code key="1">text</code>, </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
import { getPathWithQueryString } from '../../helpers/helpers';
<mask> import { useSelector } from 'react-redux'; <mask> import Tabs from './Tabs'; <mask> import Icons from './Icons'; <mask> <mask> const MOBILE_CONFIG_LINKS = { <mask> DOT: '/apple/dot.mobileconfig', <mask> DOH: '/apple/doh.mobileconfig', <mask> }; </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}>
<mask> const MOBILE_CONFIG_LINKS = { <mask> DOT: '/apple/dot.mobileconfig', <mask> DOH: '/apple/doh.mobileconfig', <mask> }; <mask> <mask> const renderMobileconfigInfo = ({ label, components }) => <li key={label}> <mask> <Trans components={components}>{label}</Trans> <mask> <ul> <mask> <li> <mask> <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> <mask> </li> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOT, { host: server_name })} download>{i18next.t('download_mobileconfig_dot')}</a> </s> remove <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOH, { host: server_name })} download>{i18next.t('download_mobileconfig_doh')}</a>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
<a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOT, { host: server_name })} download>{i18next.t('download_mobileconfig_dot')}</a>
<mask> const renderMobileconfigInfo = ({ label, components }) => <li key={label}> <mask> <Trans components={components}>{label}</Trans> <mask> <ul> <mask> <li> <mask> <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> <mask> </li> <mask> <li> <mask> <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> <mask> </li> <mask> </ul> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOH, { host: server_name })} download>{i18next.t('download_mobileconfig_doh')}</a> </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
<a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOH, { host: server_name })} download>{i18next.t('download_mobileconfig_doh')}</a>
<mask> <li> <mask> <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> <mask> </li> <mask> <li> <mask> <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> <mask> </li> <mask> </ul> <mask> </li>; <mask> <mask> const renderLi = ({ label, components }) => <li key={label}> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOT, { host: server_name })} download>{i18next.t('download_mobileconfig_dot')}</a> </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [ </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
const getDnsPrivacyList = (server_name) => { const iosList = [
<mask> {label} <mask> </Trans> <mask> </li>; <mask> <mask> const dnsPrivacyList = [{ <mask> title: 'Android', <mask> list: [ <mask> { <mask> label: 'setup_dns_privacy_android_1', <mask> }, <mask> { <mask> label: 'setup_dns_privacy_android_2', <mask> components: [ <mask> { <mask> key: 0, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove label: 'setup_dns_privacy_android_2', </s> add label: 'setup_dns_privacy_ios_2', </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
label: 'setup_dns_privacy_ios_2',
<mask> { <mask> label: 'setup_dns_privacy_android_1', <mask> }, <mask> { <mask> label: 'setup_dns_privacy_android_2', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://adguard.com/adguard-android/overview.html', <mask> }, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove href: 'https://adguard.com/adguard-android/overview.html', </s> add href: 'https://adguard.com/adguard-ios/overview.html', </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [ </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove key: 2, href: 'https://dnscrypt.info/stamps', </s> add key: 0, href: 'https://adguard.com/adguard-android/overview.html', </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
href: 'https://adguard.com/adguard-ios/overview.html',
<mask> label: 'setup_dns_privacy_android_2', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://adguard.com/adguard-android/overview.html', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove label: 'setup_dns_privacy_android_2', </s> add label: 'setup_dns_privacy_ios_2', </s> remove key: 2, href: 'https://dnscrypt.info/stamps', </s> add key: 0, href: 'https://adguard.com/adguard-android/overview.html', </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
label: 'setup_dns_privacy_ios_1',
<mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_android_3', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://getintra.org/', <mask> }, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove href: 'https://getintra.org/', </s> add href: 'https://itunes.apple.com/app/id1452162351', </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
href: 'https://itunes.apple.com/app/id1452162351',
<mask> label: 'setup_dns_privacy_android_3', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://getintra.org/', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> ], </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove label: 'setup_dns_privacy_android_3', </s> add label: 'setup_dns_privacy_ios_1', </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
<mask> key: 0, <mask> href: 'https://getintra.org/', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> ], <mask> }, <mask> { <mask> title: 'iOS', <mask> list: [ <mask> { <mask> label: 'setup_dns_privacy_ios_2', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://adguard.com/adguard-ios/overview.html', <mask> }, <mask> <code key="1">text</code>, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps', </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove label: 'setup_dns_privacy_android_3', </s> add label: 'setup_dns_privacy_ios_1',
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
key: 2, href: 'https://dnscrypt.info/stamps',
<mask> { <mask> label: 'setup_dns_privacy_ios_2', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://adguard.com/adguard-ios/overview.html', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove label: 'setup_dns_privacy_android_2', </s> add label: 'setup_dns_privacy_ios_2', </s> remove <code key="1">text</code>, </s> add </s> remove href: 'https://adguard.com/adguard-android/overview.html', </s> add href: 'https://adguard.com/adguard-ios/overview.html', </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', },
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
<mask> { <mask> key: 0, <mask> href: 'https://adguard.com/adguard-ios/overview.html', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_4', <mask> components: { </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove }, { </s> add }]; /* Insert second element if can generate .mobileconfig links */ if (server_name) { iosList.splice(1, 0, { </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps', </s> remove href: 'https://adguard.com/adguard-android/overview.html', </s> add href: 'https://adguard.com/adguard-ios/overview.html', </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', },
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
}]; /* Insert second element if can generate .mobileconfig links */ if (server_name) { iosList.splice(1, 0, {
<mask> href: 'https://adguard.com/adguard-ios/overview.html', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_4', <mask> components: { <mask> highlight: <code />, <mask> }, <mask> renderComponent: renderMobileconfigInfo, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove <code key="1">text</code>, </s> add </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove href: 'https://adguard.com/adguard-android/overview.html', </s> add href: 'https://adguard.com/adguard-ios/overview.html', </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps',
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [
<mask> label: 'setup_dns_privacy_4', <mask> components: { <mask> highlight: <code />, <mask> }, <mask> renderComponent: renderMobileconfigInfo, <mask> }, <mask> { <mask> label: 'setup_dns_privacy_ios_1', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://itunes.apple.com/app/id1452162351', <mask> }, <mask> <code key="1">text</code>, <mask> { <mask> key: 2, <mask> href: 'https://dnscrypt.info/stamps', <mask> }, <mask> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove }, { </s> add }]; /* Insert second element if can generate .mobileconfig links */ if (server_name) { iosList.splice(1, 0, { </s> remove key: 2, href: 'https://dnscrypt.info/stamps', </s> add key: 0, href: 'https://adguard.com/adguard-android/overview.html', </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps', </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove label: 'setup_dns_privacy_android_3', </s> add label: 'setup_dns_privacy_ios_1',
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
key: 0, href: 'https://adguard.com/adguard-android/overview.html',
<mask> href: 'https://itunes.apple.com/app/id1452162351', <mask> }, <mask> <code key="1">text</code>, <mask> { <mask> key: 2, <mask> href: 'https://dnscrypt.info/stamps', <mask> }, <mask> <mask> ], <mask> }, <mask> ], </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps', </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove href: 'https://getintra.org/', </s> add href: 'https://itunes.apple.com/app/id1452162351', </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; };
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
<mask> { <mask> key: 2, <mask> href: 'https://dnscrypt.info/stamps', <mask> }, <mask> <mask> ], <mask> }, <mask> ], <mask> }, <mask> { <mask> title: 'setup_dns_privacy_other_title', <mask> list: [ <mask> { <mask> label: 'setup_dns_privacy_other_1', <mask> }, <mask> { <mask> label: 'setup_dns_privacy_other_2', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://github.com/AdguardTeam/dnsproxy', <mask> }, <mask> ], <mask> }, <mask> { <mask> href: 'https://github.com/jedisct1/dnscrypt-proxy', <mask> label: 'setup_dns_privacy_other_3', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://github.com/jedisct1/dnscrypt-proxy', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_other_4', </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove key: 0, href: 'https://adguard.com/adguard-ios/overview.html', </s> add key: 2, href: 'https://dnscrypt.info/stamps', </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [
[ "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", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', },
<mask> key: 0, <mask> href: 'https://github.com/jedisct1/dnscrypt-proxy', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_other_4', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://support.mozilla.org/kb/firefox-dns-over-https', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_other_5', </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove <code key="1">text</code>, </s> add </s> remove href: 'https://adguard.com/adguard-android/overview.html', </s> add href: 'https://adguard.com/adguard-ios/overview.html',
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; };
<mask> key: 0, <mask> href: 'https://support.mozilla.org/kb/firefox-dns-over-https', <mask> }, <mask> <code key="1">text</code>, <mask> ], <mask> }, <mask> { <mask> label: 'setup_dns_privacy_other_5', <mask> components: [ <mask> { <mask> key: 0, <mask> href: 'https://dnscrypt.info/implementations', <mask> }, <mask> { <mask> key: 1, <mask> href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', <mask> }, <mask> ], <mask> }, <mask> ], <mask> }, <mask> ]; <mask> <mask> const renderDnsPrivacyList = ({ title, list }) => <div className="tab__paragraph" key={title}> <mask> <strong><Trans>{title}</Trans></strong> <mask> <ul>{list.map( <mask> ({ </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove ], }, ], }, { title: 'iOS', list: [ { label: 'setup_dns_privacy_ios_2', components: [ </s> add </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove <code key="1">text</code>, </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
server_name,
<mask> httpsAddress, <mask> showDnsPrivacyNotice, <mask> t, <mask> }) => ({ <mask> Router: { <mask> // eslint-disable-next-line react/display-name <mask> getTitle: () => <p> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOH, { host: server_name })} download>{i18next.t('download_mobileconfig_doh')}</a> </s> remove <a href={MOBILE_CONFIG_LINKS.DOT} download>{i18next.t('download_mobileconfig_dot')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOT, { host: server_name })} download>{i18next.t('download_mobileconfig_dot')}</a>
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
{getDnsPrivacyList(server_name).map(renderDnsPrivacyList)}
<mask> <Trans components={[<p key="0">text</p>]}> <mask> setup_dns_privacy_3 <mask> </Trans> <mask> </div> <mask> {dnsPrivacyList.map(renderDnsPrivacyList)} <mask> </>} <mask> </div> <mask> </div>; <mask> }, <mask> }, </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [ </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add </s> remove ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, </s> add ], }, { label: 'setup_dns_privacy_android_3', components: [ { key: 0, href: 'https://getintra.org/', }, </s> remove key: 2, href: 'https://dnscrypt.info/stamps', </s> add key: 0, href: 'https://adguard.com/adguard-android/overview.html',
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
const server_name = useSelector((state) => state.encryption.server_name);
<mask> </div>; <mask> <mask> const Guide = ({ dnsAddresses }) => { <mask> const { t } = useTranslation(); <mask> const tlsAddress = dnsAddresses?.filter((item) => item.includes('tls://')) ?? ''; <mask> const httpsAddress = dnsAddresses?.filter((item) => item.includes('https://')) ?? ''; <mask> const showDnsPrivacyNotice = httpsAddress.length < 1 && tlsAddress.length < 1; <mask> <mask> const [activeTabLabel, setActiveTabLabel] = useState('Router'); <mask> </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [ </s> remove <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a> </s> add <a href={getPathWithQueryString(MOBILE_CONFIG_LINKS.DOH, { host: server_name })} download>{i18next.t('download_mobileconfig_doh')}</a>
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
server_name,
<mask> tlsAddress, <mask> httpsAddress, <mask> showDnsPrivacyNotice, <mask> t, <mask> }); <mask> <mask> const activeTab = renderContent(tabs[activeTabLabel]); <mask> <mask> return ( </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove const dnsPrivacyList = [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, </s> add const getDnsPrivacyList = (server_name) => { const iosList = [
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/components/ui/Guide.js
/* TODO: handle property delete on api refactor */ server_name: payload.server_name || '',
<mask> ...state, <mask> ...payload, <mask> processing: false, <mask> }; <mask> return newState; <mask> }, <mask> <mask> [actions.setTlsConfigRequest]: (state) => ({ ...state, processingConfig: true }), </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; };
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/reducers/encryption.js
server_name: payload.server_name || '',
<mask> const newState = { <mask> ...state, <mask> ...payload, <mask> processingConfig: false, <mask> }; <mask> return newState; <mask> }, <mask> <mask> [actions.validateTlsConfigRequest]: (state) => ({ ...state, processingValidate: true }), </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove const renderMobileconfigInfo = ({ label, components }) => <li key={label}> </s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}>
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/reducers/encryption.js
server_name: payload.server_name || '',
<mask> warning_validation, <mask> dns_names, <mask> processingValidate: false, <mask> }; <mask> return newState; <mask> }, <mask> }, { </s> Pull request: + client: 2358 Make the mobileconfig API parameterized and more robust Merge in DNS/adguard-home from feature/2358 to master Updates #2358. Squashed commit of the following: commit b2b91ee3b7303d20b94265d43d785e77260b2210 Author: Artem Baskal <[email protected]> Date: Tue Dec 1 14:54:35 2020 +0300 + client: 2358 Make the mobileconfig API parameterized and more robust </s> remove renderComponent: renderMobileconfigInfo, }, { label: 'setup_dns_privacy_ios_1', components: [ { key: 0, href: 'https://itunes.apple.com/app/id1452162351', }, <code key="1">text</code>, </s> add renderComponent: ({ label, components }) => renderMobileconfigInfo({ label, components, server_name, }), }); } return [{ title: 'Android', list: [ { label: 'setup_dns_privacy_android_1', }, { label: 'setup_dns_privacy_android_2', components: [ </s> remove ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; </s> add ], }, ], }, { title: 'iOS', list: iosList, }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_4', components: [ { key: 0, href: 'https://support.mozilla.org/kb/firefox-dns-over-https', }, <code key="1">text</code>, ], }, { label: 'setup_dns_privacy_other_5', components: [ { key: 0, href: 'https://dnscrypt.info/implementations', }, { key: 1, href: 'https://dnsprivacy.org/wiki/display/DP/DNS+Privacy+Clients', }, ], }, ], }, ]; }; </s> remove ], }, ], }, { title: 'setup_dns_privacy_other_title', list: [ { label: 'setup_dns_privacy_other_1', }, { label: 'setup_dns_privacy_other_2', components: [ { key: 0, href: 'https://github.com/AdguardTeam/dnsproxy', }, ], }, { href: 'https://github.com/jedisct1/dnscrypt-proxy', label: 'setup_dns_privacy_other_3', components: [ { key: 0, href: 'https://github.com/jedisct1/dnscrypt-proxy', }, </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
client/src/reducers/encryption.js
<mask> import { Trans, useTranslation } from 'react-i18next'; <mask> import round from 'lodash/round'; <mask> import { shallowEqual, useSelector } from 'react-redux'; <mask> import Card from '../ui/Card'; <mask> import IconTooltip from '../ui/IconTooltip'; <mask> import { formatNumber } from '../../helpers/helpers'; <mask> import LogsSearchLink from '../ui/LogsSearchLink'; <mask> import { RESPONSE_FILTER } from '../../helpers/constants'; <mask> <mask> const Row = ({ </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/Counters.js
import Tooltip from '../ui/Tooltip';
<mask> import Card from '../ui/Card'; <mask> import { formatNumber } from '../../helpers/helpers'; <mask> import LogsSearchLink from '../ui/LogsSearchLink'; <mask> import { RESPONSE_FILTER } from '../../helpers/constants'; <mask> <mask> const Row = ({ <mask> label, count, response_status, tooltipTitle, translationComponents, <mask> }) => { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add </s> remove import { getTrackerData } from '../../helpers/trackers/trackers'; import Popover from '../ui/Popover'; </s> add import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }]; </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/Counters.js
<Tooltip content={tooltipTitle} placement="top" className="tooltip-container tooltip-custom--narrow text-center"> <svg className="icons icon--20 icon--lightgray ml-1"> <use xlinkHref="#question" /> </svg> </Tooltip>
<mask> <mask> return <tr key={label}> <mask> <td> <mask> <Trans components={translationComponents}>{label}</Trans> <mask> <IconTooltip text={tooltipTitle} type="tooltip-custom--narrow" /> <mask> </td> <mask> <td className="text-right"><strong>{content}</strong></td> <mask> </tr>; <mask> }; <mask> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {getHintElement({ </s> add {getIconTooltip({ </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/Counters.js
import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }];
<mask> import React from 'react'; <mask> import PropTypes from 'prop-types'; <mask> <mask> import { getTrackerData } from '../../helpers/trackers/trackers'; <mask> import Popover from '../ui/Popover'; <mask> <mask> const DomainCell = ({ value }) => { <mask> const trackerData = getTrackerData(value); <mask> <mask> return ( </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add
[ "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/DomainCell.js
const content = trackerData && <div className="popover__list"> <div className="tooltip-custom__content-title mb-1"> <Trans>found_in_known_domain_db</Trans> </div> {getTrackerInfo(trackerData) .map(({ key, value, render }) => <div key={key} className="tooltip-custom__content-item" > <Trans>{key}</Trans>: {render(value)} </div>)} </div>;
<mask> <mask> const DomainCell = ({ value }) => { <mask> const trackerData = getTrackerData(value); <mask> <mask> return ( <mask> <div className="logs__row"> <mask> <div className="logs__text" title={value}> <mask> {value} <mask> </div> <mask> {trackerData </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>} </s> remove import { getTrackerData } from '../../helpers/trackers/trackers'; import Popover from '../ui/Popover'; </s> add import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }]; </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray"> </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/DomainCell.js
{trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>}
<mask> <div className="logs__row"> <mask> <div className="logs__text" title={value}> <mask> {value} <mask> </div> <mask> {trackerData && <Popover data={trackerData} />} <mask> </div> <mask> ); <mask> }; <mask> <mask> DomainCell.propTypes = { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray"> </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24"> </s> remove <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}> </s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> remove <IconTooltip text={tooltip} type='tooltip-custom--logs' /> </s> add <Tooltip content={tooltip} className="tooltip-container"> <svg className="icons icon--20 icon--gray"> <use xlinkHref="#question" /> </svg> </Tooltip>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/DomainCell.js
renderLink.propTypes = { url: PropTypes.string.isRequired, name: PropTypes.string.isRequired, };
<mask> value: PropTypes.string.isRequired, <mask> }; <mask> <mask> export default DomainCell; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import { getTrackerData } from '../../helpers/trackers/trackers'; import Popover from '../ui/Popover'; </s> add import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }]; </s> remove {getHintElement({ </s> add {getIconTooltip({ </s> remove <IconTooltip text={tooltipTitle} type="tooltip-custom--narrow" /> </s> add <Tooltip content={tooltipTitle} placement="top" className="tooltip-container tooltip-custom--narrow text-center"> <svg className="icons icon--20 icon--lightgray ml-1"> <use xlinkHref="#question" /> </svg> </Tooltip> </s> remove {trackerData && <Popover data={trackerData} />} </s> add {trackerData && <Tooltip content={content} placement="top" className="tooltip-container tooltip-custom--wide"> <svg className="icons icon--24 icon--green ml-1"> <use xlinkHref="#privacy" /> </svg> </Tooltip>} </s> remove <svg className="icon icon--small"> </s> add <svg className="icon icon--24">
[ "keep", "keep", "add", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Dashboard/DomainCell.js
<svg className="icons icon--24 icon--gray">
<mask> showPagination <mask> defaultPageSize={10} <mask> minRows={5} <mask> previousText={ <mask> <svg className="icons icon--small icon--gray"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray"> <mask> <use xlinkHref="#arrow-right" /> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Filters/Rewrites/Table.js
<svg className="icons icon--24 icon--gray">
<mask> <svg className="icons icon--small icon--gray"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray"> <mask> <use xlinkHref="#arrow-right" /> <mask> </svg>} <mask> loadingText={t('loading_table_status')} <mask> pageText='' <mask> ofText='' </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray"> </s> add <svg className="icons icon--24 icon--gray"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Filters/Rewrites/Table.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> loadingText={t('loading_table_status')} <mask> noDataText={whitelist ? t('no_whitelist_added') : t('no_blocklist_added')} <mask> getPaginationProps={() => ({ className: 'custom-pagination' })} <mask> previousText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100 cursor--pointer">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Filters/Table.js
<svg className="icons icon--24 icon--gray w-100 h-100">
<mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-left" /> <mask> </svg>} <mask> nextText={ <mask> <svg className="icons icon--small icon--gray w-100 h-100"> <mask> <use xlinkHref="#arrow-right" /> <mask> </svg>} <mask> /> <mask> ); <mask> } </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100"> </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Filters/Table.js
border-color: var(--green-74); color: var(--green-74);
<mask> .nav-tabs .nav-link.active { <mask> border-color: #66b574; <mask> color: #66b574; <mask> background: transparent; <mask> } <mask> <mask> .nav-tabs .nav-link.active:hover { <mask> border-color: #58a273; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove stroke: #66b574; </s> add stroke: var(--green-74); </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove background-color: #66b574; </s> add background-color: var(--green-74);
[ "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Header/Header.css
stroke: var(--green-74);
<mask> } <mask> <mask> .nav-tabs .nav-link.active .nav-icon, <mask> .nav-tabs .nav-item.show .nav-icon { <mask> stroke: #66b574; <mask> } <mask> <mask> .nav-tabs .nav-link.active:hover .nav-icon, <mask> .nav-tabs .nav-item.show:hover .nav-icon { <mask> stroke: #58a273; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8); </s> remove background-color: #66b574; </s> add background-color: var(--green-74);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Header/Header.css
color: var(--green-74);
<mask> height: 24px; <mask> } <mask> <mask> .nav-tabs .nav-item.show .nav-link { <mask> color: #66b574; <mask> background-color: #fff; <mask> border-bottom-color: #66b574; <mask> } <mask> <mask> .header__right { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove border-bottom-color: #66b574; </s> add border-bottom-color: var(--green-74); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove stroke: #66b574; </s> add stroke: var(--green-74); </s> remove background-color: #66b574; </s> add background-color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Header/Header.css
border-bottom-color: var(--green-74);
<mask> <mask> .nav-tabs .nav-item.show .nav-link { <mask> color: #66b574; <mask> background-color: #fff; <mask> border-bottom-color: #66b574; <mask> } <mask> <mask> .header__right { <mask> display: flex; <mask> align-items: center; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove color: #66b574; </s> add color: var(--green-74); </s> remove border-color: #66b574; color: #66b574; </s> add border-color: var(--green-74); color: var(--green-74); </s> remove stroke: #66b574; </s> add stroke: var(--green-74); </s> remove background-color: #66b574; </s> add background-color: var(--green-74); </s> remove .icon--active { color: #66b574; </s> add .icon--lightgray { color: var(--gray-8);
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Header/Header.css
import getIconTooltip from './getIconTooltip';
<mask> import { nanoid } from 'nanoid'; <mask> import classNames from 'classnames'; <mask> import PropTypes from 'prop-types'; <mask> import { formatClientCell } from '../../../helpers/formatClientCell'; <mask> import getHintElement from './getHintElement'; <mask> import { checkFiltered } from '../../../helpers/helpers'; <mask> import { BLOCK_ACTIONS } from '../../../helpers/constants'; <mask> <mask> const getClientCell = ({ <mask> row, t, isDetailed, toggleBlocking, autoClients, processingRules, </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getClientCell.js
const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', {
<mask> 'mt-2': isDetailed && !name && !whois_info, <mask> 'white-space--nowrap': isDetailed, <mask> }); <mask> <mask> const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const renderBlockingButton = (isFiltered, domain) => { <mask> const buttonType = isFiltered ? BLOCK_ACTIONS.UNBLOCK : BLOCK_ACTIONS.BLOCK; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove const privacyIconClass = classNames('icons mx-2 icon--small d-none d-sm-block cursor--pointer', { 'icon--active': hasTracker, </s> add const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', { 'icon--green': hasTracker, </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove const lockIconClass = classNames('icons icon--small d-none d-sm-block cursor--pointer', { 'icon--active': answer_dnssec, </s> add const lockIconClass = classNames('icons icon--24 d-none d-sm-block', { 'icon--green': answer_dnssec, </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() { </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getClientCell.js
{getIconTooltip({
<mask> }; <mask> <mask> return ( <mask> <div className="logs__row o-hidden h-100"> <mask> {getHintElement({ <mask> className: hintClass, <mask> columnClass: 'grid grid--limited', <mask> tooltipClass: 'px-5 pb-5 pt-4 mw-75', <mask> xlinkHref: 'question', <mask> contentItemClass: 'text-truncate key-colon', </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove {dnssec_enabled && getHintElement({ </s> add {dnssec_enabled && getIconTooltip({ </s> remove const trackerHint = getHintElement({ </s> add const trackerHint = getIconTooltip({ </s> remove <svg className="icons icon--small icon--gray w-100 h-100"> </s> add <svg className="icons icon--24 icon--gray w-100 h-100">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getClientCell.js
import getIconTooltip from './getIconTooltip';
<mask> import React from 'react'; <mask> import classNames from 'classnames'; <mask> import PropTypes from 'prop-types'; <mask> import getHintElement from './getHintElement'; <mask> import { <mask> DEFAULT_SHORT_DATE_FORMAT_OPTIONS, <mask> LONG_TIME_FORMAT, <mask> SCHEME_TO_PROTOCOL_MAP, <mask> } from '../../../helpers/constants'; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import IconTooltip from '../../ui/IconTooltip'; </s> add </s> remove import IconTooltip from '../ui/IconTooltip'; </s> add </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip'; </s> remove import { getTrackerData } from '../../helpers/trackers/trackers'; import Popover from '../ui/Popover'; </s> add import { Trans } from 'react-i18next'; import { getSourceData, getTrackerData } from '../../helpers/trackers/trackers'; import Tooltip from '../ui/Tooltip'; import { captitalizeWords } from '../../helpers/helpers'; const renderLabel = (value) => <strong><Trans>{value}</Trans></strong>; const renderLink = ({ url, name }) => <a className="tooltip-custom__content-link" target="_blank" rel="noopener noreferrer" href={url} > <strong>{name}</strong> </a>; const getTrackerInfo = (trackerData) => [{ key: 'name_table_header', value: trackerData, render: renderLink, }, { key: 'category_label', value: captitalizeWords(trackerData.category), render: renderLabel, }, { key: 'source_label', value: getSourceData(trackerData), render: renderLink, }];
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getDomainCell.js
const lockIconClass = classNames('icons icon--24 d-none d-sm-block', { 'icon--green': answer_dnssec,
<mask> } = row.original; <mask> <mask> const hasTracker = !!tracker; <mask> <mask> const lockIconClass = classNames('icons icon--small d-none d-sm-block cursor--pointer', { <mask> 'icon--active': answer_dnssec, <mask> 'icon--disabled': !answer_dnssec, <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const privacyIconClass = classNames('icons mx-2 icon--small d-none d-sm-block cursor--pointer', { </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove const privacyIconClass = classNames('icons mx-2 icon--small d-none d-sm-block cursor--pointer', { 'icon--active': hasTracker, </s> add const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', { 'icon--green': hasTracker, </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() { </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip';
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getDomainCell.js
const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', { 'icon--green': hasTracker,
<mask> 'icon--disabled': !answer_dnssec, <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const privacyIconClass = classNames('icons mx-2 icon--small d-none d-sm-block cursor--pointer', { <mask> 'icon--active': hasTracker, <mask> 'icon--disabled': !hasTracker, <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const protocol = t(SCHEME_TO_PROTOCOL_MAP[client_proto]) || ''; </s> - client: Use the same tooltip style everywhere Close #1866 Squashed commit of the following: commit 3347832caa33b01a0155b212987f02dc4824ab08 Merge: 7766502d d794b11e Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 15:12:45 2020 +0300 Merge branch 'master' into fix/1866 commit 7766502d4a904ad0a4d240481f7eabf0e25cfb62 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 12:16:59 2020 +0300 Fix icon color classes commit 90191bf74b5eb1855c733c226f7acb4e906c7ad9 Author: ArtemBaskal <[email protected]> Date: Fri Jul 17 11:46:22 2020 +0300 Use logs icons, use pointer cursor, fix review markup formatting commit 0ba50fcd956101f5054ce38c2329df3e8abdfcd2 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 18:05:30 2020 +0300 Use help cursor on tooltips commit bf4e14afe69f874d29be73d8cd4cfbe240ca0304 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:41:47 2020 +0300 Use tooltip in logs, rename tooltip classes commit 00568fdc8e8484c5bae67c51ee8189a3a558e219 Author: ArtemBaskal <[email protected]> Date: Thu Jul 16 17:01:49 2020 +0300 - client: Use the same tooltip style everywhere </s> remove const lockIconClass = classNames('icons icon--small d-none d-sm-block cursor--pointer', { 'icon--active': answer_dnssec, </s> add const lockIconClass = classNames('icons icon--24 d-none d-sm-block', { 'icon--green': answer_dnssec, </s> remove const hintClass = classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { </s> add const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { </s> remove Header: () => { const plainSelected = classNames('cursor--pointer', { 'icon--selected': !isDetailed, }); const detailedSelected = classNames('cursor--pointer', { 'icon--selected': isDetailed, }); </s> add Header: function Header() { </s> remove {getHintElement({ className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }), </s> add {getIconTooltip({ className: classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed }), </s> remove import getHintElement from './getHintElement'; </s> add import getIconTooltip from './getIconTooltip';
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
client/src/components/Logs/Cells/getDomainCell.js