code_before
stringlengths
16
1.81M
edits
stringlengths
4
328k
next_edit
stringlengths
0
76.5k
code_after
stringlengths
3
49.9M
label_window
listlengths
4
1.81k
instruction
stringlengths
20
51.9k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
// To transfer information between modules type dnsContext struct { proxyCtx *proxy.DNSContext // setts are the filtering settings for the client. setts *filtering.Settings
</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
// // TODO(s.chzhen): Add lowercased, non-FQDN version of the hostname from the // question of the request.
// To transfer information between modules // // TODO(s.chzhen): Add lowercased, non-FQDN version of the hostname from the // question of the request. type dnsContext struct { proxyCtx *proxy.DNSContext // setts are the filtering settings for the client. setts *filtering.Settings
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/dns.go
shouldLog := true msg := pctx.Req // don't log ANY request if refuseAny is enabled if q.Qtype == dns.TypeANY && s.conf.RefuseAny { shouldLog = false }
</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) {
q := msg.Question[0] host := strings.ToLower(strings.TrimSuffix(q.Name, "."))
shouldLog := true msg := pctx.Req q := msg.Question[0] host := strings.ToLower(strings.TrimSuffix(q.Name, ".")) // don't log ANY request if refuseAny is enabled if q.Qtype == dns.TypeANY && s.conf.RefuseAny { shouldLog = false }
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats.go
shouldLog := true msg := pctx.Req // don't log ANY request if refuseAny is enabled if len(msg.Question) >= 1 && msg.Question[0].Qtype == dns.TypeANY && s.conf.RefuseAny { shouldLog = false } ip, _ := netutil.IPAndPortFromAddr(pctx.Addr) ip = slices.Clone(ip)
</s> remove if shouldLog && s.queryLog != nil { </s> add if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) {
if q.Qtype == dns.TypeANY && s.conf.RefuseAny {
shouldLog := true msg := pctx.Req // don't log ANY request if refuseAny is enabled if q.Qtype == dns.TypeANY && s.conf.RefuseAny { shouldLog = false } ip, _ := netutil.IPAndPortFromAddr(pctx.Addr) ip = slices.Clone(ip)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats.go
// Synchronize access to s.queryLog and s.stats so they won't be suddenly // uninitialized while in use. This can happen after proxy server has been // stopped, but its workers haven't yet exited. if shouldLog && s.queryLog != nil { s.logQuery(dctx, pctx, elapsed, ip) } if s.stats != nil { s.updateStats(dctx, elapsed, *dctx.result, ip)
</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 {
if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) {
// Synchronize access to s.queryLog and s.stats so they won't be suddenly // uninitialized while in use. This can happen after proxy server has been // stopped, but its workers haven't yet exited. if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { s.logQuery(dctx, pctx, elapsed, ip) } if s.stats != nil { s.updateStats(dctx, elapsed, *dctx.result, ip)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats.go
if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { s.logQuery(dctx, pctx, elapsed, ip) } if s.stats != nil { s.updateStats(dctx, elapsed, *dctx.result, ip) }
</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 {
} else { log.Debug("request for %s from %s ignored; not logging", host, ip)
if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) { s.logQuery(dctx, pctx, elapsed, ip) } else { log.Debug("request for %s from %s ignored; not logging", host, ip) } if s.stats != nil { s.updateStats(dctx, elapsed, *dctx.result, ip) }
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats.go
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // testQueryLog is a simple querylog.QueryLog implementation for tests. type testQueryLog struct { // QueryLog is embedded here simply to make testQueryLog // a querylog.QueryLog without actually implementing all methods. querylog.QueryLog
</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.
// testQueryLog is a simple [querylog.QueryLog] implementation for tests.
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // testQueryLog is a simple [querylog.QueryLog] implementation for tests. type testQueryLog struct { // QueryLog is embedded here simply to make testQueryLog // a querylog.QueryLog without actually implementing all methods. querylog.QueryLog
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats_test.go
// testQueryLog is a simple querylog.QueryLog implementation for tests. type testQueryLog struct { // QueryLog is embedded here simply to make testQueryLog // a querylog.QueryLog without actually implementing all methods. querylog.QueryLog lastParams *querylog.AddParams }
</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"`
// a [querylog.QueryLog] without actually implementing all methods.
// testQueryLog is a simple querylog.QueryLog implementation for tests. type testQueryLog struct { // QueryLog is embedded here simply to make testQueryLog // a [querylog.QueryLog] without actually implementing all methods. querylog.QueryLog lastParams *querylog.AddParams }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats_test.go
lastParams *querylog.AddParams } // Add implements the querylog.QueryLog interface for *testQueryLog. func (l *testQueryLog) Add(p *querylog.AddParams) { l.lastParams = p } // testStats is a simple stats.Stats implementation for tests.
</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.
// Add implements the [querylog.QueryLog] interface for *testQueryLog.
lastParams *querylog.AddParams } // Add implements the [querylog.QueryLog] interface for *testQueryLog. func (l *testQueryLog) Add(p *querylog.AddParams) { l.lastParams = p } // testStats is a simple stats.Stats implementation for tests.
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats_test.go
l.lastParams = p } // testStats is a simple stats.Stats implementation for tests. type testStats struct { // Stats is embedded here simply to make testStats a stats.Stats without // actually implementing all methods. stats.Interface
</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.
// ShouldLog implements the [querylog.QueryLog] interface for *testQueryLog. func (l *testQueryLog) ShouldLog(string, uint16, uint16) bool { return true }
l.lastParams = p } // ShouldLog implements the [querylog.QueryLog] interface for *testQueryLog. func (l *testQueryLog) ShouldLog(string, uint16, uint16) bool { return true } // testStats is a simple stats.Stats implementation for tests. type testStats struct { // Stats is embedded here simply to make testStats a stats.Stats without // actually implementing all methods. stats.Interface
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/dnsforward/stats_test.go
"net/netip" "os" "path/filepath" "sync" "github.com/AdguardTeam/AdGuardHome/internal/aghalg" "github.com/AdguardTeam/AdGuardHome/internal/aghtls"
</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 {
"sort"
"net/netip" "os" "path/filepath" "sort" "sync" "github.com/AdguardTeam/AdGuardHome/internal/aghalg" "github.com/AdguardTeam/AdGuardHome/internal/aghtls"
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
// TTL for a web session (in hours) // An active session is automatically refreshed once a day. WebSessionTTLHours uint32 `yaml:"web_session_ttl"` DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` // Filters reflects the filters from [filtering.Config]. It's cloned to the // config used in the filtering module at the startup. Afterwards it's // cloned from the filtering module back here. //
</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.
DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` QueryLog queryLogConfig `yaml:"querylog"`
// TTL for a web session (in hours) // An active session is automatically refreshed once a day. WebSessionTTLHours uint32 `yaml:"web_session_ttl"` DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` QueryLog queryLogConfig `yaml:"querylog"` DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` QueryLog queryLogConfig `yaml:"querylog"` // Filters reflects the filters from [filtering.Config]. It's cloned to the // config used in the filtering module at the startup. Afterwards it's // cloned from the filtering module back here. //
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
// StatsInterval is the time interval for flushing statistics to the disk in // days. StatsInterval uint32 `yaml:"statistics_interval"` // 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"` // AnonymizeClientIP defines if clients' IP addresses should be anonymized // in query log and statistics. AnonymizeClientIP bool `yaml:"anonymize_client_ip"` dnsforward.FilteringConfig `yaml:",inline"`
</s> remove DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` </s> add DNS dnsConfig `yaml:"dns"` TLS tlsConfigSettings `yaml:"tls"` QueryLog queryLogConfig `yaml:"querylog"`
// StatsInterval is the time interval for flushing statistics to the disk in // days. StatsInterval uint32 `yaml:"statistics_interval"` // AnonymizeClientIP defines if clients' IP addresses should be anonymized // in query log and statistics. AnonymizeClientIP bool `yaml:"anonymize_client_ip"` dnsforward.FilteringConfig `yaml:",inline"`
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
AuthAttempts: 5, AuthBlockMin: 15, WebSessionTTLHours: 30 * 24, DNS: dnsConfig{ BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, QueryLogEnabled: true, QueryLogFileEnabled: true, QueryLogInterval: timeutil.Duration{Duration: 90 * timeutil.Day}, QueryLogMemSize: 1000, FilteringConfig: dnsforward.FilteringConfig{ ProtectionEnabled: true, // whether or not use any of filtering features BlockingMode: dnsforward.BlockingModeDefault, BlockedResponseTTL: 10, // in seconds Ratelimit: 20,
</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
BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1,
AuthAttempts: 5, AuthBlockMin: 15, WebSessionTTLHours: 30 * 24, DNS: dnsConfig{ BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, BindHosts: []netip.Addr{netip.IPv4Unspecified()}, Port: defaultPortDNS, StatsInterval: 1, FilteringConfig: dnsforward.FilteringConfig{ ProtectionEnabled: true, // whether or not use any of filtering features BlockingMode: dnsforward.BlockingModeDefault, BlockedResponseTTL: 10, // in seconds Ratelimit: 20,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
PortHTTPS: defaultPortHTTPS, PortDNSOverTLS: defaultPortTLS, // needs to be passed through to dnsproxy PortDNSOverQUIC: defaultPortQUIC, }, // NOTE: Keep these parameters in sync with the one put into // client/src/helpers/filters/filters.js by scripts/vetted-filters. // // TODO(a.garipov): Think of a way to make scripts/vetted-filters update // these as well if necessary. Filters: []filtering.FilterYAML{{
</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"`
QueryLog: queryLogConfig{ Enabled: true, FileEnabled: true, Interval: timeutil.Duration{Duration: 90 * timeutil.Day}, MemSize: 1000, Ignored: []string{}, },
PortHTTPS: defaultPortHTTPS, PortDNSOverTLS: defaultPortTLS, // needs to be passed through to dnsproxy PortDNSOverQUIC: defaultPortQUIC, }, QueryLog: queryLogConfig{ Enabled: true, FileEnabled: true, Interval: timeutil.Duration{Duration: 90 * timeutil.Day}, MemSize: 1000, Ignored: []string{}, }, // NOTE: Keep these parameters in sync with the one put into // client/src/helpers/filters/filters.js by scripts/vetted-filters. // // TODO(a.garipov): Think of a way to make scripts/vetted-filters update // these as well if necessary. Filters: []filtering.FilterYAML{{
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
if Context.queryLog != nil { dc := querylog.Config{} Context.queryLog.WriteDiskConfig(&dc) config.DNS.QueryLogEnabled = dc.Enabled config.DNS.QueryLogFileEnabled = dc.FileEnabled config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} config.DNS.QueryLogMemSize = dc.MemSize config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP } if Context.filters != nil { Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf)
</s> remove if shouldLog && s.queryLog != nil { </s> add if shouldLog && s.queryLog != nil && s.queryLog.ShouldLog(host, q.Qtype, q.Qclass) {
if Context.queryLog != nil { dc := querylog.Config{} Context.queryLog.WriteDiskConfig(&dc) config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP } if Context.filters != nil { Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
Context.queryLog.WriteDiskConfig(&dc) config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP } if Context.filters != nil { Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf) config.Filters = config.DNS.DnsfilterConf.Filters
</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) {
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)
Context.queryLog.WriteDiskConfig(&dc) config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP 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) } if Context.filters != nil { Context.filters.WriteDiskConfig(config.DNS.DnsfilterConf) config.Filters = config.DNS.DnsfilterConf.Filters
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/config.go
"net/url" "os" "path/filepath" "github.com/AdguardTeam/AdGuardHome/internal/aghalg" "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
</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,
"strings"
"net/url" "os" "path/filepath" "strings" "github.com/AdguardTeam/AdGuardHome/internal/aghalg" "github.com/AdguardTeam/AdGuardHome/internal/aghhttp" "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/dns.go
"github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/netutil" "github.com/ameshkov/dnscrypt/v2" yaml "gopkg.in/yaml.v3" ) // Default ports.
</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.
"github.com/AdguardTeam/golibs/stringutil"
"github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/netutil" "github.com/AdguardTeam/golibs/stringutil" "github.com/ameshkov/dnscrypt/v2" yaml "gopkg.in/yaml.v3" ) // Default ports.
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/dns.go
ConfigModified: onConfigModified, HTTPRegister: httpRegister, FindClient: Context.clients.findMultiple, BaseDir: baseDir, RotationIvl: config.DNS.QueryLogInterval.Duration, MemSize: config.DNS.QueryLogMemSize, Enabled: config.DNS.QueryLogEnabled, FileEnabled: config.DNS.QueryLogFileEnabled, AnonymizeClientIP: config.DNS.AnonymizeClientIP, } Context.queryLog = querylog.New(conf) Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil)
</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
ConfigModified: onConfigModified, HTTPRegister: httpRegister, FindClient: Context.clients.findMultiple, BaseDir: baseDir, AnonymizeClientIP: config.DNS.AnonymizeClientIP, } Context.queryLog = querylog.New(conf) Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil)
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/dns.go
FindClient: Context.clients.findMultiple, BaseDir: baseDir, AnonymizeClientIP: config.DNS.AnonymizeClientIP, } Context.queryLog = querylog.New(conf) Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil) if err != nil {
</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
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)
FindClient: Context.clients.findMultiple, BaseDir: baseDir, AnonymizeClientIP: config.DNS.AnonymizeClientIP, 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) } Context.queryLog = querylog.New(conf) Context.filters, err = filtering.New(config.DNS.DnsfilterConf, nil) if err != nil {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/dns.go
yaml "gopkg.in/yaml.v3" ) // currentSchemaVersion is the current schema version. const currentSchemaVersion = 14 // These aliases are provided for convenience. type ( yarr = []any yobj = map[string]any
</s> remove // testQueryLog is a simple querylog.QueryLog implementation for tests. </s> add // testQueryLog is a simple [querylog.QueryLog] implementation for tests.
const currentSchemaVersion = 15
yaml "gopkg.in/yaml.v3" ) // currentSchemaVersion is the current schema version. const currentSchemaVersion = 15 // These aliases are provided for convenience. type ( yarr = []any yobj = map[string]any
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/upgrade.go
upgradeSchema12to13, upgradeSchema13to14, } n := 0 for i, u := range upgrades {
</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
upgradeSchema14to15,
upgradeSchema12to13, upgradeSchema13to14, upgradeSchema14to15, } n := 0 for i, u := range upgrades {
[ "keep", "add", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/home/upgrade.go
_ = l.flushLogBuffer(false) }() } }
</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
// 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) }
_ = l.flushLogBuffer(false) }() } } // 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) }
[ "keep", "keep", "keep", "add" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/qlog.go
"time" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/dnsproxy/proxyutil" "github.com/AdguardTeam/golibs/testutil" "github.com/AdguardTeam/golibs/timeutil" "github.com/miekg/dns" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )
</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
"github.com/AdguardTeam/golibs/stringutil"
"time" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/dnsproxy/proxyutil" "github.com/AdguardTeam/golibs/stringutil" "github.com/AdguardTeam/golibs/testutil" "github.com/AdguardTeam/golibs/timeutil" "github.com/miekg/dns" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" )
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/qlog_test.go
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/timeutil" "github.com/miekg/dns" ) // QueryLog - main interface type QueryLog interface {
</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.
"github.com/AdguardTeam/golibs/stringutil"
"github.com/AdguardTeam/AdGuardHome/internal/aghnet" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/AdguardTeam/golibs/errors" "github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/stringutil" "github.com/AdguardTeam/golibs/timeutil" "github.com/miekg/dns" ) // QueryLog - main interface type QueryLog interface {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/querylog.go
// WriteDiskConfig - write configuration WriteDiskConfig(c *Config) } // Config is the query log configuration structure. type Config struct { // Anonymizer processes the IP addresses to anonymize those if needed. Anonymizer *aghnet.IPMut
</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.
// ShouldLog returns true if request for the host should be logged. ShouldLog(host string, qType, qClass uint16) bool
// WriteDiskConfig - write configuration WriteDiskConfig(c *Config) // ShouldLog returns true if request for the host should be logged. ShouldLog(host string, qType, qClass uint16) bool } // Config is the query log configuration structure. type Config struct { // Anonymizer processes the IP addresses to anonymize those if needed. Anonymizer *aghnet.IPMut
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/querylog.go
// AnonymizeClientIP tells if the query log should anonymize clients' IP // addresses. AnonymizeClientIP bool } // AddParams is the parameters for adding an entry. type AddParams struct { Question *dns.Msg
</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
// Ignored is the list of host names, which are should not be written // to log. Ignored *stringutil.Set
// AnonymizeClientIP tells if the query log should anonymize clients' IP // addresses. AnonymizeClientIP bool // Ignored is the list of host names, which are should not be written // to log. Ignored *stringutil.Set } // AddParams is the parameters for adding an entry. type AddParams struct { Question *dns.Msg
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/querylog.go
e = &logEntry{} decodeLogEntry(e, line) e.client, err = l.client(e.ClientID, e.IP.String(), cache) if err != nil { log.Error( "querylog: enriching file record at time %s for client %q (clientid %q): %s",
</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
if l.isIgnored(e.QHost) { return nil, ts, nil }
e = &logEntry{} decodeLogEntry(e, line) if l.isIgnored(e.QHost) { return nil, ts, nil } e.client, err = l.client(e.ClientID, e.IP.String(), cache) if err != nil { log.Error( "querylog: enriching file record at time %s for client %q (clientid %q): %s",
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4baa6e699068d1aca2f11a88ebfb9094e6b218b3
internal/querylog/search.go
// processes both A/AAAA and PTR DNS requests for those. type HostsContainer struct { // requestMatcher matches the requests and translates the rules. It's // embedded to implement MatchRequest and Translate for *HostsContainer. requestMatcher // done is the channel to sign closing the container. done chan struct{}
</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)
// // TODO(a.garipov, e.burkov): Consider fully merging into HostsContainer.
// processes both A/AAAA and PTR DNS requests for those. type HostsContainer struct { // requestMatcher matches the requests and translates the rules. It's // embedded to implement MatchRequest and Translate for *HostsContainer. // // TODO(a.garipov, e.burkov): Consider fully merging into HostsContainer. requestMatcher // done is the channel to sign closing the container. done chan struct{}
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
// requestMatcher matches the requests and translates the rules. It's // embedded to implement MatchRequest and Translate for *HostsContainer. requestMatcher // listID is the identifier for the list of generated rules. listID int // done is the channel to sign closing the container. done chan struct{} // updates is the channel for receiving updated hosts. updates chan *netutil.IPMap
</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)
// requestMatcher matches the requests and translates the rules. It's // embedded to implement MatchRequest and Translate for *HostsContainer. requestMatcher // done is the channel to sign closing the container. done chan struct{} // updates is the channel for receiving updated hosts. updates chan *netutil.IPMap
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
w aghos.FSWatcher // patterns stores specified paths in the fs.Glob-compatible form. patterns []string } // ErrNoHostsPaths is returned when there are no valid paths to watch passed to // the HostsContainer. const ErrNoHostsPaths errors.Error = "no valid paths to hosts files provided"
</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)
// listID is the identifier for the list of generated rules. listID int
w aghos.FSWatcher // patterns stores specified paths in the fs.Glob-compatible form. patterns []string // listID is the identifier for the list of generated rules. listID int } // ErrNoHostsPaths is returned when there are no valid paths to watch passed to // the HostsContainer. const ErrNoHostsPaths errors.Error = "no valid paths to hosts files provided"
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
) (patterns []string, cont bool, err error) { s := bufio.NewScanner(r) for s.Scan() { ip, hosts := hp.parseLine(s.Text()) if ip == nil { continue } hp.addPairs(ip, hosts) }
</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
if ip == nil || len(hosts) == 0 {
) (patterns []string, cont bool, err error) { s := bufio.NewScanner(r) for s.Scan() { ip, hosts := hp.parseLine(s.Text()) if ip == nil || len(hosts) == 0 { continue } hp.addPairs(ip, hosts) }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
return nil, nil } for _, f := range fields[1:] { switch hashIdx := strings.IndexByte(f, '#'); hashIdx { case -1: hosts = append(hosts, f) continue case 0: // Go on. default:
</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)
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)
return nil, nil } for _, f := range fields[1:] { 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) 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) 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) continue case 0: // Go on. default:
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
case -1: hosts = append(hosts, f) continue case 0: // Go on. default: // Only a part of the field is a comment. hosts = append(hosts, f[:hashIdx]) } // The rest of the fields are a part of the comment so skip // immediately. break
</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
case -1: hosts = append(hosts, f) continue } // The rest of the fields are a part of the comment so skip // immediately. break
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
// Only a part of the field is a comment. hosts = append(hosts, f[:hashIdx]) } // The rest of the fields are a part of the comment so skip // immediately. break } return ip, hosts }
</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
hosts = append(hosts, f)
// Only a part of the field is a comment. hosts = append(hosts, f[:hashIdx]) } hosts = append(hosts, f) hosts = append(hosts, f) hosts = append(hosts, f) } return ip, hosts }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/hostscontainer.go
# See https://github.com/AdguardTeam/AdGuardHome/issues/3846. 1.0.0.2 a.whole lot.of aliases for.testing # Same for IPv6. ::1 simplehost :: hello hello.world ::2 a.whole lot.of aliases for.testing
</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 {
# See https://github.com/AdguardTeam/AdGuardHome/issues/3946. 1.0.0.3 * 1.0.0.4 *.com
# See https://github.com/AdguardTeam/AdGuardHome/issues/3846. 1.0.0.2 a.whole lot.of aliases for.testing # See https://github.com/AdguardTeam/AdGuardHome/issues/3946. 1.0.0.3 * 1.0.0.4 *.com # Same for IPv6. ::1 simplehost :: hello hello.world ::2 a.whole lot.of aliases for.testing
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4be69d35eb276266b846a8a01481894f35d244dd
internal/aghnet/testdata/etc_hosts
"react": { "pragma": "React", "version": "16.4" } }, "rules": {
</s> remove "dev": true </s> add "dev": true, "optional": true
}, "import/resolver": { "webpack": { "config": "webpack.common.js" }
"react": { "pragma": "React", "version": "16.4" }, "import/resolver": { "webpack": { "config": "webpack.common.js" } } }, "rules": {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/.eslintrc
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
</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
"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 },
"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, "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 }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "ansi-regex": { "version": "2.1.1", "bundled": true, "dev": true }, "aproba": { "version": "1.2.0", "bundled": true, "dev": 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
"dev": true, "optional": true
}, "ansi-regex": { "version": "2.1.1", "bundled": true, "dev": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "balanced-match": { "version": "1.0.0", "bundled": true, "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": 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
"dev": true, "optional": true
}, "balanced-match": { "version": "1.0.0", "bundled": true, "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"version": "1.1.11", "bundled": true, "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" }
</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
"optional": true,
"version": "1.1.11", "bundled": true, "dev": true, "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" }
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "code-point-at": { "version": "1.1.0", "bundled": true, "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "code-point-at": { "version": "1.1.0", "bundled": true, "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, "dev": true
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "concat-map": { "version": "0.0.1", "bundled": true, "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "concat-map": { "version": "0.0.1", "bundled": true, "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, "dev": true
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "console-control-strings": { "version": "1.1.0", "bundled": true, "dev": true }, "core-util-is": { "version": "1.0.2", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "console-control-strings": { "version": "1.1.0", "bundled": true, "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "inherits": { "version": "2.0.3", "bundled": true, "dev": true }, "ini": { "version": "1.3.5", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "inherits": { "version": "2.0.3", "bundled": true, "dev": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"version": "1.0.0", "bundled": true, "dev": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": {
</s> remove "dev": true </s> add "dev": true, "optional": true </s> remove "dev": true </s> add "dev": true, "optional": true
"optional": true,
"version": "1.0.0", "bundled": true, "dev": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"version": "3.0.4", "bundled": true, "dev": true, "requires": { "brace-expansion": "^1.1.7" } },
</s> remove "dev": true </s> add "dev": true, "optional": true
"optional": true,
"version": "3.0.4", "bundled": true, "dev": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } },
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "minimist": { "version": "0.0.8", "bundled": true, "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": 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
"dev": true, "optional": true
}, "minimist": { "version": "0.0.8", "bundled": true, "dev": true, "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"version": "2.3.5", "bundled": true, "dev": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } },
</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
"optional": true,
"version": "2.3.5", "bundled": true, "dev": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } },
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.1.1",
</s> remove "dev": true </s> add "dev": true, "optional": true </s> remove "dev": true </s> add "dev": true, "optional": true
"optional": true,
"mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.1.1",
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "number-is-nan": { "version": "1.0.1", "bundled": true, "dev": true }, "object-assign": { "version": "4.1.1", "bundled": true, "dev": 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
"dev": true, "optional": true
}, "number-is-nan": { "version": "1.0.1", "bundled": true, "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"once": { "version": "1.4.0", "bundled": true, "dev": true, "requires": { "wrappy": "1" } }, "os-homedir": {
</s> remove "dev": true </s> add "dev": true, "optional": true
"optional": true,
"once": { "version": "1.4.0", "bundled": true, "dev": true, "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "safe-buffer": { "version": "5.1.2", "bundled": true, "dev": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "safe-buffer": { "version": "5.1.2", "bundled": true, "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, "dev": true,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"string-width": { "version": "1.0.2", "bundled": true, "dev": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0"
</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
"optional": true,
"string-width": { "version": "1.0.2", "bundled": true, "dev": true, "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0"
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"bundled": true, "dev": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1",
</s> remove "dev": true </s> add "dev": true, "optional": true
"optional": true,
"bundled": true, "dev": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1",
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "wrappy": { "version": "1.0.2", "bundled": true, "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, "dev": 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 </s> remove "dev": true </s> add "dev": true, "optional": true
"dev": true, "optional": true
}, "wrappy": { "version": "1.0.2", "bundled": true, "dev": true, "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, "dev": true
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
}, "yallist": { "version": "3.0.3", "bundled": true, "dev": true } } }, "function-bind": { "version": "1.1.1",
</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
"dev": true, "optional": true
}, "yallist": { "version": "3.0.3", "bundled": true, "dev": true, "optional": true } } }, "function-bind": { "version": "1.1.1",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package-lock.json
"date-fns": "^1.29.0", "i18next": "^12.0.0", "i18next-browser-languagedetector": "^2.2.3", "lodash": "^4.17.15", "nanoid": "^1.2.3", "prop-types": "^15.7.2", "react": "^16.4.0", "react-click-outside": "^3.0.1",
</s> remove "dev": true </s> add "dev": true, "optional": true </s> remove "dev": true </s> add "dev": true, "optional": true
"i18next-xhr-backend": "^3.2.2",
"date-fns": "^1.29.0", "i18next": "^12.0.0", "i18next-browser-languagedetector": "^2.2.3", "i18next-xhr-backend": "^3.2.2", "lodash": "^4.17.15", "nanoid": "^1.2.3", "prop-types": "^15.7.2", "react": "^16.4.0", "react-click-outside": "^3.0.1",
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/package.json
import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { Trans, withNamespaces } from 'react-i18next'; import { REPOSITORY, LANGUAGES, PRIVACY_POLICY_LINK } from '../../helpers/constants'; import i18n from '../../i18n'; import Version from './Version'; import './Footer.css'; import './Select.css';
</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);
import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants'; import { LANGUAGES } from '../../helpers/twosky';
import React, { Component, Fragment } from 'react'; import PropTypes from 'prop-types'; import { Trans, withNamespaces } from 'react-i18next'; import { REPOSITORY, PRIVACY_POLICY_LINK } from '../../helpers/constants'; import { LANGUAGES } from '../../helpers/twosky'; import i18n from '../../i18n'; import Version from './Version'; import './Footer.css'; import './Select.css';
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/components/ui/Footer.js
className="form-control select select--language" value={i18n.language} onChange={this.changeLanguage} > {LANGUAGES.map(language => ( <option key={language.key} value={language.key}> {language.name} </option> ))} </select> </div> </div>
</s> remove i18n.changeLanguage(DEFAULT_LANGUAGE); </s> add i18n.changeLanguage(BASE_LOCALE); </s> remove "dev": true </s> add "dev": true, "optional": true
{Object.keys(LANGUAGES).map(lang => ( <option key={lang} value={lang}> {LANGUAGES[lang]}
className="form-control select select--language" value={i18n.language} onChange={this.changeLanguage} > {Object.keys(LANGUAGES).map(lang => ( <option key={lang} value={lang}> {LANGUAGES[lang]} {Object.keys(LANGUAGES).map(lang => ( <option key={lang} value={lang}> {LANGUAGES[lang]} {Object.keys(LANGUAGES).map(lang => ( <option key={lang} value={lang}> {LANGUAGES[lang]} </option> ))} </select> </div> </div>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/components/ui/Footer.js
import i18n from 'i18next'; import { reactI18nextModule } from 'react-i18next'; import { initReactI18n } from 'react-i18next/hooks'; import langDetect from 'i18next-browser-languagedetector'; import { LANGUAGES, BASE_LOCALE } from './helpers/twosky';
</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);
import XHR from 'i18next-xhr-backend';
import i18n from 'i18next'; import XHR from 'i18next-xhr-backend'; import { reactI18nextModule } from 'react-i18next'; import { initReactI18n } from 'react-i18next/hooks'; import langDetect from 'i18next-browser-languagedetector'; import { LANGUAGES, BASE_LOCALE } from './helpers/twosky';
[ "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
import { reactI18nextModule } from 'react-i18next'; import { initReactI18n } from 'react-i18next/hooks'; import langDetect from 'i18next-browser-languagedetector'; import { DEFAULT_LANGUAGE } from './helpers/constants'; import vi from './__locales/vi.json'; import en from './__locales/en.json'; import ru from './__locales/ru.json'; import es from './__locales/es.json';
</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);
import { LANGUAGES, BASE_LOCALE } from './helpers/twosky';
import { reactI18nextModule } from 'react-i18next'; import { initReactI18n } from 'react-i18next/hooks'; import langDetect from 'i18next-browser-languagedetector'; import { LANGUAGES, BASE_LOCALE } from './helpers/twosky'; import vi from './__locales/vi.json'; import en from './__locales/en.json'; import ru from './__locales/ru.json'; import es from './__locales/es.json';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
import langDetect from 'i18next-browser-languagedetector'; import { DEFAULT_LANGUAGE } from './helpers/constants'; 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); i18n .use(langDetect) .use(initReactI18n) .use(reactI18nextModule)
</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';
const availableLanguages = Object.keys(LANGUAGES);
import langDetect from 'i18next-browser-languagedetector'; import { DEFAULT_LANGUAGE } from './helpers/constants'; const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); const availableLanguages = Object.keys(LANGUAGES); i18n .use(langDetect) .use(initReactI18n) .use(reactI18nextModule)
[ "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" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
const availableLanguages = Object.keys(LANGUAGES); i18n .use(langDetect) .use(initReactI18n) .use(reactI18nextModule) .init({ lowerCaseLng: true, fallbackLng: BASE_LOCALE, keySeparator: false,
</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(['**/*.*'], {
.use(XHR)
const availableLanguages = Object.keys(LANGUAGES); i18n .use(langDetect) .use(XHR) .use(initReactI18n) .use(reactI18nextModule) .init({ lowerCaseLng: true, fallbackLng: BASE_LOCALE, keySeparator: false,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
.use(langDetect) .use(initReactI18n) .use(reactI18nextModule) .init({ resources, lowerCaseLng: true, fallbackLng: DEFAULT_LANGUAGE, keySeparator: false, nsSeparator: false, returnEmptyString: false,
</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
.use(langDetect) .use(initReactI18n) .use(reactI18nextModule) .init({ lowerCaseLng: true, fallbackLng: DEFAULT_LANGUAGE, keySeparator: false, nsSeparator: false, returnEmptyString: false,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
.use(reactI18nextModule) .init({ resources, lowerCaseLng: true, fallbackLng: DEFAULT_LANGUAGE, keySeparator: false, nsSeparator: false, returnEmptyString: false, interpolation: { escapeValue: false,
</s> remove resources, </s> add </s> remove new CleanWebpackPlugin(['*.*'], { </s> add new CleanWebpackPlugin(['**/*.*'], {
fallbackLng: BASE_LOCALE,
.use(reactI18nextModule) .init({ resources, lowerCaseLng: true, fallbackLng: BASE_LOCALE, keySeparator: false, nsSeparator: false, returnEmptyString: false, interpolation: { escapeValue: false,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
wait: true, }, }, () => { if (!availableLanguages.includes(i18n.language)) { i18n.changeLanguage(BASE_LOCALE); } });
</s> remove i18n.changeLanguage(DEFAULT_LANGUAGE); </s> add i18n.changeLanguage(BASE_LOCALE); </s> remove "dev": true </s> add "dev": true, "optional": true
whitelist: availableLanguages, backend: { loadPath: '/__locales/{{lng}}.json', },
wait: true, }, whitelist: availableLanguages, backend: { loadPath: '/__locales/{{lng}}.json', }, }, () => { if (!availableLanguages.includes(i18n.language)) { i18n.changeLanguage(BASE_LOCALE); } });
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
wait: true, }, }, () => { if (!availableLanguages.includes(i18n.language)) { i18n.changeLanguage(DEFAULT_LANGUAGE); } }); export default i18n;
</s> remove "dev": true </s> add "dev": true, "optional": true
i18n.changeLanguage(BASE_LOCALE);
wait: true, }, }, () => { if (!availableLanguages.includes(i18n.language)) { i18n.changeLanguage(BASE_LOCALE); } }); export default i18n;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/src/i18n.js
const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html'); const HTML_LOGIN_PATH = path.resolve(RESOURCES_PATH, 'public/login.html'); const FAVICON_PATH = path.resolve(RESOURCES_PATH, 'public/favicon.png'); const PUBLIC_PATH = path.resolve(__dirname, '../build/static'); const config = { target: 'web', context: RESOURCES_PATH,
</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);
const LOCALES_PATH = path.resolve(RESOURCES_PATH, 'src/__locales/*.json');
const HTML_INSTALL_PATH = path.resolve(RESOURCES_PATH, 'public/install.html'); const HTML_LOGIN_PATH = path.resolve(RESOURCES_PATH, 'public/login.html'); const FAVICON_PATH = path.resolve(RESOURCES_PATH, 'public/favicon.png'); const LOCALES_PATH = path.resolve(RESOURCES_PATH, 'src/__locales/*.json'); const PUBLIC_PATH = path.resolve(__dirname, '../build/static'); const config = { target: 'web', context: RESOURCES_PATH,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/webpack.common.js
resolve: { modules: ['node_modules'], }, module: { rules: [ { test: /\.css$/,
</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);
alias: { MainRoot: path.resolve(__dirname, '../'), ClientRoot: path.resolve(__dirname, './src'), },
resolve: { modules: ['node_modules'], alias: { MainRoot: path.resolve(__dirname, '../'), ClientRoot: path.resolve(__dirname, './src'), }, }, module: { rules: [ { test: /\.css$/,
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/webpack.common.js
plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), }), new CleanWebpackPlugin(['*.*'], { root: PUBLIC_PATH, verbose: false, dry: false, }), new HtmlWebpackPlugin({
</s> remove fallbackLng: DEFAULT_LANGUAGE, </s> add fallbackLng: BASE_LOCALE, </s> remove resources, </s> add
new CleanWebpackPlugin(['**/*.*'], {
plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), }), new CleanWebpackPlugin(['**/*.*'], { root: PUBLIC_PATH, verbose: false, dry: false, }), new HtmlWebpackPlugin({
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/webpack.common.js
{ from: FAVICON_PATH, to: PUBLIC_PATH }, ]), ], }; module.exports = config;
</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);
new CopyPlugin([ { from: LOCALES_PATH, to: PUBLIC_PATH, context: 'src/', }, ]),
{ from: FAVICON_PATH, to: PUBLIC_PATH }, ]), new CopyPlugin([ { from: LOCALES_PATH, to: PUBLIC_PATH, context: 'src/', }, ]), ], }; module.exports = config;
[ "keep", "add", "keep", "keep", "keep", "keep" ]
+ client: remove locales from js bundle
https://github.com/AdguardTeam/AdGuardHome/commit/4d55f51feeb50a8fdf36f1345ba5063b5d27afc5
client/webpack.common.js
Certificates: []tls.Certificate{cert}, }, } URL := fmt.Sprintf("https://%s", address) log.Println("Go to " + URL) err = httpsServer.server.ListenAndServeTLS("", "") if err != http.ErrServerClosed { log.Fatal(err) os.Exit(1) }
</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)
printHTTPAddresses("https")
Certificates: []tls.Certificate{cert}, }, } printHTTPAddresses("https") printHTTPAddresses("https") err = httpsServer.server.ListenAndServeTLS("", "") if err != http.ErrServerClosed { log.Fatal(err) os.Exit(1) }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
app.go
}() // this loop is used as an ability to change listening host and/or port for { address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) URL := fmt.Sprintf("http://%s", address) log.Println("Go to " + URL) // we need to have new instance, because after Shutdown() the Server is not usable httpServer = &http.Server{ Addr: address, } err := httpServer.ListenAndServe()
</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
printHTTPAddresses("http")
}() // this loop is used as an ability to change listening host and/or port for { printHTTPAddresses("http") printHTTPAddresses("http") printHTTPAddresses("http") // we need to have new instance, because after Shutdown() the Server is not usable httpServer = &http.Server{ Addr: address, } err := httpServer.ListenAndServe()
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
app.go
// we need to have new instance, because after Shutdown() the Server is not usable httpServer = &http.Server{ Addr: address, } err := httpServer.ListenAndServe()
</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
address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
// we need to have new instance, because after Shutdown() the Server is not usable address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort)) httpServer = &http.Server{ Addr: address, } err := httpServer.ListenAndServe()
[ "keep", "add", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
app.go
ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html 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 DNS dnsConfig `yaml:"dns"` TLS tlsConfig `yaml:"tls"` Filters []filter `yaml:"filters"` UserRules []string `yaml:"user_rules"` DHCP dhcpd.ServerConfig `yaml:"dhcp"`
</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
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
ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html 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 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 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 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 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 DNS dnsConfig `yaml:"dns"` TLS tlsConfig `yaml:"tls"` Filters []filter `yaml:"filters"` UserRules []string `yaml:"user_rules"` DHCP dhcpd.ServerConfig `yaml:"dhcp"`
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
config.go
} func handleInstallGetAddresses(w http.ResponseWriter, r *http.Request) { data := firstRunData{} 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 // find out if port 80 is available -- if not, fall back to 3000 if checkPortAvailable("", 80) == nil { data.Web.Port = 80 } else {
</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")
} func handleInstallGetAddresses(w http.ResponseWriter, r *http.Request) { data := firstRunData{} // find out if port 80 is available -- if not, fall back to 3000 if checkPortAvailable("", 80) == nil { data.Web.Port = 80 } else {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
control.go
data.DNS.Warning = "Port 53 is not available for binding -- this will make DNS clients unable to contact AdGuard Home." } data.Interfaces = make(map[string]interface{}) for _, iface := range ifaces { data.Interfaces[iface.Name] = iface }
</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")
ifaces, err := getValidNetInterfacesForWeb() if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err) return }
data.DNS.Warning = "Port 53 is not available for binding -- this will make DNS clients unable to contact AdGuard Home." } ifaces, err := getValidNetInterfacesForWeb() if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't get interfaces: %s", err) return } data.Interfaces = make(map[string]interface{}) for _, iface := range ifaces { data.Interfaces[iface.Name] = iface }
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
control.go
} data.Interfaces = make(map[string]interface{}) for _, iface := range ifaces { 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 } } w.Header().Set("Content-Type", "application/json") err = json.NewEncoder(w).Encode(data) if err != nil {
</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")
data.Interfaces[iface.Name] = iface
} data.Interfaces = make(map[string]interface{}) for _, iface := range ifaces { data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface data.Interfaces[iface.Name] = iface } w.Header().Set("Content-Type", "application/json") err = json.NewEncoder(w).Encode(data) if err != nil {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
control.go
func handleInstallConfigure(w http.ResponseWriter, r *http.Request) { newSettings := firstRunData{} err := json.NewDecoder(r.Body).Decode(&newSettings) if err != nil { httpError(w, http.StatusBadRequest, "Failed to parse new DHCP config json: %s", err) return } restartHTTP := true if config.BindHost == newSettings.Web.IP && config.BindPort == newSettings.Web.Port {
</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")
httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err)
func handleInstallConfigure(w http.ResponseWriter, r *http.Request) { newSettings := firstRunData{} err := json.NewDecoder(r.Body).Decode(&newSettings) if err != nil { httpError(w, http.StatusBadRequest, "Failed to parse new config json: %s", err) return } restartHTTP := true if config.BindHost == newSettings.Web.IP && config.BindPort == newSettings.Web.Port {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
control.go
"runtime" "strconv" "strings" ) // ---------------------------------- // helper functions for working with files
</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
"github.com/joomcode/errorx"
"runtime" "strconv" "strings" "github.com/joomcode/errorx" ) // ---------------------------------- // helper functions for working with files
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
helpers.go
- name: dhcp description: 'Built-in DHCP server controls' paths: # API TO-DO LIST # TODO: Use JSON where it is possible
</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")
- name: install description: 'First-time install configuration handlers'
- name: dhcp description: 'Built-in DHCP server controls' - name: install description: 'First-time install configuration handlers' paths: # API TO-DO LIST # TODO: Use JSON where it is possible
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
openapi/openapi.yaml
description: "key_type is either RSA or ECDSA" warning_validation: type: "string" example: "You have specified an empty certificate" description: "warning_validation is a validation warning message with the issue description"
</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
description: "key_type is either RSA or ECDSA" warning_validation: type: "string" example: "You have specified an empty certificate"
[ "keep", "keep", "keep", "keep", "replace" ]
Added install methods to openapi.yaml Print all net interfaces when bind_host is 0.0.0.0
https://github.com/AdguardTeam/AdGuardHome/commit/4e1c1618cb62153510fb0c538438e9e39c979923
openapi/openapi.yaml
import ( "fmt" "net" "os" "strings" "sync" "time" "github.com/AdguardTeam/AdGuardHome/dnsfilter" "github.com/AdguardTeam/AdGuardHome/dnsforward"
</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()
import ( "fmt" "net" "os" "sync" "time" "github.com/AdguardTeam/AdGuardHome/dnsfilter" "github.com/AdguardTeam/AdGuardHome/dnsforward"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
* rDNS: refactor: move code to a separate file
https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f
home/dns.go
"net" "os" "strings" "sync" "time" "github.com/AdguardTeam/AdGuardHome/dnsfilter" "github.com/AdguardTeam/AdGuardHome/dnsforward" "github.com/AdguardTeam/dnsproxy/proxy" "github.com/AdguardTeam/dnsproxy/upstream"
</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
"net" "os" "strings" "sync" "github.com/AdguardTeam/AdGuardHome/dnsfilter" "github.com/AdguardTeam/AdGuardHome/dnsforward" "github.com/AdguardTeam/dnsproxy/proxy" "github.com/AdguardTeam/dnsproxy/upstream"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
* rDNS: refactor: move code to a separate file
https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f
home/dns.go
"github.com/joomcode/errorx" "github.com/miekg/dns" ) const ( rdnsTimeout = 3 * time.Second // max time to wait for rDNS response ) type dnsContext struct { rdnsChannel chan string // pass data from DNS request handling thread to rDNS thread // contains IP addresses of clients to be resolved by rDNS // if IP address couldn't be resolved, it stays here forever to prevent further attempts to resolve the same IP rdnsIP map[string]bool
</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
"github.com/joomcode/errorx" "github.com/miekg/dns" ) type dnsContext struct { rdnsChannel chan string // pass data from DNS request handling thread to rDNS thread // contains IP addresses of clients to be resolved by rDNS // if IP address couldn't be resolved, it stays here forever to prevent further attempts to resolve the same IP rdnsIP map[string]bool
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
* rDNS: refactor: move code to a separate file
https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f
home/dns.go
} config.dnsServer = dnsforward.NewServer(baseDir) 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() } func isRunning() bool { return config.dnsServer != nil && config.dnsServer.IsRunning() }
</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
initRDNS()
} config.dnsServer = dnsforward.NewServer(baseDir) initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() initRDNS() } func isRunning() bool { return config.dnsServer != nil && config.dnsServer.IsRunning() }
[ "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" ]
* rDNS: refactor: move code to a separate file
https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f
home/dns.go
func isRunning() bool { return config.dnsServer != nil && config.dnsServer.IsRunning() } 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) } } func onDNSRequest(d *proxy.DNSContext) { qType := d.Req.Question[0].Qtype if qType != dns.TypeA && qType != dns.TypeAAAA { return }
</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
func isRunning() bool { return config.dnsServer != nil && config.dnsServer.IsRunning() } func onDNSRequest(d *proxy.DNSContext) { qType := d.Req.Question[0].Qtype if qType != dns.TypeA && qType != dns.TypeAAAA { return }
[ "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" ]
* rDNS: refactor: move code to a separate file
https://github.com/AdguardTeam/AdGuardHome/commit/4f08f96607e60719586a041329d9622c4bd00f6f
home/dns.go
import es from './__locales/es.json'; import fa from './__locales/fa.json'; import fr from './__locales/fr.json'; import hr from './__locales/hr.json'; import hu from './__locales/hu.json'; import id from './__locales/id.json'; import it from './__locales/it.json'; import ja from './__locales/ja.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 }, </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.
import fi from './__locales/fi.json';
import es from './__locales/es.json'; import fa from './__locales/fa.json'; import fi from './__locales/fi.json'; import fr from './__locales/fr.json'; import hr from './__locales/hr.json'; import hu from './__locales/hu.json'; import id from './__locales/id.json'; import it from './__locales/it.json'; import ja from './__locales/ja.json';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
client/src/i18n.js
import th from './__locales/th.json'; import tr from './__locales/tr.json'; import vi from './__locales/vi.json'; import zhCN from './__locales/zh-cn.json'; import zhHK from './__locales/zh-hk.json'; import zhTW from './__locales/zh-tw.json'; import { setHtmlLangAttr } from './helpers/helpers';
</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.
import uk from './__locales/uk.json';
import th from './__locales/th.json'; import tr from './__locales/tr.json'; import uk from './__locales/uk.json'; import vi from './__locales/vi.json'; import zhCN from './__locales/zh-cn.json'; import zhHK from './__locales/zh-hk.json'; import zhTW from './__locales/zh-tw.json'; import { setHtmlLangAttr } from './helpers/helpers';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
client/src/i18n.js
import zhTW from './__locales/zh-tw.json'; import { setHtmlLangAttr } from './helpers/helpers'; const resources = { 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, }, }; const availableLanguages = Object.keys(LANGUAGES); i18n
</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.
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 },
import zhTW from './__locales/zh-tw.json'; import { setHtmlLangAttr } from './helpers/helpers'; const resources = { 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, 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 }, }; const availableLanguages = Object.keys(LANGUAGES); i18n
[ "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" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
client/src/i18n.js
"github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/stringutil" ) // TODO(a.garipov): Get rid of a global variable? var allowedLanguages = stringutil.NewSet( "be", "bg", "cs", "da",
</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 },
// TODO(a.garipov): Get rid of a global or generate from .twosky.json.
"github.com/AdguardTeam/golibs/log" "github.com/AdguardTeam/golibs/stringutil" ) // TODO(a.garipov): Get rid of a global or generate from .twosky.json. var allowedLanguages = stringutil.NewSet( "be", "bg", "cs", "da",
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
internal/home/i18n.go
"es", "fa", "fr", "hr", "hu", "id", "it", "ja",
</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 },
"fi",
"es", "fa", "fi", "fr", "hr", "hu", "id", "it", "ja",
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
internal/home/i18n.go
"sv", "th", "tr", "vi", "zh-cn", "zh-hk", "zh-tw", )
</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 },
"uk",
"sv", "th", "tr", "uk", "vi", "zh-cn", "zh-hk", "zh-tw", )
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/4f257a1cfcd2b7f45eb98e955bb0f69656d5bcec
internal/home/i18n.go
} </div> </div> </div> <div className="col-12"> <p className="text-danger"> { (certificateChain || privateKey) && warning_validation && warning_validation } </p> </div> </div> <div className="btn-list mt-2"> <button type="submit"
</s> remove ...payload, </s> add ...values, issuer, key_type, not_after, not_before, subject, warning_validation, dns_names,
{warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> }
} </div> </div> </div> {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } {warning_validation && <div className="col-12"> <p className="text-danger"> {warning_validation} </p> </div> } </div> <div className="btn-list mt-2"> <button type="submit"
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix empty values on validate
https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4
client/src/components/Settings/Encryption/Form.js
[actions.validateTlsConfigRequest]: state => ({ ...state, processingValidate: true }), [actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }), [actions.validateTlsConfigSuccess]: (state, { payload }) => { const newState = { ...state, ...values, issuer, key_type, not_after,
</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> }
const { issuer = '', key_type = '', not_after = '', not_before = '', subject = '', warning_validation = '', dns_names = '', ...values } = payload;
[actions.validateTlsConfigRequest]: state => ({ ...state, processingValidate: true }), [actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }), [actions.validateTlsConfigSuccess]: (state, { payload }) => { const { issuer = '', key_type = '', not_after = '', not_before = '', subject = '', warning_validation = '', dns_names = '', ...values } = payload; const newState = { ...state, ...values, issuer, key_type, not_after,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
Fix empty values on validate
https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4
client/src/reducers/encryption.js
[actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }), [actions.validateTlsConfigSuccess]: (state, { payload }) => { const newState = { ...state, ...payload, processingValidate: false, }; return newState; }, }, {
</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> }
...values, issuer, key_type, not_after, not_before, subject, warning_validation, dns_names,
[actions.validateTlsConfigFailure]: state => ({ ...state, processingValidate: false }), [actions.validateTlsConfigSuccess]: (state, { payload }) => { const newState = { ...state, ...values, issuer, key_type, not_after, not_before, subject, warning_validation, dns_names, processingValidate: false, }; return newState; }, }, {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix empty values on validate
https://github.com/AdguardTeam/AdGuardHome/commit/4f45f2c3e3f80a04d6bde0510452bd51337ac0f4
client/src/reducers/encryption.js
return netIfaces, nil } // GetInterfaceByIP returns the name of interface containing provided ip. // // TODO(e.burkov): See TODO on GetValidInterfacesForWeb. func GetInterfaceByIP(ip net.IP) string { ifaces, err := GetValidNetInterfacesForWeb() if err != nil {
</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)
// InterfaceByIP returns the name of the interface bound to ip.
return netIfaces, nil } // InterfaceByIP returns the name of the interface bound to ip. // // TODO(e.burkov): See TODO on GetValidInterfacesForWeb. func GetInterfaceByIP(ip net.IP) string { ifaces, err := GetValidNetInterfacesForWeb() if err != nil {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593
internal/aghnet/net.go
} // GetInterfaceByIP returns the name of interface containing provided ip. // // TODO(e.burkov): See TODO on GetValidInterfacesForWeb. func GetInterfaceByIP(ip net.IP) string { ifaces, err := GetValidNetInterfacesForWeb() if err != nil { return "" }
</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)
// 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) {
} // GetInterfaceByIP returns the name of interface containing provided ip. // // 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) { // 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) { ifaces, err := GetValidNetInterfacesForWeb() if err != nil { return "" }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593
internal/aghnet/net.go
// GetSubnet returns pointer to net.IPNet for the specified interface or nil if // the search fails. // // TODO(e.burkov): See TODO on GetValidInterfacesForWeb. func GetSubnet(ifaceName string) *net.IPNet { netIfaces, err := GetValidNetInterfacesForWeb() if err != nil { log.Error("Could not get network interfaces info: %v", err) return nil
</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
// TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb.
// GetSubnet returns pointer to net.IPNet for the specified interface or nil if // the search fails. // // TODO(e.burkov): See TODO on GetValidNetInterfacesForWeb. func GetSubnet(ifaceName string) *net.IPNet { netIfaces, err := GetValidNetInterfacesForWeb() if err != nil { log.Error("Could not get network interfaces info: %v", err) return nil
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
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
https://github.com/AdguardTeam/AdGuardHome/commit/50565bed3b5bcd934781940d398571a4ecb9b593
internal/aghnet/net.go