docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep add keep keep keep keep
|
<mask> host string
<mask> wantIP net.IP
<mask> wantRes resultCode
<mask> }{{
<mask> name: "local_client_success",
<mask> host: "example.lan",
<mask> wantIP: knownIP,
</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 uint16
</s> add </s> remove suffix string
wantErrMsg string
</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> add 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 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) {
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace
|
<mask> wantIP net.IP
<mask> qtyp uint16
<mask> wantRes resultCode
<mask> }{{
<mask> name: "success_external",
<mask> host: "example.com",
<mask> suffix: defaultAutohostSuffix,
<mask> wantErrMsg: "",
<mask> wantIP: nil,
<mask> qtyp: dns.TypeA,
<mask> wantRes: resultCodeSuccess,
<mask> }, {
<mask> name: "success_external_non_a",
<mask> host: "example.com",
<mask> suffix: defaultAutohostSuffix,
<mask> wantErrMsg: "",
<mask> wantIP: nil,
<mask> qtyp: dns.TypeCNAME,
<mask> wantRes: resultCodeSuccess,
<mask> }, {
<mask> name: "success_internal",
<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 qtyp: dns.TypeA,
wantRes: resultCodeSuccess,
</s> add wantRes: resultCodeFinish,
isLocalCli: true, </s> remove name: "success_internal_aaaa",
</s> add name: "external_client_known_host", </s> remove qtyp uint16
</s> add </s> remove suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add </s> remove name: "success_internal_unknown",
host: "example-new.lan",
suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add name: "local_client_unknown_host",
host: "wronghost.lan",
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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", </s> remove suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep add keep keep keep keep keep
|
<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 </s> remove suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep replace replace replace replace keep replace replace keep
|
<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> }, {
</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 suffix: defaultAutohostSuffix,
wantErrMsg: "",
</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_aaaa",
</s> add name: "external_client_known_host", </s> remove suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep replace keep replace replace keep keep keep keep
|
<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,
<mask> wantRes: resultCodeSuccess,
<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 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, </s> remove suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<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, </s> remove name: "success_internal_unknown",
host: "example-new.lan",
suffix: defaultAutohostSuffix,
wantErrMsg: "",
</s> add name: "local_client_unknown_host",
host: "wronghost.lan",
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep add keep keep keep keep
|
<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> add pctx := dctx.proxyCtx </s> add if tc.wantRes == resultCodeFinish {
require.NotNil(t, pctx.Res)
assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) </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) { </s> remove pctx := dctx.proxyCtx
</s> add require.NoError(t, dctx.err)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep add keep keep keep keep
|
<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> add if tc.wantRes == resultCodeFinish {
require.NotNil(t, pctx.Res)
assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) </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)
</s> add isLocalClient: true, </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
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep add keep keep keep keep keep
|
<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> add pctx := dctx.proxyCtx </s> remove pctx := dctx.proxyCtx
</s> add require.NoError(t, dctx.err)
</s> add isLocalClient: 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 // 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
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
|
<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> add if tc.wantRes == resultCodeFinish {
require.NotNil(t, pctx.Res)
assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) </s> add pctx := dctx.proxyCtx </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
} </s> add isLocalClient: true,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add pctx := dctx.proxyCtx </s> add if tc.wantRes == resultCodeFinish {
require.NotNil(t, pctx.Res)
assert.Equal(t, dns.RcodeNameError, pctx.Res.Rcode) </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, </s> remove clientIP := IPFromAddr(d.Addr)
if !s.subnetDetector.IsLocallyServedNetwork(clientIP) {
log.Debug("dns: %q requests for internal ip", clientIP)
d.Res = s.makeResponse(req)
</s> add if !ctx.isLocalClient {
log.Debug("dns: %q requests for internal ip", d.Addr)
d.Res = s.genNXDomain(req)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7afc692632a09a1310aca265c6b788817ead660a
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount) </s> remove log.Printf("%s: got %v bytes", filter.URL, len(body))
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
|
control.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<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> add log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount) </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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
|
control.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount) </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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
|
control.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add log.Printf("Filter %s updated: %d bytes, %d rules", filter.URL, len(body), rulesCount) </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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
|
control.go
|
keep keep add keep keep keep keep keep keep
|
<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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7b7f7138806b0b743d4fb1c4fef3c40f513be8b4
|
control.go
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace
|
<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, </s> remove return false, searchCriteria{}, nil
</s> add return false, searchCriterion{}, nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/decode.go
|
keep replace replace keep keep replace keep keep
|
<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 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, </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> add // 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
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/http.go
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<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) </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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add // 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
}
</s> remove searchCriteria []searchCriteria
</s> add searchCriteria []searchCriterion </s> remove c := searchCriteria{
criteriaType: ct,
value: val,
</s> add c := searchCriterion{
criterionType: ct,
value: val,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/http.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<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> add clientFinder := quickMatchClientFinder{
client: l.client,
cache: cache,
}
if !params.quickMatch(line, clientFinder.findClient) {
ts = readQLogTimestamp(line)
return nil, ts, nil
}
</s> add // 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
}
</s> remove c := searchCriteria{
criteriaType: ct,
value: val,
</s> add c := searchCriterion{
criterionType: ct,
value: val, </s> remove return false, searchCriteria{}, nil
</s> add return false, searchCriterion{}, nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/http.go
|
keep keep keep keep replace keep keep keep replace
|
<mask> }
<mask>
<mask> testCases := []struct {
<mask> name string
<mask> sCr []searchCriteria
<mask> want []tcAssertion
<mask> }{{
<mask> name: "all",
<mask> sCr: []searchCriteria{},
</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
// 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 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, </s> remove val := readJSONValue(string(buf), "T")
</s> add val := readJSONValue(string(buf), `"T":"`)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlog_test.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<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 </s> remove c := searchCriteria{
criteriaType: ct,
value: val,
</s> add c := searchCriterion{
criterionType: ct,
value: val,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlog_test.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<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 </s> add clientFinder := quickMatchClientFinder{
client: l.client,
cache: cache,
}
if !params.quickMatch(line, clientFinder.findClient) {
ts = readQLogTimestamp(line)
return nil, ts, nil
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlog_test.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<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 </s> remove c := searchCriteria{
criteriaType: ct,
value: val,
</s> add c := searchCriterion{
criterionType: ct,
value: val,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlog_test.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<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 </s> add clientFinder := quickMatchClientFinder{
client: l.client,
cache: cache,
}
if !params.quickMatch(line, clientFinder.findClient) {
ts = readQLogTimestamp(line)
return nil, ts, nil
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlog_test.go
|
keep keep add keep keep keep keep keep
|
<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> add // 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
}
</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, </s> remove paramNames := map[string]criteriaType{
</s> add paramNames := map[string]criterionType{
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlogfile.go
|
keep replace keep replace keep keep
|
<mask> func readQLogTimestamp(str string) int64 {
<mask> val := readJSONValue(str, "T")
<mask> if len(val) == 0 {
<mask> val = readJSONValue(str, "Time")
<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 val := readJSONValue(string(buf), "T")
</s> add val := readJSONValue(string(buf), `"T":"`) </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 c := searchCriteria{
criteriaType: ct,
value: val,
</s> add c := searchCriterion{
criterionType: ct,
value: val, </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
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/qlogfile.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add clientFinder := quickMatchClientFinder{
client: l.client,
cache: cache,
}
if !params.quickMatch(line, clientFinder.findClient) {
ts = readQLogTimestamp(line)
return nil, ts, 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,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/querylogfile.go
|
keep add keep keep keep keep
|
<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{ </s> remove val := readJSONValue(str, "T")
</s> add val := readJSONValue(str, `"T":"`)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/search.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add // 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
}
</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 </s> remove val = readJSONValue(str, "Time")
</s> add val = readJSONValue(str, `"Time":"`)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/searchparams.go
|
keep add keep keep keep keep keep keep
|
<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":"`) </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)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7c6557b05e1cde58f82a4c8d55037263a7bc16ff
|
internal/querylog/searchparams.go
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<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 </s> remove return cipher
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/aghtls/aghtls.go
|
keep replace replace replace replace replace keep replace keep
|
<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> }
</s> changed based on review
1. exit AG is user defined cipher is invalid
2. updated changelog
3. golang naming tweaks </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) { </s> remove cipher = aghtls.SaferCipherSuites()
</s> add return aghtls.SaferCipherSuites(), nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/aghtls/aghtls.go
|
keep keep keep keep replace keep
|
<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 </s> add tlsCiphers, err := getTLSCiphers()
if err != nil {
return nil, err
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/aghtls/aghtls.go
|
keep keep keep add keep keep keep keep
|
<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 </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)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/home/home.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add tlsCiphers, err := getTLSCiphers()
if err != nil {
return nil, err
}
</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) { </s> remove return cipher
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/home/home.go
|
keep keep keep keep replace keep replace replace replace keep keep
|
<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 {
<mask> cipher = aghtls.SaferCipherSuites()
</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 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 </s> remove return cipher
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/home/home.go
|
keep keep replace keep replace
|
<mask>
<mask> if len(config.TLS.OverrideTLSCiphers) == 0 {
<mask> cipher = aghtls.SaferCipherSuites()
<mask> } else {
<mask> cipher = aghtls.ParseCipherIDs(config.TLS.OverrideTLSCiphers)
</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 return cipher
</s> add </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 // getTLSCiphers check for overriden tls ciphers, if the slice is
</s> add // getTLSCiphers check for overridden tls ciphers, if the slice is
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/home/home.go
|
keep keep keep keep replace keep
|
<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) </s> remove return userCiphers
</s> add return false, 0
|
https://github.com/AdguardTeam/AdGuardHome/commit/7cac010573a46a8815baf5bf91b44e40f366b671
|
internal/home/home.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
|
internal/dnsforward/dns.go
|
keep keep replace keep keep keep keep replace keep keep keep
|
<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,
<mask> Value: []dns.SVCBKeyValue{
<mask> &dns.SVCBAlpn{Alpn: []string{"h2"}},
<mask> &dns.SVCBPort{Port: 8044},
</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 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)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
|
internal/dnsforward/dns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<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)
|
https://github.com/AdguardTeam/AdGuardHome/commit/7ce7e908654579789f23ea5302416b67885494ae
|
internal/dnsforward/dns_test.go
|
keep keep keep add keep keep keep keep
|
<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> add import { getPathWithQueryString } from '../../helpers/helpers'; </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> add const server_name = useSelector((state) => state.encryption.server_name); </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 </s> remove label: 'setup_dns_privacy_android_2',
</s> add label: 'setup_dns_privacy_ios_2',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep add keep keep keep keep keep
|
<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> add import { useSelector } from 'react-redux'; </s> remove
const renderMobileconfigInfo = ({ label, components }) => <li key={label}>
</s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> add const server_name = useSelector((state) => state.encryption.server_name); </s> remove const dnsPrivacyList = [{
title: 'Android',
list: [
{
label: 'setup_dns_privacy_android_1',
},
</s> add const getDnsPrivacyList = (server_name) => {
const iosList = [ </s> add server_name: payload.server_name || '', </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: [
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep keep replace replace keep keep keep replace keep keep keep
|
<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>
<mask> <li>
<mask> <a href={MOBILE_CONFIG_LINKS.DOH} download>{i18next.t('download_mobileconfig_doh')}</a>
</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> add import { getPathWithQueryString } from '../../helpers/helpers'; </s> add const server_name = useSelector((state) => state.encryption.server_name); </s> add server_name: payload.server_name || '', </s> remove const dnsPrivacyList = [{
title: 'Android',
list: [
{
label: 'setup_dns_privacy_android_1',
},
</s> add const getDnsPrivacyList = (server_name) => {
const iosList = [
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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: [ </s> add const server_name = useSelector((state) => state.encryption.server_name); </s> add server_name,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
|
<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 </s> remove href: 'https://adguard.com/adguard-android/overview.html',
</s> add href: 'https://adguard.com/adguard-ios/overview.html',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep keep replace keep keep keep replace keep keep keep
|
<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> },
<mask> <code key="1">text</code>,
<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 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 ],
},
{
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',
},
],
},
],
},
];
};
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep replace keep keep keep replace keep keep
|
<mask> ],
<mask> },
<mask> {
<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>,
</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: '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 </s> remove key: 0,
href: 'https://adguard.com/adguard-ios/overview.html',
</s> add key: 2,
href: 'https://dnscrypt.info/stamps',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep replace replace replace replace replace replace replace replace replace replace keep replace replace keep keep
|
<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
],
},
],
},
{
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', </s> remove href: 'https://adguard.com/adguard-android/overview.html',
</s> add href: 'https://adguard.com/adguard-ios/overview.html',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep replace keep replace replace keep
|
<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',
</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 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', </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',
},
],
},
],
},
];
};
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep replace replace replace replace replace replace replace replace replace replace keep replace replace keep keep
|
<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: 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', </s> remove href: 'https://getintra.org/',
</s> add href: 'https://itunes.apple.com/app/id1452162351',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
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 replace replace replace replace replace replace replace replace replace
|
<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',
<mask> components: [
<mask> {
<mask> key: 0,
<mask> href: 'https://support.mozilla.org/kb/firefox-dns-over-https',
<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_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: '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: [ </s> remove href: 'https://adguard.com/adguard-android/overview.html',
</s> add href: 'https://adguard.com/adguard-ios/overview.html',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
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
|
<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 </s> remove href: 'https://adguard.com/adguard-android/overview.html',
</s> add href: 'https://adguard.com/adguard-ios/overview.html',
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep add keep keep keep keep keep
|
<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> add server_name, </s> remove
const renderMobileconfigInfo = ({ label, components }) => <li key={label}>
</s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}> </s> add const server_name = useSelector((state) => state.encryption.server_name); </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> </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: [
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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', </s> remove ],
},
],
},
{
title: 'iOS',
list: [
{
label: 'setup_dns_privacy_ios_2',
components: [
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep keep add keep keep keep keep keep keep
|
<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> add import { getPathWithQueryString } from '../../helpers/helpers'; </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> add server_name: payload.server_name || '', </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>
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep keep add keep keep keep keep keep keep
|
<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> add server_name, </s> add server_name: payload.server_name || '', </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> add const server_name = useSelector((state) => state.encryption.server_name); </s> remove const dnsPrivacyList = [{
title: 'Android',
list: [
{
label: 'setup_dns_privacy_android_1',
},
</s> add const getDnsPrivacyList = (server_name) => {
const iosList = [ </s> remove
const renderMobileconfigInfo = ({ label, components }) => <li key={label}>
</s> add const renderMobileconfigInfo = ({ label, components, server_name }) => <li key={label}>
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/components/ui/Guide.js
|
keep add keep keep keep keep keep keep
|
<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> add server_name: payload.server_name || '', </s> add server_name: payload.server_name || '', </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',
},
],
},
],
},
];
}; </s> add server_name,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/reducers/encryption.js
|
keep keep add keep keep keep keep keep keep
|
<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> add /* TODO: handle property delete on api refactor */
server_name: payload.server_name || '', </s> add server_name: payload.server_name || '', </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> add const server_name = useSelector((state) => state.encryption.server_name); </s> remove const dnsPrivacyList = [{
title: 'Android',
list: [
{
label: 'setup_dns_privacy_android_1',
},
</s> add const getDnsPrivacyList = (server_name) => {
const iosList = [
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/reducers/encryption.js
|
keep add keep keep keep keep keep
|
<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> add server_name: payload.server_name || '', </s> add /* TODO: handle property delete on api refactor */
server_name: payload.server_name || '', </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 </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/',
},
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d1d87d6ec1a500ba47a263d05f6abeb0872781e
|
client/src/reducers/encryption.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add import Tooltip from '../ui/Tooltip'; </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'; </s> add import Tooltip from '../../ui/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,
}];
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/Counters.js
|
keep keep keep add keep keep keep keep
|
<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 </s> add import Tooltip from '../../ui/Tooltip'; </s> remove import getHintElement from './getHintElement';
</s> add import getIconTooltip from './getIconTooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/Counters.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add renderLink.propTypes = {
url: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
};
</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>} </s> remove <svg className="icons icon--small icon--gray">
</s> add <svg className="icons icon--24 icon--gray">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/Counters.js
|
keep keep keep replace replace keep keep keep keep keep
|
<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> add import Tooltip from '../ui/Tooltip'; </s> remove import IconTooltip from '../ui/IconTooltip';
</s> add </s> remove import IconTooltip from '../../ui/IconTooltip';
</s> add </s> add import Tooltip from '../../ui/Tooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/DomainCell.js
|
keep keep keep add keep keep keep keep keep keep
|
<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() { </s> add import Tooltip from '../ui/Tooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/DomainCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add 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>;
</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> </s> remove {dnssec_enabled && getHintElement({
</s> add {dnssec_enabled && getIconTooltip({
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/DomainCell.js
|
keep keep add keep
|
<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"> </s> remove border-bottom-color: #66b574;
</s> add border-bottom-color: var(--green-74);
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Dashboard/DomainCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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"> </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">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Filters/Rewrites/Table.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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"> </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">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Filters/Rewrites/Table.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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"> </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">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Filters/Table.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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"> </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">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Filters/Table.js
|
keep replace replace keep keep keep keep keep
|
<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); </s> add .icon--green {
color: var(--green-74);
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Header/Header.css
|
keep keep keep keep replace keep keep keep keep keep
|
<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); </s> add .icon--green {
color: var(--green-74);
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Header/Header.css
|
keep keep keep keep replace keep keep keep keep keep
|
<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); </s> remove .icon--smallest {
width: 1.2rem;
height: 1.2rem;
</s> add .icon--20 {
--size: 1.25rem;
width: var(--size);
height: var(--size);
}
.icon--18 {
--size: 1.125rem;
width: var(--size);
height: var(--size);
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Header/Header.css
|
keep keep keep keep replace keep keep keep keep keep
|
<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); </s> add .icon--green {
color: var(--green-74);
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Header/Header.css
|
keep keep keep keep replace keep keep keep keep keep
|
<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 </s> add import Tooltip from '../../ui/Tooltip'; </s> add import Tooltip from '../ui/Tooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getClientCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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'; </s> remove const trackerHint = getHintElement({
</s> add const trackerHint = getIconTooltip({
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getClientCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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> add 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>;
</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 {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>}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getClientCell.js
|
keep keep keep replace keep keep keep keep keep
|
<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,
}]; </s> add import Tooltip from '../ui/Tooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getDomainCell.js
|
keep keep keep replace replace keep keep keep keep replace replace keep keep keep
|
<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', {
<mask> 'icon--active': hasTracker,
<mask> 'icon--disabled': !hasTracker,
<mask> 'my-3': isDetailed,
<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 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'; </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`}
</s> add className={classNames('icons icon--24 icon--green cursor--pointer', {
'icon--selected': isDetailed,
})}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getDomainCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> const requestDetails = getGrid(requestDetailsObj, 'request_details');
<mask>
<mask> const renderContent = hasTracker ? requestDetails.concat(getGrid(knownTrackerDataObj, 'known_tracker', 'pt-4')) : requestDetails;
<mask>
<mask> const trackerHint = getHintElement({
<mask> className: privacyIconClass,
<mask> tooltipClass: 'pt-4 pb-5 px-5 mw-75',
<mask> xlinkHref: 'privacy',
<mask> contentItemClass: 'key-colon',
<mask> renderContent,
</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 {getHintElement({
</s> add {getIconTooltip({ </s> remove {dnssec_enabled && getHintElement({
</s> add {dnssec_enabled && getIconTooltip({ </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 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 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,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getDomainCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> .join(', ');
<mask>
<mask> return (
<mask> <div className="logs__row o-hidden">
<mask> {dnssec_enabled && getHintElement({
<mask> className: lockIconClass,
<mask> tooltipClass: 'py-4 px-5 pb-45',
<mask> canShowTooltip: answer_dnssec,
<mask> xlinkHref: 'lock',
<mask> columnClass: 'w-100',
</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 {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 trackerHint = getHintElement({
</s> add const trackerHint = getIconTooltip({ </s> add 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>;
</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 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,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getDomainCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> import {
<mask> FILTERED_STATUS,
<mask> FILTERED_STATUS_TO_META_MAP,
<mask> } from '../../../helpers/constants';
<mask> import getHintElement from './getHintElement';
<mask>
<mask> const getResponseCell = (row, filtering, t, isDetailed, getFilterName) => {
<mask> const {
<mask> reason, filterId, rule, status, upstream, elapsedMs, response, originalResponse,
<mask> } = row.original;
</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> add import Tooltip from '../ui/Tooltip'; </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,
}];
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getResponseCell.js
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> const detailedInfo = isBlocked ? filter : formattedElapsedMs;
<mask>
<mask> return (
<mask> <div className="logs__row">
<mask> {getHintElement({
<mask> className: classNames('icons mr-4 icon--small cursor--pointer icon--light-gray', { 'my-3': isDetailed }),
<mask> columnClass: 'grid grid--limited',
<mask> tooltipClass: 'px-5 pb-5 pt-4 mw-75 custom-tooltip__response-details',
<mask> contentItemClass: 'text-truncate key-colon o-hidden',
<mask> xlinkHref: 'question',
<mask> title: 'response_details',
</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 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 const trackerHint = getHintElement({
</s> add const trackerHint = getIconTooltip({ </s> remove {dnssec_enabled && getHintElement({
</s> add {dnssec_enabled && getIconTooltip({ </s> add 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>;
</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,
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Cells/getResponseCell.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> FORM_NAME,
<mask> RESPONSE_FILTER,
<mask> RESPONSE_FILTER_QUERIES,
<mask> } from '../../../helpers/constants';
<mask> import IconTooltip from '../../ui/IconTooltip';
<mask> import { setLogsFilter } from '../../../actions/queryLogs';
<mask> import useDebounce from '../../../helpers/useDebounce';
<mask> import { createOnBlurHandler, getLogsUrlParams } from '../../../helpers/helpers';
<mask>
<mask> const renderFilterField = ({
</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> add import Tooltip from '../../ui/Tooltip'; </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> add import Tooltip from '../ui/Tooltip'; </s> remove import getHintElement from './getHintElement';
</s> add import getIconTooltip from './getIconTooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Filters/Form.js
|
keep add keep keep keep keep
|
<mask> import useDebounce from '../../../helpers/useDebounce';
<mask> import { createOnBlurHandler, getLogsUrlParams } from '../../../helpers/helpers';
<mask>
<mask> const renderFilterField = ({
<mask> input,
<mask> id,
</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 IconTooltip from '../ui/IconTooltip';
</s> add </s> add import Tooltip from '../ui/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 import getHintElement from './getHintElement';
</s> add import getIconTooltip from './getIconTooltip';
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Filters/Form.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> const onBlur = (event) => createOnBlurHandler(event, input, normalizeOnBlur);
<mask>
<mask> return <>
<mask> <div className="input-group-search input-group-search__icon--magnifier">
<mask> <svg className="icons icon--small icon--gray">
<mask> <use xlinkHref="#magnifier" />
<mask> </svg>
<mask> </div>
<mask> <input
<mask> {...input}
</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 <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 <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}>
</s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> add 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>;
</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="icons icon--small icon--gray">
</s> add <svg className="icons icon--24 icon--gray"> </s> remove <svg className="icons icon--small icon--gray">
</s> add <svg className="icons icon--24 icon--gray">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Filters/Form.js
|
keep keep replace keep keep keep keep replace keep keep
|
<mask> <div
<mask> className={classNames('input-group-search input-group-search__icon--cross', { invisible: input.value.length < 1 })}>
<mask> <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}>
<mask> <use xlinkHref="#cross" />
<mask> </svg>
<mask> </div>
<mask> <span className="input-group-search input-group-search__icon--tooltip">
<mask> <IconTooltip text={tooltip} type='tooltip-custom--logs' />
<mask> </span>
<mask> {!disabled
</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 {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 <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> add 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>;
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Filters/Form.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> type="button"
<mask> className="btn btn-icon--green ml-3 bg-transparent"
<mask> onClick={refreshLogs}
<mask> >
<mask> <svg className="icons icon--small">
<mask> <use xlinkHref="#update" />
<mask> </svg>
<mask> </button>
<mask> </h1>
<mask> <Form
</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="icon icon--small">
</s> add <svg className="icon icon--24"> </s> remove <svg className="icon icon--small">
</s> add <svg className="icon icon--24"> </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`}
</s> add className={classNames('icons icon--24 icon--green cursor--pointer', {
'icon--selected': isDetailed,
})} </s> remove className="icon icon--small icon-cross d-block d-md-none cursor--pointer"
</s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </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 className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`}
</s> add className={classNames('icons icon--24 icon--green mr-2 cursor--pointer', {
'icon--selected': !isDetailed,
})}
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Filters/index.js
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> right: 0;
<mask> top: 0.5rem;
<mask> }
<mask>
<mask> .icon--light-gray {
<mask> color: var(--gray-8);
<mask> }
<mask>
<mask> .link--green {
<mask> color: var(--green79);
<mask> }
<mask>
<mask> .row--detailed {
</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 .icon--active {
color: #66b574;
</s> add .icon--lightgray {
color: var(--gray-8); </s> add .icon--green {
color: var(--green-74);
}
</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 .icon--smallest {
width: 1.2rem;
height: 1.2rem;
</s> add .icon--20 {
--size: 1.25rem;
width: var(--size);
height: var(--size);
}
.icon--18 {
--size: 1.125rem;
width: var(--size);
height: var(--size); </s> remove border-bottom-color: #66b574;
</s> add border-bottom-color: var(--green-74);
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Logs.css
|
keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep replace keep
|
<mask> headerClassName: 'logs__text',
<mask> },
<mask> {
<mask> Header: () => {
<mask> const plainSelected = classNames('cursor--pointer', {
<mask> 'icon--selected': !isDetailed,
<mask> });
<mask>
<mask> const detailedSelected = classNames('cursor--pointer', {
<mask> 'icon--selected': isDetailed,
<mask> });
<mask>
<mask> return <div className="d-flex justify-content-between">
<mask> {t('client_table_header')}
<mask> {<span>
<mask> <svg
<mask> className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`}
<mask> onClick={() => toggleDetailedLogs(false)}
</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 className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`}
</s> add className={classNames('icons icon--24 icon--green cursor--pointer', {
'icon--selected': isDetailed,
})} </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 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 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 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,
}];
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Table.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> <title><Trans>compact</Trans></title>
<mask> <use xlinkHref='#list' />
<mask> </svg>
<mask> <svg
<mask> className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`}
<mask> onClick={() => toggleDetailedLogs(true)}
<mask> >
<mask> <title><Trans>default</Trans></title>
<mask> <use xlinkHref='#detailed_list' />
<mask> </svg>
</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 className={`icons icon--small icon--active mr-2 cursor--pointer ${plainSelected}`}
</s> add className={classNames('icons icon--24 icon--green mr-2 cursor--pointer', {
'icon--selected': !isDetailed,
})} </s> remove <svg className="icon icon--small">
</s> add <svg className="icon icon--24"> </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 className="icon icon--small icon-cross d-block d-md-none cursor--pointer"
</s> add className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" </s> remove <svg className="icons icon--small">
</s> add <svg className="icons icon--24"> </s> remove <svg className="icon icon--small">
</s> add <svg className="icon icon--24">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Table.js
|
keep replace keep keep keep keep replace keep keep
|
<mask> previousText={
<mask> <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer">
<mask> <title><Trans>previous_btn</Trans></title>
<mask> <use xlinkHref="#arrow-left" />
<mask> </svg>}
<mask> nextText={
<mask> <svg className="icons icon--small icon--gray w-100 h-100 cursor--pointer">
<mask> <title><Trans>next_btn</Trans></title>
<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">
</s> add <svg className="icons icon--24 icon--gray w-100 h-100">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/Table.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> },
<mask> }}
<mask> >
<mask> <svg
<mask> className="icon icon--small icon-cross d-block d-md-none cursor--pointer"
<mask> onClick={closeModal}>
<mask> <use xlinkHref="#cross" />
<mask> </svg>
<mask> {processContent(detailedDataCurrent, buttonType)}
<mask> </Modal>
</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="icon icon--small">
</s> add <svg className="icon icon--24"> </s> remove <svg className="icon icon--small">
</s> add <svg className="icon icon--24"> </s> remove className={`icons icon--small icon--active cursor--pointer ${detailedSelected}`}
</s> add className={classNames('icons icon--24 icon--green cursor--pointer', {
'icon--selected': isDetailed,
})} </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 <svg className="icons icon--smallest icon--gray" onClick={onClearInputClick}>
</s> add <svg className="icons icon--20 icon--gray" onClick={onClearInputClick}> </s> remove <svg className="icons icon--small">
</s> add <svg className="icons icon--24">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Logs/index.js
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> showPageSizeOptions={false}
<mask> showPageJump={false}
<mask> renderTotalPagesCount={() => false}
<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">
</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">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Settings/Clients/AutoClients.js
|
keep keep keep keep replace keep keep keep keep keep
|
<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> 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 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"> </s> remove <svg className="icons icon--small icon--gray">
</s> add <svg className="icons icon--24 icon--gray">
|
https://github.com/AdguardTeam/AdGuardHome/commit/7d2c7a61f16ab2d6e0e72caf653b56a7d1881021
|
client/src/components/Settings/Clients/AutoClients.js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.