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