docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
//
// TODO(s.chzhen): Add lowercased, non-FQDN version of the hostname from the
// question of the request. | <mask>
<mask> // To transfer information between modules
<mask> type dnsContext struct {
<mask> proxyCtx *proxy.DNSContext
<mask>
<mask> // setts are the filtering settings for the client.
<mask> setts *filtering.Settings
<mask>
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
</s> add DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` </s> remove const currentSchemaVersion = 14
</s> add const currentSchemaVersion = 15 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/dns.go |
q := msg.Question[0]
host := strings.ToLower(strings.TrimSuffix(q.Name, ".")) | <mask>
<mask> shouldLog := true
<mask> msg := pctx.Req
<mask>
<mask> // don't log ANY request if refuseAny is enabled
<mask> if q.Qtype == dns.TypeANY && s.conf.RefuseAny {
<mask> shouldLog = false
<mask> }
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove if shouldLog && s.queryLog != nil {
</s> add if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats.go |
if q.Qtype == dns.TypeANY && s.conf.RefuseAny { | <mask> shouldLog := true
<mask> msg := pctx.Req
<mask>
<mask> // don't log ANY request if refuseAny is enabled
<mask> if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
<mask> shouldLog = false
<mask> }
<mask>
<mask> ip, _ := netutil.IPAndPortFromAddr(pctx.Addr)
<mask> ip = slices.Clone(ip)
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if shouldLog && s.queryLog != nil {
</s> add if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats.go |
if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { | <mask>
<mask> // Synchronize access to s.queryLog and s.stats so they won't be suddenly
<mask> // uninitialized while in use. This can happen after proxy server has been
<mask> // stopped, but its workers haven't yet exited.
<mask> if shouldLog && s.queryLog != nil {
<mask> s.logQuery(dctx, pctx, elapsed, ip)
<mask> }
<mask>
<mask> if s.stats != nil {
<mask> s.updateStats(dctx, elapsed, *dctx.result, ip)
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats.go |
} else {
log.Debug("request for %s from %s ignored; not logging", host, ip) | <mask> if shouldLog &&
<mask> s.queryLog != nil &&
<mask> s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) {
<mask> s.logQuery(dctx, pctx, elapsed, ip)
<mask> }
<mask>
<mask> if s.stats != nil {
<mask> s.updateStats(dctx, elapsed, *dctx.result, ip)
<mask> }
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if shouldLog && s.queryLog != nil {
</s> add if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats.go |
// testQueryLog is a simple [querylog.QueryLog] implementation for tests. | <mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
<mask>
<mask> // testQueryLog is a simple querylog.QueryLog implementation for tests.
<mask> type testQueryLog struct {
<mask> // QueryLog is embedded here simply to make testQueryLog
<mask> // a querylog.QueryLog without actually implementing all methods.
<mask> querylog.QueryLog
<mask>
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // a querylog.QueryLog without actually implementing all methods.
</s> add // a [querylog.QueryLog] without actually implementing all methods. </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats_test.go |
// a [querylog.QueryLog] without actually implementing all methods. | <mask>
<mask> // testQueryLog is a simple querylog.QueryLog implementation for tests.
<mask> type testQueryLog struct {
<mask> // QueryLog is embedded here simply to make testQueryLog
<mask> // a querylog.QueryLog without actually implementing all methods.
<mask> querylog.QueryLog
<mask>
<mask> lastParams *querylog.AddParams
<mask> }
<mask>
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. </s> remove DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
</s> add DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats_test.go |
// Add implements the [querylog.QueryLog] interface for *testQueryLog. | <mask>
<mask> lastParams *querylog.AddParams
<mask> }
<mask>
<mask> // Add implements the querylog.QueryLog interface for *testQueryLog.
<mask> func (l *testQueryLog) Add(p *querylog.AddParams) {
<mask> l.lastParams = p
<mask> }
<mask>
<mask> // testStats is a simple stats.Stats implementation for tests.
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // a querylog.QueryLog without actually implementing all methods.
</s> add // a [querylog.QueryLog] without actually implementing all methods. </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats_test.go |
// ShouldLog implements the [querylog.QueryLog] interface for *testQueryLog.
func (l *testQueryLog) ShouldLog(string, uint16, uint16) bool {
return true
}
| <mask> l.lastParams = p
<mask> }
<mask>
<mask> // testStats is a simple stats.Stats implementation for tests.
<mask> type testStats struct {
<mask> // Stats is embedded here simply to make testStats a stats.Stats without
<mask> // actually implementing all methods.
<mask> stats.Interface
<mask>
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // a querylog.QueryLog without actually implementing all methods.
</s> add // a [querylog.QueryLog] without actually implementing all methods. </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/dnsforward/stats_test.go |
"sort" | <mask> "net/netip"
<mask> "os"
<mask> "path/filepath"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghalg"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtls"
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove BindHosts: []netip.Addr{netip.IPv4Unspecified()},
Port: defaultPortDNS,
StatsInterval: 1,
QueryLogEnabled: true,
QueryLogFileEnabled: true,
QueryLogInterval: timeutil.Duration{Duration: 90 * timeutil.Day},
QueryLogMemSize: 1000,
</s> add BindHosts: []netip.Addr{netip.IPv4Unspecified()},
Port: defaultPortDNS,
StatsInterval: 1, </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` | <mask> // TTL for a web session (in hours)
<mask> // An active session is automatically refreshed once a day.
<mask> WebSessionTTLHours uint32 `yaml:"web_session_ttl"`
<mask>
<mask> DNS dnsConfig `yaml:"dns"`
<mask> TLS tlsConfigSettings `yaml:"tls"`
<mask>
<mask> // Filters reflects the filters from [filtering.Config]. It's cloned to the
<mask> // config used in the filtering module at the startup. Afterwards it's
<mask> // cloned from the filtering module back here.
<mask> //
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
<mask> // StatsInterval is the time interval for flushing statistics to the disk in
<mask> // days.
<mask> StatsInterval uint32 `yaml:"statistics_interval"`
<mask>
<mask> // QueryLogEnabled defines if the query log is enabled.
<mask> QueryLogEnabled bool `yaml:"querylog_enabled"`
<mask> // QueryLogFileEnabled defines, if the query log is written to the file.
<mask> QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
<mask> // QueryLogInterval is the interval for query log's files rotation.
<mask> QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
<mask> // QueryLogMemSize is the number of entries kept in memory before they are
<mask> // flushed to disk.
<mask> QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
<mask>
<mask> // AnonymizeClientIP defines if clients' IP addresses should be anonymized
<mask> // in query log and statistics.
<mask> AnonymizeClientIP bool `yaml:"anonymize_client_ip"`
<mask>
<mask> dnsforward.FilteringConfig `yaml:",inline"`
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
</s> add DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
|
BindHosts: []netip.Addr{netip.IPv4Unspecified()},
Port: defaultPortDNS,
StatsInterval: 1, | <mask> AuthAttempts: 5,
<mask> AuthBlockMin: 15,
<mask> WebSessionTTLHours: 30 * 24,
<mask> DNS: dnsConfig{
<mask> BindHosts: []netip.Addr{netip.IPv4Unspecified()},
<mask> Port: defaultPortDNS,
<mask> StatsInterval: 1,
<mask> QueryLogEnabled: true,
<mask> QueryLogFileEnabled: true,
<mask> QueryLogInterval: timeutil.Duration{Duration: 90 * timeutil.Day},
<mask> QueryLogMemSize: 1000,
<mask> FilteringConfig: dnsforward.FilteringConfig{
<mask> ProtectionEnabled: true, // whether or not use any of filtering features
<mask> BlockingMode: dnsforward.BlockingModeDefault,
<mask> BlockedResponseTTL: 10, // in seconds
<mask> Ratelimit: 20,
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
</s> add DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
QueryLog: queryLogConfig{
Enabled: true,
FileEnabled: true,
Interval: timeutil.Duration{Duration: 90 * timeutil.Day},
MemSize: 1000,
Ignored: []string{},
}, | <mask> PortHTTPS: defaultPortHTTPS,
<mask> PortDNSOverTLS: defaultPortTLS, // needs to be passed through to dnsproxy
<mask> PortDNSOverQUIC: defaultPortQUIC,
<mask> },
<mask> // NOTE: Keep these parameters in sync with the one put into
<mask> // client/src/helpers/filters/filters.js by scripts/vetted-filters.
<mask> //
<mask> // TODO(a.garipov): Think of a way to make scripts/vetted-filters update
<mask> // these as well if necessary.
<mask> Filters: []filtering.FilterYAML{{
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add </s> remove // a querylog.QueryLog without actually implementing all methods.
</s> add // a [querylog.QueryLog] without actually implementing all methods. </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. </s> remove DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
</s> add DNS dnsConfig `yaml:"dns"`
TLS tlsConfigSettings `yaml:"tls"`
QueryLog queryLogConfig `yaml:"querylog"` | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
<mask>
<mask> if Context.queryLog != nil {
<mask> dc := querylog.Config{}
<mask> Context.queryLog.WriteDiskConfig(&dc)
<mask> config.DNS.QueryLogEnabled = dc.Enabled
<mask> config.DNS.QueryLogFileEnabled = dc.FileEnabled
<mask> config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
<mask> config.DNS.QueryLogMemSize = dc.MemSize
<mask> config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP
<mask> }
<mask>
<mask> if Context.filters != nil {
<mask> Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf)
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if shouldLog && s.queryLog != nil {
</s> add if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
|
config.QueryLog.Enabled = dc.Enabled
config.QueryLog.FileEnabled = dc.FileEnabled
config.QueryLog.Interval = timeutil.Duration{Duration: dc.RotationIvl}
config.QueryLog.MemSize = dc.MemSize
config.QueryLog.Ignored = dc.Ignored.Values()
sort.Strings(config.QueryLog.Ignored) | <mask> Context.queryLog.WriteDiskConfig(&dc)
<mask> config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP
<mask> }
<mask>
<mask> if Context.filters != nil {
<mask> Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf)
<mask> config.Filters = config.DNS.DnsfilterConf.Filters
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add </s> remove if shouldLog && s.queryLog != nil {
</s> add if shouldLog &&
s.queryLog != nil &&
s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/config.go |
"strings" | <mask> "net/url"
<mask> "os"
<mask> "path/filepath"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghalg"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove BindHosts: []netip.Addr{netip.IPv4Unspecified()},
Port: defaultPortDNS,
StatsInterval: 1,
QueryLogEnabled: true,
QueryLogFileEnabled: true,
QueryLogInterval: timeutil.Duration{Duration: 90 * timeutil.Day},
QueryLogMemSize: 1000,
</s> add BindHosts: []netip.Addr{netip.IPv4Unspecified()},
Port: defaultPortDNS,
StatsInterval: 1, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/dns.go |
"github.com/AdguardTeam/golibs/stringutil" | <mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/ameshkov/dnscrypt/v2"
<mask> yaml "gopkg.in/yaml.v3"
<mask> )
<mask>
<mask> // Default ports.
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove const currentSchemaVersion = 14
</s> add const currentSchemaVersion = 15 </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/dns.go |
<mask> ConfigModified: onConfigModified,
<mask> HTTPRegister: httpRegister,
<mask> FindClient: Context.clients.findMultiple,
<mask> BaseDir: baseDir,
<mask> RotationIvl: config.DNS.QueryLogInterval.Duration,
<mask> MemSize: config.DNS.QueryLogMemSize,
<mask> Enabled: config.DNS.QueryLogEnabled,
<mask> FileEnabled: config.DNS.QueryLogFileEnabled,
<mask> AnonymizeClientIP: config.DNS.AnonymizeClientIP,
<mask> }
<mask> Context.queryLog = querylog.New(conf)
<mask>
<mask> Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil)
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/dns.go |
|
RotationIvl: config.QueryLog.Interval.Duration,
MemSize: config.QueryLog.MemSize,
Enabled: config.QueryLog.Enabled,
FileEnabled: config.QueryLog.FileEnabled,
Ignored: stringutil.NewSet(),
}
for _, v := range config.QueryLog.Ignored {
host := strings.ToLower(strings.TrimSuffix(v, "."))
if conf.Ignored.Has(host) {
return fmt.Errorf("duplicate ignored host %s", host)
}
conf.Ignored.Add(host) | <mask> FindClient: Context.clients.findMultiple,
<mask> BaseDir: baseDir,
<mask> AnonymizeClientIP: config.DNS.AnonymizeClientIP,
<mask> }
<mask> Context.queryLog = querylog.New(conf)
<mask>
<mask> Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil)
<mask> if err != nil {
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove RotationIvl: config.DNS.QueryLogInterval.Duration,
MemSize: config.DNS.QueryLogMemSize,
Enabled: config.DNS.QueryLogEnabled,
FileEnabled: config.DNS.QueryLogFileEnabled,
</s> add </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/dns.go |
const currentSchemaVersion = 15 | <mask> yaml "gopkg.in/yaml.v3"
<mask> )
<mask>
<mask> // currentSchemaVersion is the current schema version.
<mask> const currentSchemaVersion = 14
<mask>
<mask> // These aliases are provided for convenience.
<mask> type (
<mask> yarr = []any
<mask> yobj = map[string]any
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/upgrade.go |
upgradeSchema14to15, | <mask> upgradeSchema12to13,
<mask> upgradeSchema13to14,
<mask> }
<mask>
<mask> n := 0
<mask> for i, u := range upgrades {
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/home/upgrade.go |
// ShouldLog returns true if request for the host should be logged.
func (l *queryLog) ShouldLog(host string, _, _ uint16) bool {
return !l.isIgnored(host)
}
// isIgnored returns true if the host is in the Ignored list.
func (l *queryLog) isIgnored(host string) bool {
return l.conf.Ignored.Has(host)
} | <mask> _ = l.flushLogBuffer(false)
<mask> }()
<mask> }
<mask> }
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny {
</s> add if q.Qtype == dns.TypeANY && s.conf.RefuseAny { </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/qlog.go |
"github.com/AdguardTeam/golibs/stringutil" | <mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/dnsproxy/proxyutil"
<mask> "github.com/AdguardTeam/golibs/testutil"
<mask> "github.com/AdguardTeam/golibs/timeutil"
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. </s> remove const currentSchemaVersion = 14
</s> add const currentSchemaVersion = 15 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/qlog_test.go |
"github.com/AdguardTeam/golibs/stringutil" | <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/timeutil"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // QueryLog - main interface
<mask> type QueryLog interface {
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // Add implements the querylog.QueryLog interface for *testQueryLog.
</s> add // Add implements the [querylog.QueryLog] interface for *testQueryLog. </s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests.
</s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests. | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/querylog.go |
// ShouldLog returns true if request for the host should be logged.
ShouldLog(host string, qType, qClass uint16) bool | <mask>
<mask> // WriteDiskConfig - write configuration
<mask> WriteDiskConfig(c *Config)
<mask> }
<mask>
<mask> // Config is the query log configuration structure.
<mask> type Config struct {
<mask> // Anonymizer processes the IP addresses to anonymize those if needed.
<mask> Anonymizer *aghnet.IPMut
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add </s> remove // a querylog.QueryLog without actually implementing all methods.
</s> add // a [querylog.QueryLog] without actually implementing all methods. | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/querylog.go |
// Ignored is the list of host names, which are should not be written
// to log.
Ignored *stringutil.Set | <mask> // AnonymizeClientIP tells if the query log should anonymize clients' IP
<mask> // addresses.
<mask> AnonymizeClientIP bool
<mask> }
<mask>
<mask> // AddParams is the parameters for adding an entry.
<mask> type AddParams struct {
<mask> Question *dns.Msg
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove // QueryLogEnabled defines if the query log is enabled.
QueryLogEnabled bool `yaml:"querylog_enabled"`
// QueryLogFileEnabled defines, if the query log is written to the file.
QueryLogFileEnabled bool `yaml:"querylog_file_enabled"`
// QueryLogInterval is the interval for query log's files rotation.
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
// QueryLogMemSize is the number of entries kept in memory before they are
// flushed to disk.
QueryLogMemSize uint32 `yaml:"querylog_size_memory"`
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/querylog.go |
if l.isIgnored(e.QHost) {
return nil, ts, nil
}
| <mask>
<mask> e = &logEntry{}
<mask> decodeLogEntry(e, line)
<mask>
<mask> e.client, err = l.client(e.ClientID, e.IP.String(), cache)
<mask> if err != nil {
<mask> log.Error(
<mask> "querylog: enriching file record at time %s for client %q (clientid %q): %s",
</s> Pull request 1727: 4299-querylog-ignore
Merge in DNS/adguard-home from 4299-querylog-ignore to master
Squashed commit of the following:
commit 06f32fef860d63dc2af9aad8d4251918c5babd00
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 17:14:26 2023 +0300
add debug msg
commit 48fc9cf90bcb5baec4b9a7949b5be00055ad0955
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:30:06 2023 +0300
add line break
commit a96fe712b6e5c6a190a92b2f83ed031a85658e58
Merge: d1035219 b8d55eaf
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:12:32 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit d1035219e15e5b5639b2fc39e0b17cfc05904722
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 16:11:03 2023 +0300
fix docs
commit caea5dcdf3e2ca8fe2d54cb1463226bb791470f8
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 15:30:16 2023 +0300
fix issue link
commit f6e3d122404e1363dd6dd7fa0221e8ce321354e9
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 14:34:11 2023 +0300
all: add issues links
commit 52f77188f1c3a93494585ca8a3ea16e373a8b5c6
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 13:11:58 2023 +0300
all: add log message
commit a40a0c87937abb778e4e632a5403543371b6d2e0
Merge: 87fd71ba b31bab59
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:16:08 2023 +0300
Merge branch 'master' into 4299-querylog-ignore
commit 87fd71ba01588f798ba944a75e6585ebdc4aa1f7
Author: Stanislav Chzhen <[email protected]>
Date: Tue Feb 7 12:13:44 2023 +0300
all: add todo
commit c0c2ea08d36f25003c709eb2c190a147c47c2e0c
Author: Stanislav Chzhen <[email protected]>
Date: Mon Feb 6 13:27:24 2023 +0300
all: add changelog
commit 8d227b684794e306e314d8cb848fe354d4578607
Author: Stanislav Chzhen <[email protected]>
Date: Fri Feb 3 16:06:43 2023 +0300
all: querylog ignore </s> remove config.DNS.QueryLogEnabled = dc.Enabled
config.DNS.QueryLogFileEnabled = dc.FileEnabled
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl}
config.DNS.QueryLogMemSize = dc.MemSize
</s> add </s> remove RotationIvl: config.DNS.QueryLogInterval.Duration,
MemSize: config.DNS.QueryLogMemSize,
Enabled: config.DNS.QueryLogEnabled,
FileEnabled: config.DNS.QueryLogFileEnabled,
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3 | internal/querylog/search.go |
//
// TODO(a.garipov, e.burkov): Consider fully merging into HostsContainer. | <mask> // processes both A/AAAA and PTR DNS requests for those.
<mask> type HostsContainer struct {
<mask> // requestMatcher matches the requests and translates the rules. It's
<mask> // embedded to implement MatchRequest and Translate for *HostsContainer.
<mask> requestMatcher
<mask>
<mask> // done is the channel to sign closing the container.
<mask> done chan struct{}
<mask>
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove // listID is the identifier for the list of generated rules.
listID int
</s> add </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
<mask> // requestMatcher matches the requests and translates the rules. It's
<mask> // embedded to implement MatchRequest and Translate for *HostsContainer.
<mask> requestMatcher
<mask>
<mask> // listID is the identifier for the list of generated rules.
<mask> listID int
<mask>
<mask> // done is the channel to sign closing the container.
<mask> done chan struct{}
<mask>
<mask> // updates is the channel for receiving updated hosts.
<mask> updates chan *netutil.IPMap
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
|
// listID is the identifier for the list of generated rules.
listID int | <mask> w aghos.FSWatcher
<mask>
<mask> // patterns stores specified paths in the fs.Glob-compatible form.
<mask> patterns []string
<mask> }
<mask>
<mask> // ErrNoHostsPaths is returned when there are no valid paths to watch passed to
<mask> // the HostsContainer.
<mask> const ErrNoHostsPaths errors.Error = "no valid paths to hosts files provided"
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove // listID is the identifier for the list of generated rules.
listID int
</s> add </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
if ip == nil || len(hosts) == 0 { | <mask> ) (patterns []string, cont bool, err error) {
<mask> s := bufio.NewScanner(r)
<mask> for s.Scan() {
<mask> ip, hosts := hp.parseLine(s.Text())
<mask> if ip == nil {
<mask> continue
<mask> }
<mask>
<mask> hp.addPairs(ip, hosts)
<mask> }
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) | <mask> return nil, nil
<mask> }
<mask>
<mask> for _, f := range fields[1:] {
<mask> switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
<mask> case -1:
<mask> hosts = append(hosts, f)
<mask>
<mask> continue
<mask> case 0:
<mask> // Go on.
<mask> default:
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add </s> remove if ip == nil {
</s> add if ip == nil || len(hosts) == 0 { </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
<mask> case -1:
<mask> hosts = append(hosts, f)
<mask>
<mask> continue
<mask> case 0:
<mask> // Go on.
<mask> default:
<mask> // Only a part of the field is a comment.
<mask> hosts = append(hosts, f[:hashIdx])
<mask> }
<mask>
<mask> // The rest of the fields are a part of the comment so skip
<mask> // immediately.
<mask> break
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove // The rest of the fields are a part of the comment so skip
// immediately.
break
</s> add hosts = append(hosts, f) </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) </s> remove // listID is the identifier for the list of generated rules.
listID int
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
|
hosts = append(hosts, f) | <mask> // Only a part of the field is a comment.
<mask> hosts = append(hosts, f[:hashIdx])
<mask> }
<mask>
<mask> // The rest of the fields are a part of the comment so skip
<mask> // immediately.
<mask> break
<mask> }
<mask>
<mask> return ip, hosts
<mask> }
<mask>
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove case 0:
// Go on.
default:
// Only a part of the field is a comment.
hosts = append(hosts, f[:hashIdx])
</s> add </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) </s> remove // listID is the identifier for the list of generated rules.
listID int
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/hostscontainer.go |
# See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
1.0.0.3 *
1.0.0.4 *.com
| <mask> # See https://github.com/AdguardTeam/AdGuardHome/issues/3846.
<mask> 1.0.0.2 a.whole lot.of aliases for.testing
<mask>
<mask> # Same for IPv6.
<mask> ::1 simplehost
<mask> :: hello hello.world
<mask> ::2 a.whole lot.of aliases for.testing
</s> Pull request: aghnet: do not turn bad etc/hosts entries into rules
Updates #3946.
Squashed commit of the following:
commit 5d632dc4c49325308570adbfbc0fe333528989b5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:49:51 2021 +0300
aghnet: imp code
commit 4da620ee625718f5cd7549277c483631f22b977b
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 16 15:33:39 2021 +0300
aghnet: do not turn bad etc/hosts entries into rules </s> remove switch hashIdx := strings.IndexByte(f, '#'); hashIdx {
case -1:
hosts = append(hosts, f)
</s> add hashIdx := strings.IndexByte(f, '#')
if hashIdx == 0 {
// The rest of the fields are a part of the comment so return.
break
} else if hashIdx > 0 {
// Only a part of the field is a comment.
f = f[:hashIdx]
}
// Make sure that invalid hosts aren't turned into rules.
//
// See https://github.com/AdguardTeam/AdGuardHome/issues/3946.
err := netutil.ValidateDomainName(f)
if err != nil {
log.Error("%s: host %q is invalid, ignoring", hostsContainerPref, f) </s> remove // listID is the identifier for the list of generated rules.
listID int
</s> add </s> remove if ip == nil {
</s> add if ip == nil || len(hosts) == 0 { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd | internal/aghnet/testdata/etc_hosts |
},
"import/resolver": {
"webpack": {
"config": "webpack.common.js"
} | <mask> "react": {
<mask> "pragma": "React",
<mask> "version": "16.4"
<mask> }
<mask> },
<mask>
<mask> "rules": {
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/.eslintrc |
"array-find": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-find/-/array-find-1.0.0.tgz",
"integrity": "sha1-bI4obRHtdoMn+OYuzuhzU8o+eLg=",
"dev": true
}, | <mask> "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
<mask> "dev": true
<mask> },
<mask> "array-find-index": {
<mask> "version": "1.0.2",
<mask> "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
<mask> "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "ansi-regex": {
<mask> "version": "2.1.1",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "aproba": {
<mask> "version": "1.2.0",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "balanced-match": {
<mask> "version": "1.0.0",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "brace-expansion": {
<mask> "version": "1.1.11",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "version": "1.1.11",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "balanced-match": "^1.0.0",
<mask> "concat-map": "0.0.1"
<mask> }
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "code-point-at": {
<mask> "version": "1.1.0",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "concat-map": {
<mask> "version": "0.0.1",
<mask> "bundled": true,
<mask> "dev": true
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "concat-map": {
<mask> "version": "0.0.1",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "console-control-strings": {
<mask> "version": "1.1.0",
<mask> "bundled": true,
<mask> "dev": true
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "console-control-strings": {
<mask> "version": "1.1.0",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "core-util-is": {
<mask> "version": "1.0.2",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "inherits": {
<mask> "version": "2.0.3",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "ini": {
<mask> "version": "1.3.5",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "version": "1.0.0",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "number-is-nan": "^1.0.0"
<mask> }
<mask> },
<mask> "isarray": {
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "version": "3.0.4",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "brace-expansion": "^1.1.7"
<mask> }
<mask> },
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "minimist": {
<mask> "version": "0.0.8",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "minipass": {
<mask> "version": "2.3.5",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "version": "2.3.5",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "safe-buffer": "^5.1.2",
<mask> "yallist": "^3.0.0"
<mask> }
<mask> },
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "mkdirp": {
<mask> "version": "0.5.1",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "minimist": "0.0.8"
<mask> }
<mask> },
<mask> "ms": {
<mask> "version": "2.1.1",
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "number-is-nan": {
<mask> "version": "1.0.1",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "object-assign": {
<mask> "version": "4.1.1",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "once": {
<mask> "version": "1.4.0",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "wrappy": "1"
<mask> }
<mask> },
<mask> "os-homedir": {
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "safe-buffer": {
<mask> "version": "5.1.2",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "safer-buffer": {
<mask> "version": "2.1.2",
<mask> "bundled": true,
<mask> "dev": true,
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "string-width": {
<mask> "version": "1.0.2",
<mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "code-point-at": "^1.0.0",
<mask> "is-fullwidth-code-point": "^1.0.0",
<mask> "strip-ansi": "^3.0.0"
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"optional": true, | <mask> "bundled": true,
<mask> "dev": true,
<mask> "requires": {
<mask> "ansi-regex": "^2.0.0"
<mask> }
<mask> },
<mask> "strip-json-comments": {
<mask> "version": "2.0.1",
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "wrappy": {
<mask> "version": "1.0.2",
<mask> "bundled": true,
<mask> "dev": true
<mask> },
<mask> "yallist": {
<mask> "version": "3.0.3",
<mask> "bundled": true,
<mask> "dev": true
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"dev": true,
"optional": true | <mask> },
<mask> "yallist": {
<mask> "version": "3.0.3",
<mask> "bundled": true,
<mask> "dev": true
<mask> }
<mask> }
<mask> },
<mask> "function-bind": {
<mask> "version": "1.1.1",
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package-lock.json |
"i18next-xhr-backend": "^3.2.2", | <mask> "date-fns": "^1.29.0",
<mask> "i18next": "^12.0.0",
<mask> "i18next-browser-languagedetector": "^2.2.3",
<mask> "lodash": "^4.17.15",
<mask> "nanoid": "^1.2.3",
<mask> "prop-types": "^15.7.2",
<mask> "react": "^16.4.0",
<mask> "react-click-outside": "^3.0.1",
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/package.json |
import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants';
import { LANGUAGES } from '../../helpers/twosky'; | <mask> import React, { Component, Fragment } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { Trans, withNamespaces } from 'react-i18next';
<mask> import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants';
<mask> import i18n from '../../i18n';
<mask>
<mask> import Version from './Version';
<mask> import './Footer.css';
<mask> import './Select.css';
</s> + client: remove locales from js bundle </s> remove import { DEFAULT_LANGUAGE } from './helpers/constants';
</s> add import { LANGUAGES, BASE_LOCALE } from './helpers/twosky'; </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/components/ui/Footer.js |
{Object.keys(LANGUAGES).map(lang => (
<option key={lang} value={lang}>
{LANGUAGES[lang]} | <mask> className="form-control select select--language"
<mask> value={i18n.language}
<mask> onChange={this.changeLanguage}
<mask> >
<mask> {LANGUAGES.map(language => (
<mask> <option key={language.key} value={language.key}>
<mask> {language.name}
<mask> </option>
<mask> ))}
<mask> </select>
<mask> </div>
<mask> </div>
</s> + client: remove locales from js bundle </s> remove i18n.changeLanguage(DEFAULT_LANGUAGE);
</s> add i18n.changeLanguage(BASE_LOCALE); </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/components/ui/Footer.js |
import XHR from 'i18next-xhr-backend'; | <mask> import i18n from 'i18next';
<mask> import { reactI18nextModule } from 'react-i18next';
<mask> import { initReactI18n } from 'react-i18next/hooks';
<mask> import langDetect from 'i18next-browser-languagedetector';
<mask>
<mask> import { LANGUAGES, BASE_LOCALE } from './helpers/twosky';
<mask>
</s> + client: remove locales from js bundle </s> remove import { DEFAULT_LANGUAGE } from './helpers/constants';
</s> add import { LANGUAGES, BASE_LOCALE } from './helpers/twosky'; </s> remove import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants';
</s> add import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants';
import { LANGUAGES } from '../../helpers/twosky'; </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
import { LANGUAGES, BASE_LOCALE } from './helpers/twosky'; | <mask> import { reactI18nextModule } from 'react-i18next';
<mask> import { initReactI18n } from 'react-i18next/hooks';
<mask> import langDetect from 'i18next-browser-languagedetector';
<mask>
<mask> import { DEFAULT_LANGUAGE } from './helpers/constants';
<mask>
<mask> import vi from './__locales/vi.json';
<mask> import en from './__locales/en.json';
<mask> import ru from './__locales/ru.json';
<mask> import es from './__locales/es.json';
</s> + client: remove locales from js bundle </s> remove import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants';
</s> add import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants';
import { LANGUAGES } from '../../helpers/twosky'; </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
const availableLanguages = Object.keys(LANGUAGES); | <mask> import langDetect from 'i18next-browser-languagedetector';
<mask>
<mask> import { DEFAULT_LANGUAGE } from './helpers/constants';
<mask>
<mask> import vi from './__locales/vi.json';
<mask> import en from './__locales/en.json';
<mask> import ru from './__locales/ru.json';
<mask> import es from './__locales/es.json';
<mask> import fr from './__locales/fr.json';
<mask> import ja from './__locales/ja.json';
<mask> import sv from './__locales/sv.json';
<mask> import ptBR from './__locales/pt-br.json';
<mask> import zhTW from './__locales/zh-tw.json';
<mask> import bg from './__locales/bg.json';
<mask> import zhCN from './__locales/zh-cn.json';
<mask> import cs from './__locales/cs.json';
<mask> import da from './__locales/da.json';
<mask> import de from './__locales/de.json';
<mask> import id from './__locales/id.json';
<mask> import it from './__locales/it.json';
<mask> import ko from './__locales/ko.json';
<mask> import no from './__locales/no.json';
<mask> import nl from './__locales/nl.json';
<mask> import pl from './__locales/pl.json';
<mask> import ptPT from './__locales/pt-pt.json';
<mask> import sk from './__locales/sk.json';
<mask> import sl from './__locales/sl.json';
<mask> import tr from './__locales/tr.json';
<mask> import srCS from './__locales/sr-cs.json';
<mask> import hr from './__locales/hr.json';
<mask> import fa from './__locales/fa.json';
<mask>
<mask> const resources = {
<mask> en: {
<mask> translation: en,
<mask> },
<mask> vi: {
<mask> translation: vi,
<mask> },
<mask> ru: {
<mask> translation: ru,
<mask> },
<mask> es: {
<mask> translation: es,
<mask> },
<mask> fr: {
<mask> translation: fr,
<mask> },
<mask> ja: {
<mask> translation: ja,
<mask> },
<mask> sv: {
<mask> translation: sv,
<mask> },
<mask> 'pt-br': {
<mask> translation: ptBR,
<mask> },
<mask> 'zh-tw': {
<mask> translation: zhTW,
<mask> },
<mask> bg: {
<mask> translation: bg,
<mask> },
<mask> 'zh-cn': {
<mask> translation: zhCN,
<mask> },
<mask> cs: {
<mask> translation: cs,
<mask> },
<mask> da: {
<mask> translation: da,
<mask> },
<mask> de: {
<mask> translation: de,
<mask> },
<mask> id: {
<mask> translation: id,
<mask> },
<mask> it: {
<mask> translation: it,
<mask> },
<mask> ko: {
<mask> translation: ko,
<mask> },
<mask> no: {
<mask> translation: no,
<mask> },
<mask> nl: {
<mask> translation: nl,
<mask> },
<mask> pl: {
<mask> translation: pl,
<mask> },
<mask> 'pt-pt': {
<mask> translation: ptPT,
<mask> },
<mask> sk: {
<mask> translation: sk,
<mask> },
<mask> sl: {
<mask> translation: sl,
<mask> },
<mask> tr: {
<mask> translation: tr,
<mask> },
<mask> 'sr-cs': {
<mask> translation: srCS,
<mask> },
<mask> hr: {
<mask> translation: hr,
<mask> },
<mask> fa: {
<mask> translation: fa,
<mask> },
<mask> };
<mask>
<mask> const availableLanguages = Object.keys(resources);
<mask>
<mask> i18n
<mask> .use(langDetect)
<mask> .use(initReactI18n)
<mask> .use(reactI18nextModule)
</s> + client: remove locales from js bundle </s> remove import { DEFAULT_LANGUAGE } from './helpers/constants';
</s> add import { LANGUAGES, BASE_LOCALE } from './helpers/twosky'; </s> remove import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants';
</s> add import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants';
import { LANGUAGES } from '../../helpers/twosky'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"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",
"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",
"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",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
.use(XHR) | <mask> const availableLanguages = Object.keys(LANGUAGES);
<mask>
<mask> i18n
<mask> .use(langDetect)
<mask> .use(initReactI18n)
<mask> .use(reactI18nextModule)
<mask> .init({
<mask> lowerCaseLng: true,
<mask> fallbackLng: BASE_LOCALE,
<mask> keySeparator: false,
</s> + client: remove locales from js bundle </s> remove resources,
</s> add </s> remove fallbackLng: DEFAULT_LANGUAGE,
</s> add fallbackLng: BASE_LOCALE, </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); </s> remove new CleanWebpackPlugin(['*.*'], {
</s> add new CleanWebpackPlugin(['**/*.*'], { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
<mask> .use(langDetect)
<mask> .use(initReactI18n)
<mask> .use(reactI18nextModule)
<mask> .init({
<mask> resources,
<mask> lowerCaseLng: true,
<mask> fallbackLng: DEFAULT_LANGUAGE,
<mask> keySeparator: false,
<mask> nsSeparator: false,
<mask> returnEmptyString: false,
</s> + client: remove locales from js bundle </s> remove fallbackLng: DEFAULT_LANGUAGE,
</s> add fallbackLng: BASE_LOCALE, </s> remove new CleanWebpackPlugin(['*.*'], {
</s> add new CleanWebpackPlugin(['**/*.*'], { </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
|
fallbackLng: BASE_LOCALE, | <mask> .use(reactI18nextModule)
<mask> .init({
<mask> resources,
<mask> lowerCaseLng: true,
<mask> fallbackLng: DEFAULT_LANGUAGE,
<mask> keySeparator: false,
<mask> nsSeparator: false,
<mask> returnEmptyString: false,
<mask> interpolation: {
<mask> escapeValue: false,
</s> + client: remove locales from js bundle </s> remove resources,
</s> add </s> remove new CleanWebpackPlugin(['*.*'], {
</s> add new CleanWebpackPlugin(['**/*.*'], { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
whitelist: availableLanguages,
backend: {
loadPath: '/__locales/{{lng}}.json',
}, | <mask> wait: true,
<mask> },
<mask> }, () => {
<mask> if (!availableLanguages.includes(i18n.language)) {
<mask> i18n.changeLanguage(BASE_LOCALE);
<mask> }
<mask> });
<mask>
</s> + client: remove locales from js bundle </s> remove i18n.changeLanguage(DEFAULT_LANGUAGE);
</s> add i18n.changeLanguage(BASE_LOCALE); </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
i18n.changeLanguage(BASE_LOCALE); | <mask> wait: true,
<mask> },
<mask> }, () => {
<mask> if (!availableLanguages.includes(i18n.language)) {
<mask> i18n.changeLanguage(DEFAULT_LANGUAGE);
<mask> }
<mask> });
<mask>
<mask> export default i18n;
</s> + client: remove locales from js bundle </s> remove "dev": true
</s> add "dev": true,
"optional": true | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/src/i18n.js |
const LOCALES_PATH = path.resolve(RESOURCES_PATH, 'src/__locales/*.json'); | <mask> const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html');
<mask> const HTML_LOGIN_PATH = path.resolve(RESOURCES_PATH, 'public/login.html');
<mask> const FAVICON_PATH = path.resolve(RESOURCES_PATH, 'public/favicon.png');
<mask>
<mask> const PUBLIC_PATH = path.resolve(__dirname, '../build/static');
<mask>
<mask> const config = {
<mask> target: 'web',
<mask> context: RESOURCES_PATH,
</s> + client: remove locales from js bundle </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/webpack.common.js |
alias: {
MainRoot: path.resolve(__dirname, '../'),
ClientRoot: path.resolve(__dirname, './src'),
}, | <mask> resolve: {
<mask> modules: ['node_modules'],
<mask> },
<mask> module: {
<mask> rules: [
<mask> {
<mask> test: /\.css$/,
</s> + client: remove locales from js bundle </s> remove new CleanWebpackPlugin(['*.*'], {
</s> add new CleanWebpackPlugin(['**/*.*'], { </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/webpack.common.js |
new CleanWebpackPlugin(['**/*.*'], { | <mask> plugins: [
<mask> new webpack.DefinePlugin({
<mask> 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
<mask> }),
<mask> new CleanWebpackPlugin(['*.*'], {
<mask> root: PUBLIC_PATH,
<mask> verbose: false,
<mask> dry: false,
<mask> }),
<mask> new HtmlWebpackPlugin({
</s> + client: remove locales from js bundle </s> remove fallbackLng: DEFAULT_LANGUAGE,
</s> add fallbackLng: BASE_LOCALE, </s> remove resources,
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/webpack.common.js |
new CopyPlugin([
{
from: LOCALES_PATH,
to: PUBLIC_PATH,
context: 'src/',
},
]), | <mask> { from: FAVICON_PATH, to: PUBLIC_PATH },
<mask> ]),
<mask> ],
<mask> };
<mask>
<mask> module.exports = config;
</s> + client: remove locales from js bundle </s> remove import vi from './__locales/vi.json';
import en from './__locales/en.json';
import ru from './__locales/ru.json';
import es from './__locales/es.json';
import fr from './__locales/fr.json';
import ja from './__locales/ja.json';
import sv from './__locales/sv.json';
import ptBR from './__locales/pt-br.json';
import zhTW from './__locales/zh-tw.json';
import bg from './__locales/bg.json';
import zhCN from './__locales/zh-cn.json';
import cs from './__locales/cs.json';
import da from './__locales/da.json';
import de from './__locales/de.json';
import id from './__locales/id.json';
import it from './__locales/it.json';
import ko from './__locales/ko.json';
import no from './__locales/no.json';
import nl from './__locales/nl.json';
import pl from './__locales/pl.json';
import ptPT from './__locales/pt-pt.json';
import sk from './__locales/sk.json';
import sl from './__locales/sl.json';
import tr from './__locales/tr.json';
import srCS from './__locales/sr-cs.json';
import hr from './__locales/hr.json';
import fa from './__locales/fa.json';
const resources = {
en: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
fa: {
translation: fa,
},
};
const availableLanguages = Object.keys(resources);
</s> add const availableLanguages = Object.keys(LANGUAGES); | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5 | client/webpack.common.js |
printHTTPAddresses("https") | <mask> Certificates: []tls.Certificate{cert},
<mask> },
<mask> }
<mask>
<mask> URL := fmt.Sprintf("https://%s", address)
<mask> log.Println("Go to " + URL)
<mask> err = httpsServer.server.ListenAndServeTLS("", "")
<mask> if err != http.ErrServerClosed {
<mask> log.Fatal(err)
<mask> os.Exit(1)
<mask> }
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add </s> remove httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
</s> add httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | app.go |
printHTTPAddresses("http")
| <mask> }()
<mask>
<mask> // this loop is used as an ability to change listening host and/or port
<mask> for {
<mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
<mask> URL := fmt.Sprintf("http://%s", address)
<mask> log.Println("Go to " + URL)
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> httpServer = &http.Server{
<mask> Addr: address,
<mask> }
<mask> err := httpServer.ListenAndServe()
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove URL := fmt.Sprintf("https://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("https") </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | app.go |
address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) | <mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> httpServer = &http.Server{
<mask> Addr: address,
<mask> }
<mask> err := httpServer.ListenAndServe()
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
</s> add httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | app.go |
BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
Language string `yaml:"language"` // two-letter ISO 639-1 language code | <mask> ourConfigFilename string // Config filename (can be overridden via the command line arguments)
<mask> ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else
<mask> firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html
<mask>
<mask> BindHost string `yaml:"bind_host"`
<mask> BindPort int `yaml:"bind_port"`
<mask> AuthName string `yaml:"auth_name"`
<mask> AuthPass string `yaml:"auth_pass"`
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> DNS dnsConfig `yaml:"dns"`
<mask> TLS tlsConfig `yaml:"tls"`
<mask> Filters []filter `yaml:"filters"`
<mask> UserRules []string `yaml:"user_rules"`
<mask> DHCP dhcpd.ServerConfig `yaml:"dhcp"`
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | config.go |
<mask> }
<mask>
<mask> func handleInstallGetAddresses(w http.ResponseWriter, r *http.Request) {
<mask> data := firstRunData{}
<mask> ifaces, err := getValidNetInterfaces()
<mask> if err != nil {
<mask> httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
<mask> return
<mask> }
<mask> if len(ifaces) == 0 {
<mask> httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
<mask> return
<mask> }
<mask>
<mask> // fill out the fields
<mask>
<mask> // find out if port 80 is available -- if not, fall back to 3000
<mask> if checkPortAvailable("", 80) == nil {
<mask> data.Web.Port = 80
<mask> } else {
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
</s> add httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove URL := fmt.Sprintf("https://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("https") </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | control.go |
|
ifaces, err := getValidNetInterfacesForWeb()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
| <mask> data.DNS.Warning = "Port 53 is not available for binding -- this will make DNS clients unable to contact AdGuard Home."
<mask> }
<mask>
<mask> data.Interfaces = make(map[string]interface{})
<mask> for _, iface := range ifaces {
<mask> data.Interfaces[iface.Name] = iface
<mask> }
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add </s> remove URL := fmt.Sprintf("https://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("https") | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | control.go |
data.Interfaces[iface.Name] = iface | <mask> }
<mask>
<mask> data.Interfaces = make(map[string]interface{})
<mask> for _, iface := range ifaces {
<mask> addrs, e := iface.Addrs()
<mask> if e != nil {
<mask> httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
<mask> return
<mask> }
<mask>
<mask> jsonIface := netInterface{
<mask> Name: iface.Name,
<mask> MTU: iface.MTU,
<mask> HardwareAddr: iface.HardwareAddr.String(),
<mask> }
<mask>
<mask> if iface.Flags != 0 {
<mask> jsonIface.Flags = iface.Flags.String()
<mask> }
<mask>
<mask> // we don't want link-local addresses in json, so skip them
<mask> for _, addr := range addrs {
<mask> ipnet, ok := addr.(*net.IPNet)
<mask> if !ok {
<mask> // not an IPNet, should not happen
<mask> httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
<mask> return
<mask> }
<mask> // ignore link-local
<mask> if ipnet.IP.IsLinkLocalUnicast() {
<mask> continue
<mask> }
<mask> jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
<mask> }
<mask> if len(jsonIface.Addresses) != 0 {
<mask> data.Interfaces[iface.Name] = jsonIface
<mask> }
<mask> }
<mask>
<mask> w.Header().Set("Content-Type", "application/json")
<mask> err = json.NewEncoder(w).Encode(data)
<mask> if err != nil {
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add </s> remove httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
</s> add httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) </s> remove URL := fmt.Sprintf("https://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("https") </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | control.go |
httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) | <mask> func handleInstallConfigure(w http.ResponseWriter, r *http.Request) {
<mask> newSettings := firstRunData{}
<mask> err := json.NewDecoder(r.Body).Decode(&newSettings)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
<mask> return
<mask> }
<mask>
<mask> restartHTTP := true
<mask> if config.BindHost == newSettings.Web.IP && config.BindPort == newSettings.Web.Port {
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove ifaces, err := getValidNetInterfaces()
if err != nil {
httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err)
return
}
if len(ifaces) == 0 {
httpError(w, http.StatusServiceUnavailable, "Couldn't find any legible interface, plase try again later")
return
}
// fill out the fields
</s> add </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove URL := fmt.Sprintf("https://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("https") </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | control.go |
"github.com/joomcode/errorx" | <mask> "runtime"
<mask> "strconv"
<mask> "strings"
<mask> )
<mask>
<mask> // ----------------------------------
<mask> // helper functions for working with files
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove description: "warning_validation is a validation warning message with the issue description" </s> add </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
Language string `yaml:"language"` // two-letter ISO 639-1 language code | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | helpers.go |
-
name: install
description: 'First-time install configuration handlers' | <mask> -
<mask> name: dhcp
<mask> description: 'Built-in DHCP server controls'
<mask> paths:
<mask>
<mask> # API TO-DO LIST
<mask> # TODO: Use JSON where it is possible
</s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove description: "warning_validation is a validation warning message with the issue description" </s> add </s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
Language string `yaml:"language"` // two-letter ISO 639-1 language code </s> remove addrs, e := iface.Addrs()
if e != nil {
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %s: %s", iface.Name, err)
return
}
jsonIface := netInterface{
Name: iface.Name,
MTU: iface.MTU,
HardwareAddr: iface.HardwareAddr.String(),
}
if iface.Flags != 0 {
jsonIface.Flags = iface.Flags.String()
}
// we don't want link-local addresses in json, so skip them
for _, addr := range addrs {
ipnet, ok := addr.(*net.IPNet)
if !ok {
// not an IPNet, should not happen
httpError(w, http.StatusInternalServerError, "SHOULD NOT HAPPEN: got iface.Addrs() element %s that is not net.IPNet, it is %T", addr, addr)
return
}
// ignore link-local
if ipnet.IP.IsLinkLocalUnicast() {
continue
}
jsonIface.Addresses = append(jsonIface.Addresses, ipnet.IP.String())
}
if len(jsonIface.Addresses) != 0 {
data.Interfaces[iface.Name] = jsonIface
}
</s> add data.Interfaces[iface.Name] = iface </s> remove httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err)
</s> add httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | openapi/openapi.yaml |
<mask> description: "key_type is either RSA or ECDSA"
<mask> warning_validation:
<mask> type: "string"
<mask> example: "You have specified an empty certificate"
<mask> description: "warning_validation is a validation warning message with the issue description" </s> Added install methods to openapi.yaml
Print all net interfaces when bind_host is 0.0.0.0 </s> remove address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
URL := fmt.Sprintf("http://%s", address)
log.Println("Go to " + URL)
</s> add printHTTPAddresses("http")
</s> remove BindHost string `yaml:"bind_host"`
BindPort int `yaml:"bind_port"`
AuthName string `yaml:"auth_name"`
AuthPass string `yaml:"auth_pass"`
Language string `yaml:"language"` // two-letter ISO 639-1 language code
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
AuthName string `yaml:"auth_name"` // AuthName is the basic auth username
AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password
Language string `yaml:"language"` // two-letter ISO 639-1 language code | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923 | openapi/openapi.yaml |
|
<mask> import (
<mask> "fmt"
<mask> "net"
<mask> "os"
<mask> "strings"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/dnsforward"
</s> * rDNS: refactor: move code to a separate file </s> remove "time"
</s> add </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add </s> remove func beginAsyncRDNS(ip string) {
if config.clients.Exists(ip) {
return
}
// add IP to rdnsIP, if not exists
config.dnsctx.rdnsLock.Lock()
defer config.dnsctx.rdnsLock.Unlock()
_, ok := config.dnsctx.rdnsIP[ip]
if ok {
return
}
config.dnsctx.rdnsIP[ip] = true
log.Tracef("Adding %s for rDNS resolve", ip)
select {
case config.dnsctx.rdnsChannel <- ip:
//
default:
log.Tracef("rDNS queue is full")
}
}
// Use rDNS to get hostname by IP address
func resolveRDNS(ip string) string {
log.Tracef("Resolving host for %s", ip)
req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
},
}
var err error
req.Question[0].Name, err = dns.ReverseAddr(ip)
if err != nil {
log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
return ""
}
resp, err := config.dnsctx.upstream.Exchange(&req)
if err != nil {
log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
return ""
}
if len(resp.Answer) != 1 {
log.Debug("No answer for rDNS lookup of %s", ip)
return ""
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
log.Error("not a PTR response for %s", ip)
return ""
}
log.Tracef("PTR response for %s: %s", ip, ptr.String())
if strings.HasSuffix(ptr.Ptr, ".") {
ptr.Ptr = ptr.Ptr[:len(ptr.Ptr)-1]
}
return ptr.Ptr
}
// Wait for a signal and then synchronously resolve hostname by IP address
// Add the hostname:IP pair to "Clients" array
func asyncRDNSLoop() {
for {
var ip string
ip = <-config.dnsctx.rdnsChannel
host := resolveRDNS(ip)
if len(host) == 0 {
continue
}
config.dnsctx.rdnsLock.Lock()
delete(config.dnsctx.rdnsIP, ip)
config.dnsctx.rdnsLock.Unlock()
_, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
}
}
</s> add </s> remove bindhost := config.DNS.BindHost
if config.DNS.BindHost == "0.0.0.0" {
bindhost = "127.0.0.1"
}
resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
opts := upstream.Options{
Timeout: rdnsTimeout,
}
config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
if err != nil {
log.Error("upstream.AddressToUpstream: %s", err)
return
}
config.dnsctx.rdnsIP = make(map[string]bool)
config.dnsctx.rdnsChannel = make(chan string, 256)
go asyncRDNSLoop()
</s> add initRDNS() | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f | home/dns.go |
|
<mask> "net"
<mask> "os"
<mask> "strings"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/dnsforward"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
</s> * rDNS: refactor: move code to a separate file </s> remove "strings"
</s> add </s> remove func beginAsyncRDNS(ip string) {
if config.clients.Exists(ip) {
return
}
// add IP to rdnsIP, if not exists
config.dnsctx.rdnsLock.Lock()
defer config.dnsctx.rdnsLock.Unlock()
_, ok := config.dnsctx.rdnsIP[ip]
if ok {
return
}
config.dnsctx.rdnsIP[ip] = true
log.Tracef("Adding %s for rDNS resolve", ip)
select {
case config.dnsctx.rdnsChannel <- ip:
//
default:
log.Tracef("rDNS queue is full")
}
}
// Use rDNS to get hostname by IP address
func resolveRDNS(ip string) string {
log.Tracef("Resolving host for %s", ip)
req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
},
}
var err error
req.Question[0].Name, err = dns.ReverseAddr(ip)
if err != nil {
log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
return ""
}
resp, err := config.dnsctx.upstream.Exchange(&req)
if err != nil {
log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
return ""
}
if len(resp.Answer) != 1 {
log.Debug("No answer for rDNS lookup of %s", ip)
return ""
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
log.Error("not a PTR response for %s", ip)
return ""
}
log.Tracef("PTR response for %s: %s", ip, ptr.String())
if strings.HasSuffix(ptr.Ptr, ".") {
ptr.Ptr = ptr.Ptr[:len(ptr.Ptr)-1]
}
return ptr.Ptr
}
// Wait for a signal and then synchronously resolve hostname by IP address
// Add the hostname:IP pair to "Clients" array
func asyncRDNSLoop() {
for {
var ip string
ip = <-config.dnsctx.rdnsChannel
host := resolveRDNS(ip)
if len(host) == 0 {
continue
}
config.dnsctx.rdnsLock.Lock()
delete(config.dnsctx.rdnsIP, ip)
config.dnsctx.rdnsLock.Unlock()
_, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
}
}
</s> add </s> remove bindhost := config.DNS.BindHost
if config.DNS.BindHost == "0.0.0.0" {
bindhost = "127.0.0.1"
}
resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
opts := upstream.Options{
Timeout: rdnsTimeout,
}
config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
if err != nil {
log.Error("upstream.AddressToUpstream: %s", err)
return
}
config.dnsctx.rdnsIP = make(map[string]bool)
config.dnsctx.rdnsChannel = make(chan string, 256)
go asyncRDNSLoop()
</s> add initRDNS() </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f | home/dns.go |
|
<mask> "github.com/joomcode/errorx"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> const (
<mask> rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
<mask> )
<mask>
<mask> type dnsContext struct {
<mask> rdnsChannel chan string // pass data from DNS request handling thread to rDNS thread
<mask> // contains IP addresses of clients to be resolved by rDNS
<mask> // if IP address couldn't be resolved, it stays here forever to prevent further attempts to resolve the same IP
<mask> rdnsIP map[string]bool
</s> * rDNS: refactor: move code to a separate file </s> remove func beginAsyncRDNS(ip string) {
if config.clients.Exists(ip) {
return
}
// add IP to rdnsIP, if not exists
config.dnsctx.rdnsLock.Lock()
defer config.dnsctx.rdnsLock.Unlock()
_, ok := config.dnsctx.rdnsIP[ip]
if ok {
return
}
config.dnsctx.rdnsIP[ip] = true
log.Tracef("Adding %s for rDNS resolve", ip)
select {
case config.dnsctx.rdnsChannel <- ip:
//
default:
log.Tracef("rDNS queue is full")
}
}
// Use rDNS to get hostname by IP address
func resolveRDNS(ip string) string {
log.Tracef("Resolving host for %s", ip)
req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
},
}
var err error
req.Question[0].Name, err = dns.ReverseAddr(ip)
if err != nil {
log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
return ""
}
resp, err := config.dnsctx.upstream.Exchange(&req)
if err != nil {
log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
return ""
}
if len(resp.Answer) != 1 {
log.Debug("No answer for rDNS lookup of %s", ip)
return ""
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
log.Error("not a PTR response for %s", ip)
return ""
}
log.Tracef("PTR response for %s: %s", ip, ptr.String())
if strings.HasSuffix(ptr.Ptr, ".") {
ptr.Ptr = ptr.Ptr[:len(ptr.Ptr)-1]
}
return ptr.Ptr
}
// Wait for a signal and then synchronously resolve hostname by IP address
// Add the hostname:IP pair to "Clients" array
func asyncRDNSLoop() {
for {
var ip string
ip = <-config.dnsctx.rdnsChannel
host := resolveRDNS(ip)
if len(host) == 0 {
continue
}
config.dnsctx.rdnsLock.Lock()
delete(config.dnsctx.rdnsIP, ip)
config.dnsctx.rdnsLock.Unlock()
_, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
}
}
</s> add </s> remove bindhost := config.DNS.BindHost
if config.DNS.BindHost == "0.0.0.0" {
bindhost = "127.0.0.1"
}
resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
opts := upstream.Options{
Timeout: rdnsTimeout,
}
config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
if err != nil {
log.Error("upstream.AddressToUpstream: %s", err)
return
}
config.dnsctx.rdnsIP = make(map[string]bool)
config.dnsctx.rdnsChannel = make(chan string, 256)
go asyncRDNSLoop()
</s> add initRDNS() </s> remove "strings"
</s> add </s> remove "time"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f | home/dns.go |
|
initRDNS() | <mask> }
<mask>
<mask> config.dnsServer = dnsforward.NewServer(baseDir)
<mask>
<mask> bindhost := config.DNS.BindHost
<mask> if config.DNS.BindHost == "0.0.0.0" {
<mask> bindhost = "127.0.0.1"
<mask> }
<mask> resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
<mask> opts := upstream.Options{
<mask> Timeout: rdnsTimeout,
<mask> }
<mask> config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
<mask> if err != nil {
<mask> log.Error("upstream.AddressToUpstream: %s", err)
<mask> return
<mask> }
<mask>
<mask> config.dnsctx.rdnsIP = make(map[string]bool)
<mask> config.dnsctx.rdnsChannel = make(chan string, 256)
<mask> go asyncRDNSLoop()
<mask> }
<mask>
<mask> func isRunning() bool {
<mask> return config.dnsServer != nil && config.dnsServer.IsRunning()
<mask> }
</s> * rDNS: refactor: move code to a separate file </s> remove func beginAsyncRDNS(ip string) {
if config.clients.Exists(ip) {
return
}
// add IP to rdnsIP, if not exists
config.dnsctx.rdnsLock.Lock()
defer config.dnsctx.rdnsLock.Unlock()
_, ok := config.dnsctx.rdnsIP[ip]
if ok {
return
}
config.dnsctx.rdnsIP[ip] = true
log.Tracef("Adding %s for rDNS resolve", ip)
select {
case config.dnsctx.rdnsChannel <- ip:
//
default:
log.Tracef("rDNS queue is full")
}
}
// Use rDNS to get hostname by IP address
func resolveRDNS(ip string) string {
log.Tracef("Resolving host for %s", ip)
req := dns.Msg{}
req.Id = dns.Id()
req.RecursionDesired = true
req.Question = []dns.Question{
{
Qtype: dns.TypePTR,
Qclass: dns.ClassINET,
},
}
var err error
req.Question[0].Name, err = dns.ReverseAddr(ip)
if err != nil {
log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
return ""
}
resp, err := config.dnsctx.upstream.Exchange(&req)
if err != nil {
log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
return ""
}
if len(resp.Answer) != 1 {
log.Debug("No answer for rDNS lookup of %s", ip)
return ""
}
ptr, ok := resp.Answer[0].(*dns.PTR)
if !ok {
log.Error("not a PTR response for %s", ip)
return ""
}
log.Tracef("PTR response for %s: %s", ip, ptr.String())
if strings.HasSuffix(ptr.Ptr, ".") {
ptr.Ptr = ptr.Ptr[:len(ptr.Ptr)-1]
}
return ptr.Ptr
}
// Wait for a signal and then synchronously resolve hostname by IP address
// Add the hostname:IP pair to "Clients" array
func asyncRDNSLoop() {
for {
var ip string
ip = <-config.dnsctx.rdnsChannel
host := resolveRDNS(ip)
if len(host) == 0 {
continue
}
config.dnsctx.rdnsLock.Lock()
delete(config.dnsctx.rdnsIP, ip)
config.dnsctx.rdnsLock.Unlock()
_, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
}
}
</s> add </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add </s> remove "time"
</s> add </s> remove "strings"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f | home/dns.go |
<mask> func isRunning() bool {
<mask> return config.dnsServer != nil && config.dnsServer.IsRunning()
<mask> }
<mask>
<mask> func beginAsyncRDNS(ip string) {
<mask> if config.clients.Exists(ip) {
<mask> return
<mask> }
<mask>
<mask> // add IP to rdnsIP, if not exists
<mask> config.dnsctx.rdnsLock.Lock()
<mask> defer config.dnsctx.rdnsLock.Unlock()
<mask> _, ok := config.dnsctx.rdnsIP[ip]
<mask> if ok {
<mask> return
<mask> }
<mask> config.dnsctx.rdnsIP[ip] = true
<mask>
<mask> log.Tracef("Adding %s for rDNS resolve", ip)
<mask> select {
<mask> case config.dnsctx.rdnsChannel <- ip:
<mask> //
<mask> default:
<mask> log.Tracef("rDNS queue is full")
<mask> }
<mask> }
<mask>
<mask> // Use rDNS to get hostname by IP address
<mask> func resolveRDNS(ip string) string {
<mask> log.Tracef("Resolving host for %s", ip)
<mask>
<mask> req := dns.Msg{}
<mask> req.Id = dns.Id()
<mask> req.RecursionDesired = true
<mask> req.Question = []dns.Question{
<mask> {
<mask> Qtype: dns.TypePTR,
<mask> Qclass: dns.ClassINET,
<mask> },
<mask> }
<mask> var err error
<mask> req.Question[0].Name, err = dns.ReverseAddr(ip)
<mask> if err != nil {
<mask> log.Debug("Error while calling dns.ReverseAddr(%s): %s", ip, err)
<mask> return ""
<mask> }
<mask>
<mask> resp, err := config.dnsctx.upstream.Exchange(&req)
<mask> if err != nil {
<mask> log.Error("Error while making an rDNS lookup for %s: %s", ip, err)
<mask> return ""
<mask> }
<mask> if len(resp.Answer) != 1 {
<mask> log.Debug("No answer for rDNS lookup of %s", ip)
<mask> return ""
<mask> }
<mask> ptr, ok := resp.Answer[0].(*dns.PTR)
<mask> if !ok {
<mask> log.Error("not a PTR response for %s", ip)
<mask> return ""
<mask> }
<mask>
<mask> log.Tracef("PTR response for %s: %s", ip, ptr.String())
<mask> if strings.HasSuffix(ptr.Ptr, ".") {
<mask> ptr.Ptr = ptr.Ptr[:len(ptr.Ptr)-1]
<mask> }
<mask>
<mask> return ptr.Ptr
<mask> }
<mask>
<mask> // Wait for a signal and then synchronously resolve hostname by IP address
<mask> // Add the hostname:IP pair to "Clients" array
<mask> func asyncRDNSLoop() {
<mask> for {
<mask> var ip string
<mask> ip = <-config.dnsctx.rdnsChannel
<mask>
<mask> host := resolveRDNS(ip)
<mask> if len(host) == 0 {
<mask> continue
<mask> }
<mask>
<mask> config.dnsctx.rdnsLock.Lock()
<mask> delete(config.dnsctx.rdnsIP, ip)
<mask> config.dnsctx.rdnsLock.Unlock()
<mask>
<mask> _, _ = config.clients.AddHost(ip, host, ClientSourceRDNS)
<mask> }
<mask> }
<mask>
<mask> func onDNSRequest(d *proxy.DNSContext) {
<mask> qType := d.Req.Question[0].Qtype
<mask> if qType != dns.TypeA && qType != dns.TypeAAAA {
<mask> return
<mask> }
</s> * rDNS: refactor: move code to a separate file </s> remove bindhost := config.DNS.BindHost
if config.DNS.BindHost == "0.0.0.0" {
bindhost = "127.0.0.1"
}
resolverAddress := fmt.Sprintf("%s:%d", bindhost, config.DNS.Port)
opts := upstream.Options{
Timeout: rdnsTimeout,
}
config.dnsctx.upstream, err = upstream.AddressToUpstream(resolverAddress, opts)
if err != nil {
log.Error("upstream.AddressToUpstream: %s", err)
return
}
config.dnsctx.rdnsIP = make(map[string]bool)
config.dnsctx.rdnsChannel = make(chan string, 256)
go asyncRDNSLoop()
</s> add initRDNS() </s> remove const (
rdnsTimeout = 3 * time.Second // max time to wait for rDNS response
)
</s> add </s> remove "time"
</s> add </s> remove "strings"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"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",
"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",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f | home/dns.go |
|
import fi from './__locales/fi.json'; | <mask> import es from './__locales/es.json';
<mask> import fa from './__locales/fa.json';
<mask> import fr from './__locales/fr.json';
<mask> import hr from './__locales/hr.json';
<mask> import hu from './__locales/hu.json';
<mask> import id from './__locales/id.json';
<mask> import it from './__locales/it.json';
<mask> import ja from './__locales/ja.json';
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove en: {
translation: en,
},
enUS: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-hk': {
translation: zhHK,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
be: {
translation: be,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
hu: {
translation: hu,
},
fa: {
translation: fa,
},
th: {
translation: th,
},
ro: {
translation: ro,
},
'si-lk': {
translation: siLk,
},
</s> add be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, </s> remove // TODO(a.garipov): Get rid of a global variable?
</s> add // TODO(a.garipov): Get rid of a global or generate from .twosky.json. | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | client/src/i18n.js |
import uk from './__locales/uk.json'; | <mask> import th from './__locales/th.json';
<mask> import tr from './__locales/tr.json';
<mask> import vi from './__locales/vi.json';
<mask> import zhCN from './__locales/zh-cn.json';
<mask> import zhHK from './__locales/zh-hk.json';
<mask> import zhTW from './__locales/zh-tw.json';
<mask> import { setHtmlLangAttr } from './helpers/helpers';
<mask>
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove en: {
translation: en,
},
enUS: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-hk': {
translation: zhHK,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
be: {
translation: be,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
hu: {
translation: hu,
},
fa: {
translation: fa,
},
th: {
translation: th,
},
ro: {
translation: ro,
},
'si-lk': {
translation: siLk,
},
</s> add be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, </s> remove // TODO(a.garipov): Get rid of a global variable?
</s> add // TODO(a.garipov): Get rid of a global or generate from .twosky.json. | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | client/src/i18n.js |
be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, | <mask> import zhTW from './__locales/zh-tw.json';
<mask> import { setHtmlLangAttr } from './helpers/helpers';
<mask>
<mask> const resources = {
<mask> en: {
<mask> translation: en,
<mask> },
<mask> enUS: {
<mask> translation: en,
<mask> },
<mask> vi: {
<mask> translation: vi,
<mask> },
<mask> ru: {
<mask> translation: ru,
<mask> },
<mask> es: {
<mask> translation: es,
<mask> },
<mask> fr: {
<mask> translation: fr,
<mask> },
<mask> ja: {
<mask> translation: ja,
<mask> },
<mask> sv: {
<mask> translation: sv,
<mask> },
<mask> 'pt-br': {
<mask> translation: ptBR,
<mask> },
<mask> 'zh-hk': {
<mask> translation: zhHK,
<mask> },
<mask> 'zh-tw': {
<mask> translation: zhTW,
<mask> },
<mask> bg: {
<mask> translation: bg,
<mask> },
<mask> be: {
<mask> translation: be,
<mask> },
<mask> 'zh-cn': {
<mask> translation: zhCN,
<mask> },
<mask> cs: {
<mask> translation: cs,
<mask> },
<mask> da: {
<mask> translation: da,
<mask> },
<mask> de: {
<mask> translation: de,
<mask> },
<mask> id: {
<mask> translation: id,
<mask> },
<mask> it: {
<mask> translation: it,
<mask> },
<mask> ko: {
<mask> translation: ko,
<mask> },
<mask> no: {
<mask> translation: no,
<mask> },
<mask> nl: {
<mask> translation: nl,
<mask> },
<mask> pl: {
<mask> translation: pl,
<mask> },
<mask> 'pt-pt': {
<mask> translation: ptPT,
<mask> },
<mask> sk: {
<mask> translation: sk,
<mask> },
<mask> sl: {
<mask> translation: sl,
<mask> },
<mask> tr: {
<mask> translation: tr,
<mask> },
<mask> 'sr-cs': {
<mask> translation: srCS,
<mask> },
<mask> hr: {
<mask> translation: hr,
<mask> },
<mask> hu: {
<mask> translation: hu,
<mask> },
<mask> fa: {
<mask> translation: fa,
<mask> },
<mask> th: {
<mask> translation: th,
<mask> },
<mask> ro: {
<mask> translation: ro,
<mask> },
<mask> 'si-lk': {
<mask> translation: siLk,
<mask> },
<mask> };
<mask>
<mask> const availableLanguages = Object.keys(LANGUAGES);
<mask>
<mask> i18n
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove // TODO(a.garipov): Get rid of a global variable?
</s> add // TODO(a.garipov): Get rid of a global or generate from .twosky.json. | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"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",
"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",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | client/src/i18n.js |
// TODO(a.garipov): Get rid of a global or generate from .twosky.json. | <mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/stringutil"
<mask> )
<mask>
<mask> // TODO(a.garipov): Get rid of a global variable?
<mask> var allowedLanguages = stringutil.NewSet(
<mask> "be",
<mask> "bg",
<mask> "cs",
<mask> "da",
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove en: {
translation: en,
},
enUS: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-hk': {
translation: zhHK,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
be: {
translation: be,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
hu: {
translation: hu,
},
fa: {
translation: fa,
},
th: {
translation: th,
},
ro: {
translation: ro,
},
'si-lk': {
translation: siLk,
},
</s> add be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | internal/home/i18n.go |
"fi", | <mask> "es",
<mask> "fa",
<mask> "fr",
<mask> "hr",
<mask> "hu",
<mask> "id",
<mask> "it",
<mask> "ja",
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove // TODO(a.garipov): Get rid of a global variable?
</s> add // TODO(a.garipov): Get rid of a global or generate from .twosky.json. </s> remove en: {
translation: en,
},
enUS: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-hk': {
translation: zhHK,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
be: {
translation: be,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
hu: {
translation: hu,
},
fa: {
translation: fa,
},
th: {
translation: th,
},
ro: {
translation: ro,
},
'si-lk': {
translation: siLk,
},
</s> add be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | internal/home/i18n.go |
"uk", | <mask> "sv",
<mask> "th",
<mask> "tr",
<mask> "vi",
<mask> "zh-cn",
<mask> "zh-hk",
<mask> "zh-tw",
<mask> )
</s> Pull request: client: add fi, uk locales
Merge in DNS/adguard-home from add-fi-uk to master
Squashed commit of the following:
commit eb293912036ddb4f209827f3e3f87e849c402c6c
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:26:35 2021 +0300
client: fix locale selection
commit 077b7ede31dd6ec0a154d38b32d40a3dd39ba383
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 15 14:10:55 2021 +0300
client: add fi, uk locales </s> remove // TODO(a.garipov): Get rid of a global variable?
</s> add // TODO(a.garipov): Get rid of a global or generate from .twosky.json. </s> remove en: {
translation: en,
},
enUS: {
translation: en,
},
vi: {
translation: vi,
},
ru: {
translation: ru,
},
es: {
translation: es,
},
fr: {
translation: fr,
},
ja: {
translation: ja,
},
sv: {
translation: sv,
},
'pt-br': {
translation: ptBR,
},
'zh-hk': {
translation: zhHK,
},
'zh-tw': {
translation: zhTW,
},
bg: {
translation: bg,
},
be: {
translation: be,
},
'zh-cn': {
translation: zhCN,
},
cs: {
translation: cs,
},
da: {
translation: da,
},
de: {
translation: de,
},
id: {
translation: id,
},
it: {
translation: it,
},
ko: {
translation: ko,
},
no: {
translation: no,
},
nl: {
translation: nl,
},
pl: {
translation: pl,
},
'pt-pt': {
translation: ptPT,
},
sk: {
translation: sk,
},
sl: {
translation: sl,
},
tr: {
translation: tr,
},
'sr-cs': {
translation: srCS,
},
hr: {
translation: hr,
},
hu: {
translation: hu,
},
fa: {
translation: fa,
},
th: {
translation: th,
},
ro: {
translation: ro,
},
'si-lk': {
translation: siLk,
},
</s> add be: { translation: be },
bg: { translation: bg },
cs: { translation: cs },
da: { translation: da },
de: { translation: de },
en: { translation: en },
'en-us': { translation: en },
es: { translation: es },
fa: { translation: fa },
fi: { translation: fi },
fr: { translation: fr },
hr: { translation: hr },
hu: { translation: hu },
id: { translation: id },
it: { translation: it },
ja: { translation: ja },
ko: { translation: ko },
nl: { translation: nl },
no: { translation: no },
pl: { translation: pl },
'pt-br': { translation: ptBR },
'pt-pt': { translation: ptPT },
ro: { translation: ro },
ru: { translation: ru },
'si-lk': { translation: siLk },
sk: { translation: sk },
sl: { translation: sl },
'sr-cs': { translation: srCS },
sv: { translation: sv },
th: { translation: th },
tr: { translation: tr },
uk: { translation: uk },
vi: { translation: vi },
'zh-cn': { translation: zhCN },
'zh-hk': { translation: zhHK },
'zh-tw': { translation: zhTW }, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec | internal/home/i18n.go |
{warning_validation &&
<div className="col-12">
<p className="text-danger">
{warning_validation}
</p>
</div>
} | <mask> }
<mask> </div>
<mask> </div>
<mask> </div>
<mask> <div className="col-12">
<mask> <p className="text-danger">
<mask> {
<mask> (certificateChain || privateKey)
<mask> && warning_validation
<mask> && warning_validation
<mask> }
<mask> </p>
<mask> </div>
<mask> </div>
<mask>
<mask> <div className="btn-list mt-2">
<mask> <button
<mask> type="submit"
</s> Fix empty values on validate </s> remove ...payload,
</s> add ...values,
issuer,
key_type,
not_after,
not_before,
subject,
warning_validation,
dns_names, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4 | client/src/components/Settings/Encryption/Form.js |
const {
issuer = '',
key_type = '',
not_after = '',
not_before = '',
subject = '',
warning_validation = '',
dns_names = '',
...values
} = payload;
| <mask>
<mask> [actions.validateTlsConfigRequest]: state => ({ ...state, processingValidate: true }),
<mask> [actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }),
<mask> [actions.validateTlsConfigSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> ...values,
<mask> issuer,
<mask> key_type,
<mask> not_after,
</s> Fix empty values on validate </s> remove ...payload,
</s> add ...values,
issuer,
key_type,
not_after,
not_before,
subject,
warning_validation,
dns_names, </s> remove <div className="col-12">
<p className="text-danger">
{
(certificateChain || privateKey)
&& warning_validation
&& warning_validation
}
</p>
</div>
</s> add {warning_validation &&
<div className="col-12">
<p className="text-danger">
{warning_validation}
</p>
</div>
} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4 | client/src/reducers/encryption.js |
...values,
issuer,
key_type,
not_after,
not_before,
subject,
warning_validation,
dns_names, | <mask> [actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }),
<mask> [actions.validateTlsConfigSuccess]: (state, { payload }) => {
<mask> const newState = {
<mask> ...state,
<mask> ...payload,
<mask> processingValidate: false,
<mask> };
<mask> return newState;
<mask> },
<mask> }, {
</s> Fix empty values on validate </s> remove <div className="col-12">
<p className="text-danger">
{
(certificateChain || privateKey)
&& warning_validation
&& warning_validation
}
</p>
</div>
</s> add {warning_validation &&
<div className="col-12">
<p className="text-danger">
{warning_validation}
</p>
</div>
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4 | client/src/reducers/encryption.js |
// InterfaceByIP returns the name of the interface bound to ip. | <mask>
<mask> return netIfaces, nil
<mask> }
<mask>
<mask> // GetInterfaceByIP returns the name of interface containing provided ip.
<mask> //
<mask> // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
<mask> func GetInterfaceByIP(ip net.IP) string {
<mask> ifaces, err := GetValidNetInterfacesForWeb()
<mask> if err != nil {
</s> Pull request: upd-websvc
Merge in DNS/adguard-home from upd-websvc to master
Squashed commit of the following:
commit 30d6a2dc5083efd91479bcbe20f03c37baddbf94
Author: Ainar Garipov <[email protected]>
Date: Tue Aug 9 18:55:42 2022 +0300
all: upd openapi, websvc </s> remove // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
func GetInterfaceByIP(ip net.IP) string {
</s> add // TODO(a.garipov, e.burkov): This function is technically incorrect, since one
// IP address can be shared by multiple interfaces in some configurations.
//
// TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb.
func InterfaceByIP(ip net.IP) (ifaceName string) { </s> remove // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
</s> add // TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb. </s> remove func TestGetInterfaceByIP(t *testing.T) {
</s> add func TestInterfaceByIP(t *testing.T) { </s> remove "github.com/AdguardTeam/golibs/netutil"
</s> add </s> remove interfaceName := aghnet.GetInterfaceByIP(ip)
</s> add interfaceName := aghnet.InterfaceByIP(ip) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593 | internal/aghnet/net.go |
// TODO(a.garipov, e.burkov): This function is technically incorrect, since one
// IP address can be shared by multiple interfaces in some configurations.
//
// TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb.
func InterfaceByIP(ip net.IP) (ifaceName string) { | <mask> }
<mask>
<mask> // GetInterfaceByIP returns the name of interface containing provided ip.
<mask> //
<mask> // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
<mask> func GetInterfaceByIP(ip net.IP) string {
<mask> ifaces, err := GetValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> return ""
<mask> }
<mask>
</s> Pull request: upd-websvc
Merge in DNS/adguard-home from upd-websvc to master
Squashed commit of the following:
commit 30d6a2dc5083efd91479bcbe20f03c37baddbf94
Author: Ainar Garipov <[email protected]>
Date: Tue Aug 9 18:55:42 2022 +0300
all: upd openapi, websvc </s> remove // GetInterfaceByIP returns the name of interface containing provided ip.
</s> add // InterfaceByIP returns the name of the interface bound to ip. </s> remove // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
</s> add // TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb. </s> remove func TestGetInterfaceByIP(t *testing.T) {
</s> add func TestInterfaceByIP(t *testing.T) { </s> remove "github.com/AdguardTeam/golibs/netutil"
</s> add </s> remove ifaceName := GetInterfaceByIP(ip)
</s> add ifaceName := InterfaceByIP(ip) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593 | internal/aghnet/net.go |
// TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb. | <mask>
<mask> // GetSubnet returns pointer to net.IPNet for the specified interface or nil if
<mask> // the search fails.
<mask> //
<mask> // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
<mask> func GetSubnet(ifaceName string) *net.IPNet {
<mask> netIfaces, err := GetValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> log.Error("Could not get network interfaces info: %v", err)
<mask> return nil
</s> Pull request: upd-websvc
Merge in DNS/adguard-home from upd-websvc to master
Squashed commit of the following:
commit 30d6a2dc5083efd91479bcbe20f03c37baddbf94
Author: Ainar Garipov <[email protected]>
Date: Tue Aug 9 18:55:42 2022 +0300
all: upd openapi, websvc </s> remove // GetInterfaceByIP returns the name of interface containing provided ip.
</s> add // InterfaceByIP returns the name of the interface bound to ip. </s> remove // TODO(e.burkov): See TODO on GetValidInterfacesForWeb.
func GetInterfaceByIP(ip net.IP) string {
</s> add // TODO(a.garipov, e.burkov): This function is technically incorrect, since one
// IP address can be shared by multiple interfaces in some configurations.
//
// TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb.
func InterfaceByIP(ip net.IP) (ifaceName string) { </s> remove func TestGetInterfaceByIP(t *testing.T) {
</s> add func TestInterfaceByIP(t *testing.T) { </s> remove interfaceName := aghnet.GetInterfaceByIP(ip)
</s> add interfaceName := aghnet.InterfaceByIP(ip) </s> remove Addresses []*netutil.IPPort
</s> add Addresses []netip.AddrPort | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593 | internal/aghnet/net.go |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.