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
if errors.Is(err, errTSTooEarly) {
<mask> for i := len(r.qFiles) - 1; i >= 0; i-- { <mask> q := r.qFiles[i] <mask> _, _, err = q.seekTS(timestamp) <mask> if err != nil { <mask> if errors.Is(err, ErrTSTooEarly) { <mask> // Look at the next file, since we've reached the end of this <mask> // one. If there is no next file, it's no...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
err = errTSNotFound
<mask> if err != nil { <mask> if errors.Is(err, ErrTSTooEarly) { <mask> // Look at the next file, since we've reached the end of this <mask> // one. If there is no next file, it's not found. <mask> err = ErrTSNotFound <mask> <mask> continue <mask> } else if errors.Is(err, ErrTSTooLate)...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
} else if errors.Is(err, errTSTooLate) {
<mask> // one. If there is no next file, it's not found. <mask> err = ErrTSNotFound <mask> <mask> continue <mask> } else if errors.Is(err, ErrTSTooLate) { <mask> // Just seek to the start then. timestamp is probably between <mask> // the end of the previous one and the start of this one...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
} else if errors.Is(err, errTSNotFound) {
<mask> } else if errors.Is(err, ErrTSTooLate) { <mask> // Just seek to the start then. timestamp is probably between <mask> // the end of the previous one and the start of this one. <mask> return r.SeekStart() <mask> } else if errors.Is(err, ErrTSNotFound) { <mask> return err <mask> } e...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// qLogFile.
<mask> } <mask> <mask> // The search is finished, and the searched element has been found. <mask> // Update currentFile only, position is already set properly in <mask> // QLogFile. <mask> r.currentFile = i <mask> <mask> return nil <mask> } <mask> </s> Pull request: querylog imp code Merge i...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// SeekStart changes the current position to the end of the newest file. // Please note that we're reading query log in the reverse order and that's why // the log starts actually at the end of file.
<mask> <mask> return nil <mask> } <mask> <mask> // SeekStart changes the current position to the end of the newest file <mask> // Please note that we're reading query log in the reverse order <mask> // and that's why log start is actually the end of file <mask> // <mask> // Returns nil if we were able to ch...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// Returns nil if we were able to change the current position. Returns error // in any other cases. func (r *qLogReader) SeekStart() error {
<mask> // SeekStart changes the current position to the end of the newest file <mask> // Please note that we're reading query log in the reverse order <mask> // and that's why log start is actually the end of file <mask> // <mask> // Returns nil if we were able to change the current position. <mask> // Returns er...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// ReadNext reads the next line (in the reverse order) from the query log // files. Then shifts the current position left to the next (actually prev) // line (or the next file). // // Returns io.EOF if there is nothing more to read. func (r *qLogReader) ReadNext() (string, error) {
<mask> <mask> return err <mask> } <mask> <mask> // ReadNext reads the next line (in the reverse order) from the query log files. <mask> // and shifts the current position left to the next (actually prev) line (or the next file). <mask> // returns io.EOF if there's nothing to read more. <mask> func (r *QLogRe...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// Shift to the older file.
<mask> for r.currentFile >= 0 { <mask> q := r.qFiles[r.currentFile] <mask> line, err := q.ReadNext() <mask> if err != nil { <mask> // Shift to the older file <mask> r.currentFile-- <mask> if r.currentFile < 0 { <mask> break <mask> } <mask> </s> Pull request: querylog imp code Merge i...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// Set its position to the start right away.
<mask> } <mask> <mask> q = r.qFiles[r.currentFile] <mask> <mask> // Set it's position to the start right away <mask> _, err = q.SeekStart() <mask> <mask> // This is unexpected, return an error right away <mask> if err != nil { <mask> return "", err </s> Pull request: querylog imp cod...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// This is unexpected, return an error right away.
<mask> <mask> // Set it's position to the start right away <mask> _, err = q.SeekStart() <mask> <mask> // This is unexpected, return an error right away <mask> if err != nil { <mask> return "", err <mask> } <mask> } else { <mask> return line, nil </s> Pull request: querylog imp code...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// Nothing to read anymore.
<mask> return line, nil <mask> } <mask> } <mask> <mask> // Nothing to read anymore <mask> return "", io.EOF <mask> } <mask> <mask> // Close closes the QLogReader <mask> func (r *QLogReader) Close() error { </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// Close closes the qLogReader. func (r *qLogReader) Close() error {
<mask> // Nothing to read anymore <mask> return "", io.EOF <mask> } <mask> <mask> // Close closes the QLogReader <mask> func (r *QLogReader) Close() error { <mask> return closeQFiles(r.qFiles) <mask> } <mask> <mask> // closeQFiles - helper method to close multiple QLogFile instances <mask> func closeQFi...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// closeQFiles is a helper method to close multiple qLogFile instances. func closeQFiles(qFiles []*qLogFile) error {
<mask> func (r *QLogReader) Close() error { <mask> return closeQFiles(r.qFiles) <mask> } <mask> <mask> // closeQFiles - helper method to close multiple QLogFile instances <mask> func closeQFiles(qFiles []*QLogFile) error { <mask> var errs []error <mask> <mask> for _, q := range qFiles { <mask> err := q...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
return errors.List("error while closing qLogReader", errs...)
<mask> } <mask> } <mask> <mask> if len(errs) > 0 { <mask> return errors.List("error while closing QLogReader", errs...) <mask> } <mask> <mask> return nil <mask> } </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of the following: comm...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader.go
// newTestQLogReader creates new *qLogReader for tests and registers the
<mask> "github.com/stretchr/testify/assert" <mask> "github.com/stretchr/testify/require" <mask> ) <mask> <mask> // newTestQLogReader creates new *QLogReader for tests and registers the <mask> // required cleanup functions. <mask> func newTestQLogReader(t *testing.T, filesNum, linesNum int) (reader *QLogReader...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
func newTestQLogReader(t *testing.T, filesNum, linesNum int) (reader *qLogReader) {
<mask> ) <mask> <mask> // newTestQLogReader creates new *QLogReader for tests and registers the <mask> // required cleanup functions. <mask> func newTestQLogReader(t *testing.T, filesNum, linesNum int) (reader *QLogReader) { <mask> t.Helper() <mask> <mask> testFiles := prepareTestFiles(t, filesNum, linesNum...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
// Create the new qLogReader instance. reader, err := newQLogReader(testFiles)
<mask> t.Helper() <mask> <mask> testFiles := prepareTestFiles(t, filesNum, linesNum) <mask> <mask> // Create the new QLogReader instance. <mask> reader, err := NewQLogReader(testFiles) <mask> require.NoError(t, err) <mask> <mask> assert.NotNil(t, reader) <mask> testutil.CleanupAndRequireSuccess(t, r...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
want error
<mask> <mask> testCases := []struct { <mask> name string <mask> time string <mask> }{{ <mask> name: "not_too_old", <mask> time: "2020-02-18T22:39:35.920973+03:00", <mask> want: nil, </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
<mask> <mask> testCases := []struct { <mask> name string <mask> time string <mask> want error <mask> }{{ <mask> name: "not_too_old", <mask> time: "2020-02-18T22:39:35.920973+03:00", <mask> want: nil, <mask> }, { </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
want: errTSNotFound,
<mask> want: nil, <mask> }, { <mask> name: "non-existent_long_ago", <mask> time: "2000-02-19T01:23:16.920973+03:00", <mask> want: ErrTSNotFound, <mask> }, { <mask> name: "non-existent_far_ahead", <mask> time: "2100-02-19T01:23:16.920973+03:00", <mask> want: nil, <mask> }, { </s> Pull request...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
want: errTSNotFound,
<mask> want: nil, <mask> }, { <mask> name: "non-existent_but_could", <mask> time: "2020-02-18T22:36:37.000000+03:00", <mask> want: ErrTSNotFound, <mask> }} <mask> <mask> for _, tc := range testCases { <mask> t.Run(tc.name, func(t *testing.T) { <mask> ts, err := time.Parse(time.RFC3339Nano, tc...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
want error
<mask> const filesNum = 1 <mask> r := newTestQLogReader(t, filesNum, linesNum) <mask> <mask> testCases := []struct { <mask> name string <mask> start int <mask> }{{ <mask> name: "ok", <mask> start: 0, </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to maste...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
<mask> <mask> testCases := []struct { <mask> name string <mask> start int <mask> want error <mask> }{{ <mask> name: "ok", <mask> start: 0, <mask> want: nil, <mask> }, { </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of the...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/qlogreader_test.go
"fmt"
<mask> <mask> import ( <mask> "io" <mask> "time" <mask> <mask> "github.com/AdguardTeam/golibs/errors" <mask> "github.com/AdguardTeam/golibs/log" </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of the following: commit a58ad36508a2355b686d3...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
"github.com/AdguardTeam/golibs/errors"
<mask> "time" <mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> "golang.org/x/exp/slices" <mask> ) <mask> </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of the following: commit a58ad36508a2355b686d314dec51ac0b5e357281 Merge: df5494f...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
// seekRecord changes the current position to the next record older than the // provided parameter. func (r *qLogReader) seekRecord(olderThan time.Time) (err error) { if olderThan.IsZero() { return r.SeekStart() } err = r.seekTS(olderThan.UnixNano()) if err == nil { // Read to the next record, because we only ...
<mask> <mask> return entries, oldest <mask> } <mask> <mask> // searchFiles looks up log records from all log files. It optionally uses the <mask> // client cache, if provided. searchFiles does not scan more than <mask> // maxFileScanEntries so callers may need to call it several times to get all <mask> // ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
r, err := newQLogReader(files)
<mask> l.logFile + ".1", <mask> l.logFile, <mask> } <mask> <mask> r, err := NewQLogReader(files) <mask> if err != nil { <mask> log.Error("querylog: opening qlog reader: %s", err) <mask> <mask> return entries, oldest, 0 <mask> } </s> Pull request: querylog imp code Merge in DNS/adguard-home fro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
return nil, fmt.Errorf("opening qlog reader: %s", err)
<mask> } <mask> <mask> r, err := NewQLogReader(files) <mask> if err != nil { <mask> log.Error("querylog: opening qlog reader: %s", err) <mask> <mask> return entries, oldest, 0 <mask> } <mask> <mask> defer func() { <mask> closeErr := r.Close() <mask> if closeErr != nil { <mask> log.Error(...
[ "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", "ke...
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
err = r.seekRecord(olderThan)
<mask> return nil, fmt.Errorf("opening qlog reader: %s", err) <mask> } <mask> <mask> if err != nil { <mask> defer func() { err = errors.WithDeferred(err, r.Close()) }() <mask> log.Debug("querylog: cannot seek to %s: %s", olderThan, err) <mask> </s> Pull request: querylog imp code Merge in DNS/adguard...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
defer func() { err = errors.WithDeferred(err, r.Close()) }() log.Debug("querylog: cannot seek to %s: %s", olderThan, err)
<mask> } <mask> } <mask> <mask> if err != nil { <mask> log.Debug("querylog: cannot seek to %s: %s", params.olderThan, err) <mask> <mask> return entries, oldest, 0 <mask> } <mask> <mask> totalLimit := params.offset + params.limit </s> Pull request: querylog imp code Merge in DNS/adguard-home fro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
return nil, nil
<mask> <mask> if err != nil { <mask> log.Debug("querylog: cannot seek to %s: %s", params.olderThan, err) <mask> <mask> return entries, oldest, 0 <mask> } <mask> <mask> totalLimit := params.offset + params.limit <mask> oldestNano := int64(0) <mask> </s> Pull request: querylog imp code Merge in DN...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
return r, nil }
<mask> <mask> return entries, oldest, 0 <mask> } <mask> <mask> totalLimit := params.offset + params.limit <mask> oldestNano := int64(0) <mask> <mask> // By default, we do not scan more than maxFileScanEntries at once. The <mask> // idea is to make search calls faster so that the UI could handle it a...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
// readEntries reads entries from the reader to totalLimit. By default, we do // not scan more than maxFileScanEntries at once. The idea is to make search // calls faster so that the UI could handle it and show something quicker. // This behavior can be overridden if maxFileScanEntries is set to 0. func (l *queryLog...
<mask> <mask> totalLimit := params.offset + params.limit <mask> oldestNano := int64(0) <mask> <mask> // By default, we do not scan more than maxFileScanEntries at once. The <mask> // idea is to make search calls faster so that the UI could handle it and <mask> // show something quicker. This behavior ca...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
ent, ts, rErr := l.readNextEntry(r, params, cache) if rErr != nil { if rErr == io.EOF {
<mask> // idea is to make search calls faster so that the UI could handle it and <mask> // show something quicker. This behavior can be overridden if <mask> // maxFileScanEntries is set to 0. <mask> for total < params.maxFileScanEntries || params.maxFileScanEntries <= 0 { <mask> var e *logEntry <mask> va...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
log.Error("querylog: reading next entry: %s", rErr)
<mask> <mask> break <mask> } <mask> <mask> log.Error("querylog: reading next entry: %s", err) <mask> } <mask> <mask> oldestNano = ts <mask> total++ <mask> </s> Pull request: querylog imp code Merge in DNS/adguard-home from querylog-imp-code to master Squashed commit of the following: c...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
if ent == nil { continue } entries = append(entries, ent) if len(entries) == totalLimit { break
<mask> <mask> oldestNano = ts <mask> total++ <mask> <mask> if e != nil { <mask> entries = append(entries, e) <mask> if len(entries) == totalLimit { <mask> break <mask> } <mask> } <mask> } <mask> <mask> if oldestNano != 0 { <mask> oldest = time.Unix(0, oldestNano) </s> Pull req...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
// criteria. It optionally uses the client cache, if provided. e is nil if // the entry doesn't match the search criteria. ts is the timestamp of the
<mask> return c <mask> } <mask> <mask> // readNextEntry reads the next log entry and checks if it matches the search <mask> // criteria. It optionally uses the client cache, if provided. e is nil if the <mask> // entry doesn't match the search criteria. ts is the timestamp of the <mask> // processed entry. ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
r *qLogReader,
<mask> // criteria. It optionally uses the client cache, if provided. e is nil if the <mask> // entry doesn't match the search criteria. ts is the timestamp of the <mask> // processed entry. <mask> func (l *queryLog) readNextEntry( <mask> r *QLogReader, <mask> params *searchParams, <mask> cache clientCache...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/search.go
// searchParams represent the search query sent by the client.
<mask> package querylog <mask> <mask> import "time" <mask> <mask> // searchParams represent the search query sent by the client <mask> type searchParams struct { <mask> // searchCriteria - list of search criteria that we use to get filter results <mask> searchCriteria []searchCriterion <mask> <mask> // ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/searchparams.go
// olderThen represents a parameter for entries that are older than this // parameter value. If not set, disregard it and return any value. olderThan time.Time // searchCriteria is a list of search criteria that we use to get filter // results.
<mask> import "time" <mask> <mask> // searchParams represent the search query sent by the client <mask> type searchParams struct { <mask> // searchCriteria - list of search criteria that we use to get filter results <mask> searchCriteria []searchCriterion <mask> <mask> // olderThen - return entries that ar...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/searchparams.go
// offset for the search. offset int // limit the number of records returned. limit int
<mask> type searchParams struct { <mask> // searchCriteria - list of search criteria that we use to get filter results <mask> searchCriteria []searchCriterion <mask> <mask> // olderThen - return entries that are older than this value <mask> // if not set - disregard it and return any value <mask> olderThan...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/searchparams.go
// maxFileScanEntries is a maximum of log entries to scan in query log // files. If not set, then no limit. maxFileScanEntries int
<mask> // olderThen - return entries that are older than this value <mask> // if not set - disregard it and return any value <mask> olderThan time.Time <mask> <mask> offset int // offset for the search <mask> limit int // limit the number of records returned <mask> maxFileScanEntr...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cbc7985e756e40ec6ee290c003ff343f825a89b2
internal/querylog/searchparams.go
const hintClass = classNames('icons mr-4 icon--24 logs__question icon--lightgray', {
<mask> 'mt-2': isDetailed && !client_info?.name && !whoisAvailable, <mask> 'white-space--nowrap': isDetailed, <mask> }); <mask> <mask> const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', { <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const render...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/Cells/ClientCell.js
const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block logs__question', {
<mask> 'icon--disabled': !answer_dnssec, <mask> 'my-3': isDetailed, <mask> }); <mask> <mask> const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', { <mask> 'icon--green': hasTracker, <mask> 'icon--disabled': !hasTracker, <mask> 'my-3': isDe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/Cells/DomainCell.js
@media (max-width: 1024px) { .grid .key-colon, .grid .title--border { font-weight: 600; } }
<mask> .grid--title:not(:first-child) { <mask> padding-top: 1rem; <mask> } <mask> <mask> @media (max-width: 767.98px) { <mask> .grid { <mask> grid-template-columns: 35% 55%; <mask> } <mask> </s> Pull request: 4815 fix query log modal on tablet Updates #4815 Squashed commit of the follo...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/Cells/IconTooltip.css
<mask> .grid > .value__time_table_header, .grid > .value__data, .grid > .value__encryption_status, .grid > .value__elapsed { <mask> grid-column: 2 / span 1; <mask> margin: 0 !important; <mask> } <mask> <mask> .grid .key-colon, .grid .title--border { <mask> font-weight: 600; ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/Cells/IconTooltip.css
className={classNames('icons mr-4 icon--24 icon--lightgray logs__question', { 'my-3': isDetailed })}
<mask> <mask> return ( <mask> <div className="logs__cell logs__cell--response" role="gridcell"> <mask> <IconTooltip <mask> className={classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed })} <mask> columnClass='grid grid--limited' <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/Cells/ResponseCell.js
<Modal portalClassName='grid' isOpen={isSmallScreen && isModalOpened} onRequestClose={closeModal} style={{ content: { width: '100%', height: 'fit-content', left: '50%', ...
<mask> setDetailedDataCurrent={setDetailedDataCurrent} <mask> setButtonType={setButtonType} <mask> setModalOpened={setModalOpened} <mask> /> <mask> <Modal portalClassName='grid' isOpen={isSmallScreen && isModalOpened} <mask> onRequestC...
[ "keep", "keep", "keep", "keep", "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/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/index.js
<div className="logs__modal-wrap"> <svg className="icon icon--24 icon-cross d-block cursor--pointer" onClick={closeModal} > <use xlinkHref="#cross" /> </svg> {processContent(detailedDa...
<mask> backgroundColor: 'rgba(0,0,0,0.5)', <mask> }, <mask> }} <mask> > <mask> <svg <mask> className="icon icon--24 icon-cross d-block d-md-none cursor--pointer" <mask> onClick={closeModal}> <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cc2388e0c888dff725fdc032c35143e346155c8a
client/src/components/Logs/index.js
"github.com/NYTimes/gziphandler"
<mask> "syscall" <mask> <mask> "github.com/AdguardTeam/golibs/log" <mask> "github.com/gobuffalo/packr" <mask> ) <mask> <mask> // VersionString will be set through ldflags, contains current version <mask> var VersionString = "undefined" <mask> var httpServer *http.Server </s> + http server: enable gzip co...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
app.go
http.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
<mask> <mask> // Initialize and run the admin Web interface <mask> box := packr.NewBox("build/static") <mask> // if not configured, redirect / to /install.html, otherwise redirect /install.html to / <mask> http.Handle("/", postInstallHandler(optionalAuthHandler(http.FileServer(box)))) <mask> registerControl...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
app.go
github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/AdguardTeam/dnsproxy v0.12.0 <mask> github.com/AdguardTeam/golibs v0.1.3 <mask> github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f // indirect <mask> github.com/bluele/gcache v0.0.0-20190203144525-2016d595ccb0 <mask> github.com/go-ole/go-ole v1.2.1 // indirect <mask> github.co...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.mod
github.com/stretchr/testify v1.3.0
<mask> github.com/miekg/dns v1.1.1 <mask> github.com/shirou/gopsutil v2.18.10+incompatible <mask> github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect <mask> github.com/sparrc/go-ping v0.0.0-20181106165434-ef3ab45e41b0 <mask> github.com/stretchr/testify v1.2.2 <mask> go.uber.org/goleak v0.10...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.mod
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c=
<mask> github.com/AdguardTeam/golibs v0.1.2/go.mod h1:b0XkhgIcn2TxwX6C5AQMtpIFAgjPehNgxJErWkwA3ko= <mask> github.com/AdguardTeam/golibs v0.1.3 h1:hmapdTtMtIk3T8eQDwTOLdqZLGDKNKk9325uC8z12xg= <mask> github.com/AdguardTeam/golibs v0.1.3/go.mod h1:b0XkhgIcn2TxwX6C5AQMtpIFAgjPehNgxJErWkwA3ko= <mask> github.com/StackExc...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.sum
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
<mask> github.com/beefsack/go-rate v0.0.0-20180408011153-efa7637bb9b6/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= <mask> github.com/bluele/gcache v0.0.0-20190203144525-2016d595ccb0 h1:vUdUwmQLnT/yuk8PsDhhMVkrfr4aMdcv/0GWzIqOjEY= <mask> github.com/bluele/gcache v0.0.0-20190203144525-2016d595ccb0/go.mod h1:...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.sum
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
<mask> github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= <mask> github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= <mask> github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= <mask> github.com/stretchr/testify v1.2.2 h1:bS...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.sum
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
<mask> github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= <mask> github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= <mask> github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= <mask> go.uber.org/goleak v0.10.0 h...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cca61a33c6ee3b5f5f20eb821d53f59b8c75a1ca
go.sum
// check cache cachedValue, isFound := getCachedResult(gctx.safebrowsingCache, host) if isFound { atomic.AddUint64(&gctx.stats.Safebrowsing.CacheHits, 1) log.Tracef("%s: found in the lookup cache %p", host, gctx.safebrowsingCache) return cachedValue, nil } result, err := d.lookupCommon(host, &gctx.stats.Saf...
<mask> return Result{}, err <mask> } <mask> return result, nil <mask> } <mask> result, err := d.lookupCommon(host, &gctx.stats.Safebrowsing, gctx.safebrowsingCache, true, format, handleBody) <mask> return result, err <mask> } <mask> <mask> func (d *Dnsfilter) checkParental(host string) (Result, erro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
// check cache cachedValue, isFound := getCachedResult(gctx.parentalCache, host) if isFound { atomic.AddUint64(&gctx.stats.Parental.CacheHits, 1) log.Tracef("%s: found in the lookup cache %p", host, gctx.parentalCache) return cachedValue, nil } result, err := d.lookupCommon(host, &gctx.stats.Parental, false...
<mask> } <mask> } <mask> return result, nil <mask> } <mask> result, err := d.lookupCommon(host, &gctx.stats.Parental, gctx.parentalCache, false, format, handleBody) <mask> return result, err <mask> } <mask> <mask> type formatHandler func(hashparam string) string <mask> type bodyHandler func(body []...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
func (d *Dnsfilter) lookupCommon(host string, lookupstats *LookupStats, hashparamNeedSlash bool, format formatHandler, handleBody bodyHandler) (Result, error) {
<mask> type formatHandler func(hashparam string) string <mask> type bodyHandler func(body []byte, hashes map[string]bool) (Result, error) <mask> <mask> // real implementation of lookup/check <mask> func (d *Dnsfilter) lookupCommon(host string, lookupstats *LookupStats, cache *fastcache.Cache, hashparamNeedSlash b...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
<mask> // handle status code <mask> switch { <mask> case resp.StatusCode == 204: <mask> // empty result, save cache <mask> setCacheResult(cache, host, Result{}) <mask> return Result{}, nil <mask> case resp.StatusCode != 200: <mask> // error, don't save cache <mask> return Result{}, nil <mask> }...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
return Result{}, fmt.Errorf("HTTP status code: %d", resp.StatusCode)
<mask> // empty result, save cache <mask> setCacheResult(cache, host, Result{}) <mask> return Result{}, nil <mask> case resp.StatusCode != 200: <mask> // error, don't save cache <mask> return Result{}, nil <mask> } <mask> <mask> result, err := handleBody(body, hashes) <mask> if err != nil { <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
<mask> } <mask> <mask> result, err := handleBody(body, hashes) <mask> if err != nil { <mask> // error, don't save cache <mask> return Result{}, err <mask> } <mask> <mask> setCacheResult(cache, host, result) <mask> return result, nil </s> * safebrowsing/parental: split some code * dnsfilter.Check...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
<mask> // error, don't save cache <mask> return Result{}, err <mask> } <mask> <mask> setCacheResult(cache, host, result) <mask> return result, nil <mask> } <mask> <mask> // <mask> // Adding rule and matching against the rules </s> * safebrowsing/parental: split some code * dnsfilter.CheckHost() doe...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter.go
<mask> d.checkMatch(t, "WMconvirus.narod.ru") <mask> if gctx.stats.Safebrowsing.Requests != 1 { <mask> t.Errorf("Safebrowsing lookup positive cache is not working: %v", gctx.stats.Safebrowsing.Requests) <mask> } <mask> d.checkMatch(t, "wmconvirus.narod.ru.") <mask> d.checkMatch(t, "test.wmconvi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter_test.go
<mask> t.Errorf("Safebrowsing lookup positive cache is not working: %v", gctx.stats.Safebrowsing.Requests) <mask> } <mask> d.checkMatch(t, "wmconvirus.narod.ru.") <mask> d.checkMatch(t, "test.wmconvirus.narod.ru") <mask> d.checkMatch(t, "test.wmconvirus.narod.ru.") <mask> d.checkMatchEmpty(t, "...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter_test.go
<mask> for i := 0; i < 100; i++ { <mask> t.Run(fmt.Sprintf("aaa%d", i), func(t *testing.T) { <mask> t.Parallel() <mask> d.checkMatch(t, "wmconvirus.narod.ru") <mask> d.checkMatch(t, "wmconvirus.narod.ru.") <mask> d.checkMatch(t, "test.wmconvirus.narod.ru") <mask> d.checkMatch(t, "test.wm...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter_test.go
<mask> t.Parallel() <mask> d.checkMatch(t, "wmconvirus.narod.ru") <mask> d.checkMatch(t, "wmconvirus.narod.ru.") <mask> d.checkMatch(t, "test.wmconvirus.narod.ru") <mask> d.checkMatch(t, "test.wmconvirus.narod.ru.") <mask> d.checkMatchEmpty(t, "yandex.ru") <mask> d.checkMatchEmpty(t, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter_test.go
<mask> if gctx.stats.Parental.Requests != 1 { <mask> t.Errorf("Parental lookup positive cache is not working") <mask> } <mask> d.checkMatch(t, "www.pornhub.com") <mask> d.checkMatch(t, "pornhub.com.") <mask> d.checkMatch(t, "www.pornhub.com.") <mask> d.checkMatchEmpty(t, "www.yandex.ru") <mask> d.check...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ccf72b60084b4818e64105b0687eb98434f14cf3
dnsfilter/dnsfilter_test.go
// Theme is a UI theme for current user. Theme Theme `yaml:"theme"`
<mask> ProxyURL string `yaml:"http_proxy"` <mask> // Language is a two-letter ISO 639-1 language code. <mask> Language string `yaml:"language"` <mask> // DebugPProf defines if the profiling HTTP handler will listen on :6060. <mask> DebugPProf bool `yaml:"debug_pprof"` <mask> <mask> // TTL for a web sessio...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/config.go
Theme: ThemeAuto,
<mask> }, <mask> OSConfig: &osConfig{}, <mask> SchemaVersion: currentSchemaVersion, <mask> } <mask> <mask> // getConfigFilename returns path to the current config file <mask> func (c *configuration) getConfigFilename() string { <mask> configFile, err := filepath.EvalSymlinks(Context.configFilename) <...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/config.go
<mask> <mask> _ = aghhttp.WriteJSONResponse(w, r, resp) <mask> } <mask> <mask> type profileJSON struct { <mask> Name string `json:"name"` <mask> } <mask> <mask> func handleGetProfile(w http.ResponseWriter, r *http.Request) { <mask> u := Context.auth.getCurrentUser(r) <mask> resp := &profileJSON{ <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/control.go
httpRegister(http.MethodPut, "/control/profile/update", handlePutProfile)
<mask> Context.mux.HandleFunc("/control/version.json", postInstall(optionalAuth(handleGetVersionJSON))) <mask> httpRegister(http.MethodPost, "/control/update", handleUpdate) <mask> httpRegister(http.MethodGet, "/control/profile", handleGetProfile) <mask> <mask> // No auth is necessary for DoH/DoT configuratio...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/control.go
// TODO(d.kolyshev): Deprecated, remove it later.
<mask> Language string `json:"language"` <mask> } <mask> <mask> func handleI18nCurrentLanguage(w http.ResponseWriter, r *http.Request) { <mask> log.Printf("home: language is %s", config.Language) <mask> <mask> _ = aghhttp.WriteJSONResponse(w, r, &languageJSON{ <mask> Language: config.Language, <mask> }...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/i18n.go
// TODO(d.kolyshev): Deprecated, remove it later.
<mask> }) <mask> } <mask> <mask> func handleI18nChangeLanguage(w http.ResponseWriter, r *http.Request) { <mask> if aghhttp.WriteTextPlainDeprecated(w, r) { <mask> return <mask> } <mask> <mask> langReq := &languageJSON{} </s> Pull request: 613-dark-theme vol.1 Merge in DNS/adguard-home from 613-dark-t...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
internal/home/i18n.go
'deprecated': true 'description': > Deprecated: Use `PUT /control/profile` instead.
<mask> '/i18n/change_language': <mask> 'post': <mask> 'tags': <mask> - 'i18n' <mask> 'operationId': 'changeLanguage' <mask> 'summary': > <mask> Change current language. Argument must be an ISO 639-1 two-letter code. <mask> 'requestBody': </s> Pull request: 613-dark-...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
openapi/openapi.yaml
'deprecated': true 'description': > Deprecated: Use `GET /control/profile` instead.
<mask> 'description': 'OK.' <mask> '/i18n/current_language': <mask> 'get': <mask> 'tags': <mask> - 'i18n' <mask> 'operationId': 'currentLanguage' <mask> 'summary': > <mask> Get currently set language. Result is ISO 639-1 two-letter code. Empty <mask> re...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
openapi/openapi.yaml
'/profile/update': 'put': 'tags': - 'global' 'operationId': 'updateProfile' 'summary': 'Updates current user info' 'requestBody': 'content': 'application/json': 'schema': '$ref': '#/components/schemas/ProfileInfo' 'responses': ...
<mask> 'responses': <mask> '302': <mask> 'description': 'OK.' <mask> '/profile': <mask> 'get': <mask> 'tags': <mask> - 'global' </s> Pull request: 613-dark-theme vol.1 Merge in DNS/adguard-home from 613-dark-theme to master Squashed commit of the following: commit 1a...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
openapi/openapi.yaml
'language': 'type': 'string' 'theme': 'type': 'string' 'description': 'Interface theme' 'enum': - 'auto' - 'dark' - 'light' 'required': - 'name' - 'language' - 'theme'
<mask> 'description': 'Information about the current user' <mask> 'properties': <mask> 'name': <mask> 'type': 'string' <mask> 'Client': <mask> 'type': 'object' <mask> 'description': 'Client information.' <mask> 'properties': </s> Pull request: 613-dark-theme ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd76a307900a29db2fdb4088daf4d1c44060bcb8
openapi/openapi.yaml
proxyConfig := &proxy.Proxy{
<mask> } <mask> <mask> // prepareIntlProxy - initializes DNS proxy that we use for internal DNS queries <mask> func (s *Server) prepareIntlProxy() { <mask> s.internalProxy = &proxy.Proxy{ <mask> Config: proxy.Config{ <mask> CacheEnabled: true, <mask> CacheSizeBytes: 4096, <mask> UpstreamConfig: ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd8206ad9bdf2b888e79f3eba93315919f3c31f8
internal/dnsforward/config.go
MaxGoroutines: int(s.conf.MaxGoroutines),
<mask> CacheEnabled: true, <mask> CacheSizeBytes: 4096, <mask> UpstreamConfig: s.conf.UpstreamConfig, <mask> }, <mask> } <mask> <mask> if s.conf.AllServers { <mask> proxyConfig.UpstreamMode = proxy.UModeParallel </s> Also honor the user-defined UpstreamMode for the internal DNS proxy </s> rem...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd8206ad9bdf2b888e79f3eba93315919f3c31f8
internal/dnsforward/config.go
if s.conf.AllServers { proxyConfig.UpstreamMode = proxy.UModeParallel } else if s.conf.FastestAddr { proxyConfig.UpstreamMode = proxy.UModeFastestAddr proxyConfig.FastestPingTimeout = s.conf.FastestTimeout.Duration } else { proxyConfig.UpstreamMode = proxy.UModeLoadBalance } s.internalProxy = proxyConfig
<mask> UpstreamConfig: s.conf.UpstreamConfig, <mask> MaxGoroutines: int(s.conf.MaxGoroutines), <mask> }, <mask> } <mask> } <mask> <mask> // prepareTLS - prepares TLS configuration for the DNS proxy <mask> func (s *Server) prepareTLS(proxyConfig *proxy.Config) error { <mask> if len(s.conf.Certificat...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/cd8206ad9bdf2b888e79f3eba93315919f3c31f8
internal/dnsforward/config.go
// makeDDRResponse creates DDR answer according to server configuration. The // contructed SVCB resource records have the priority of 1 for each entry, // similar to examples provided by https://www.ietf.org/archive/id/draft-ietf-add-ddr-06.html. // // TODO(a.meshkov): Consider setting the priority values based on th...
<mask> <mask> return resultCodeSuccess <mask> } <mask> <mask> // makeDDRResponse creates DDR answer according to server configuration. <mask> func (s *Server) makeDDRResponse(req *dns.Msg) (resp *dns.Msg) { <mask> resp = s.makeResponse(req) <mask> // TODO(e.burkov): Think about storing the FQDN version of...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce1b2bc4f17b2123e9a16ad0665061505c437376
internal/dnsforward/dns.go
Priority: 1,
<mask> } <mask> <mask> ans := &dns.SVCB{ <mask> Hdr: s.hdr(req, dns.TypeSVCB), <mask> Priority: 2, <mask> Target: domainName, <mask> Value: values, <mask> } <mask> <mask> resp.Answer = append(resp.Answer, ans) </s> Pull request: 4463 Improve DDR priority Merge in DNS/adguard-...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce1b2bc4f17b2123e9a16ad0665061505c437376
internal/dnsforward/dns.go
Priority: 1,
<mask> } <mask> <mask> ans := &dns.SVCB{ <mask> Hdr: s.hdr(req, dns.TypeSVCB), <mask> Priority: 3, <mask> Target: domainName, <mask> Value: values, <mask> } <mask> <mask> resp.Answer = append(resp.Answer, ans) </s> Pull request: 4463 Improve DDR priority Merge in DNS/adguard-...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce1b2bc4f17b2123e9a16ad0665061505c437376
internal/dnsforward/dns.go
Priority: 1,
<mask> }, <mask> } <mask> <mask> dotSVCB := &dns.SVCB{ <mask> Priority: 2, <mask> Target: ddrTestFQDN, <mask> Value: []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"dot"}}, <mask> &dns.SVCBPort{Port: 8043}, <mask> }, </s> Pull request: 4463 Improve DDR priority Merge in DNS/adg...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce1b2bc4f17b2123e9a16ad0665061505c437376
internal/dnsforward/dns_test.go
Priority: 1,
<mask> }, <mask> } <mask> <mask> doqSVCB := &dns.SVCB{ <mask> Priority: 3, <mask> Target: ddrTestFQDN, <mask> Value: []dns.SVCBKeyValue{ <mask> &dns.SVCBAlpn{Alpn: []string{"doq"}}, <mask> &dns.SVCBPort{Port: 8042}, <mask> }, </s> Pull request: 4463 Improve DDR priority Merge in DNS/adg...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce1b2bc4f17b2123e9a16ad0665061505c437376
internal/dnsforward/dns_test.go
"enforce_safe_search": "Veilig zoeken gebruiken",
<mask> "use_adguard_browsing_sec": "Gebruik AdGuardBrowsing Security web service", <mask> "use_adguard_browsing_sec_hint": "AdGuard Home controleert of het domein in de blokkeerlijst voorkomt dmv Browsing Security web service. Dit gebeurt dmv een privacy vriendelijk API verzoek:een korte prefix van de domein ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce36c955df47d58420cab0c8d8c91ec2432b40ba
client/src/__locales/nl.json
"edns_enable": "EDNS client subnet inschakelen",
<mask> "download_mobileconfig": "Configuratiebestand downloaden", <mask> "plain_dns": "Gewone DNS", <mask> "form_enter_rate_limit": "Voer ratio limiet in", <mask> "rate_limit": "Ratio limiet", <mask> "edns_enable": "Zet EDNS client subnet aan", <mask> "edns_cs_desc": "Indien ingeschakeld s...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce36c955df47d58420cab0c8d8c91ec2432b40ba
client/src/__locales/nl.json
"disable_ipv6": "Oplossen IPv6-adressen uitschakelen", "disable_ipv6_desc": "Alle DNS-query's voor IPv6-adressen (type AAAA) verwijderen.",
<mask> "rewrite_ip_address": "IP adres: gebruik dit IP in een A of AAAA antwoord", <mask> "rewrite_domain_name": "Domeinnaam: een CNAME record toevoegen", <mask> "rewrite_A": "<0>A</0>: speciale waarde, <0>A</0> records uit de upstream bewaren", <mask> "rewrite_AAAA": "<0>AAAA</0>: speciale waarde, ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ce36c955df47d58420cab0c8d8c91ec2432b40ba
client/src/__locales/nl.json
Upstreams []string `json:"upstream_dns"` // Upstreams BootstrapDNS []string `json:"bootstrap_dns"` // Bootstrap DNS AllServers bool `json:"all_servers"` // --all-servers param for dnsproxy
<mask> // ----------------------- <mask> <mask> // TODO this struct will become unnecessary after config file rework <mask> type upstreamConfig struct { <mask> upstreams []string // Upstreams <mask> bootstrapDNS []string // Bootstrap DNS <mask> allServers bool // --all-servers param for dnsproxy <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ceaa1e4ebf2e29c972b8ed0f4d7cf54e13f85151
control.go
if len(newconfig.Upstreams) > 0 { config.DNS.UpstreamDNS = newconfig.Upstreams
<mask> return <mask> } <mask> <mask> config.DNS.UpstreamDNS = defaultDNS <mask> if len(newconfig.upstreams) > 0 { <mask> config.DNS.UpstreamDNS = newconfig.upstreams <mask> } <mask> <mask> // bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ceaa1e4ebf2e29c972b8ed0f4d7cf54e13f85151
control.go
for _, host := range newconfig.BootstrapDNS {
<mask> } <mask> <mask> // bootstrap servers are plain DNS only. We should remove tls:// https:// and sdns:// hosts from slice <mask> bootstraps := []string{} <mask> for _, host := range newconfig.bootstrapDNS { <mask> err := checkBootstrapDNS(host) <mask> if err != nil { <mask> log.Tracef("%s can no...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ceaa1e4ebf2e29c972b8ed0f4d7cf54e13f85151
control.go
config.DNS.AllServers = newconfig.AllServers
<mask> if len(bootstraps) > 0 { <mask> config.DNS.BootstrapDNS = bootstraps <mask> } <mask> <mask> config.DNS.AllServers = newconfig.allServers <mask> httpUpdateConfigReloadDNSReturnOK(w, r) <mask> } <mask> <mask> // checkBootstrapDNS checks if host is plain DNS <mask> func checkBootstrapDNS(host stri...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ceaa1e4ebf2e29c972b8ed0f4d7cf54e13f85151
control.go
import React, { Component, Fragment } from 'react';
<mask> import React, { Fragment } from 'react'; <mask> import { connect } from 'react-redux'; <mask> import PropTypes from 'prop-types'; <mask> import { Field, reduxForm, formValueSelector } from 'redux-form'; <mask> import { Trans, withNamespaces } from 'react-i18next'; <mask> import flow from 'lodash/flow'; </...
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/AdguardTeam/AdGuardHome/commit/ceabad0fd07547dae7795bb827450883643aae31
client/src/install/Setup/Settings.js
class Settings extends Component { componentDidMount() { const { web, dns } = this.props.config;
<mask> return false; <mask> }) <mask> )); <mask> <mask> let Settings = (props) => { <mask> const { <mask> handleSubmit, <mask> handleChange, <mask> handleAutofix, <mask> webIp, <mask> webPort, <mask> dnsIp, <mask> dnsPort, <mask> ...
[ "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", "ke...
https://github.com/AdguardTeam/AdGuardHome/commit/ceabad0fd07547dae7795bb827450883643aae31
client/src/install/Setup/Settings.js
this.props.validateForm({ web, dns, }); } render() { const { handleSubmit, handleChange, handleAutofix, webIp, webPort, dnsIp, dnsPort, interfaces, invalid...
<mask> status: dnsStatus, <mask> can_autofix: isDnsFixAvailable, <mask> } = config.dns; <mask> <mask> return ( <mask> <form className="setup__step" onSubmit={handleSubmit}> <mask> <div className="setup__group"> <mask> <div className="setup__subtitle">...
[ "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/ceabad0fd07547dae7795bb827450883643aae31
client/src/install/Setup/Settings.js
<div className="setup__desc"> <Trans>install_settings_interface_link</Trans> <div className="mt-1"> <AddressList interfaces={interfaces} address={webIp} ...
<mask> {renderInterfaces(interfaces)} <mask> </Field> <mask> </div> <mask> </div> <mask> <div className="col-4"> <mask> <div className="form-group"> <mask> ...
[ "keep", "keep", "keep", "keep", "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/ceabad0fd07547dae7795bb827450883643aae31
client/src/install/Setup/Settings.js
<mask> onChange={handleChange} <mask> /> <mask> </div> <mask> </div> <mask> <div className="col-12"> <mask> {webStatus && <mask> <div cla...
[ "keep", "keep", "keep", "keep", "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/ceabad0fd07547dae7795bb827450883643aae31
client/src/install/Setup/Settings.js