Skip to content

Commit

Permalink
Feature/filters list per client (#9)
Browse files Browse the repository at this point in the history
* Pull request: AGDNS-2342-upd-golibs

Squashed commit of the following:

commit 82140ab
Author: Dimitry Kolyshev <[email protected]>
Date:   Tue Aug 6 11:25:13 2024 +0500

    all: upd golibs

* Pull request: 5704-riscv

Updates AdguardTeam#5704.

Squashed commit of the following:

commit f111e20
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Aug 8 11:27:41 2024 +0300

    docs: chlog

commit 0d56423
Merge: 866239a 1a6ec30
Author: Dimitry Kolyshev <[email protected]>
Date:   Thu Aug 8 11:26:14 2024 +0300

    Merge remote-tracking branch 'origin/master' into 5704-riscv

commit 866239a
Author: Dimitry Kolyshev <[email protected]>
Date:   Tue Aug 6 16:00:05 2024 +0500

    home: riscv arch

commit 6069382
Author: Dimitry Kolyshev <[email protected]>
Date:   Tue Aug 6 15:56:23 2024 +0500

    scripts: riscv arch

commit ea7cb3a
Author: Dimitry Kolyshev <[email protected]>
Date:   Tue Aug 6 14:35:14 2024 +0500

    scripts: riscv arch

---------

Co-authored-by: Dimitry Kolyshev <[email protected]>
  • Loading branch information
hoang-rio and Mizzick authored Aug 11, 2024
1 parent d8df67c commit 96a7c7d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 274 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ NOTE: Add new changes BELOW THIS COMMENT.

### Added

- Support for 64-bit RISC-V architecture ([#5704]).
- Ecosia search engine is now supported in safe search ([#5009]).

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/AdguardTeam/AdGuardHome
go 1.22.5

require (
github.com/AdguardTeam/dnsproxy v0.72.2
github.com/AdguardTeam/golibs v0.25.1
github.com/AdguardTeam/dnsproxy v0.72.3-0.20240806061520-4cc9af6704ef
github.com/AdguardTeam/golibs v0.25.2
github.com/AdguardTeam/urlfilter v0.19.0
github.com/NYTimes/gziphandler v1.1.1
github.com/ameshkov/dnscrypt/v2 v2.3.0
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/AdguardTeam/dnsproxy v0.72.2 h1:0uItzXnUIuC9r+ZvPbNquGaAHvdWnWLbhSDdxsZk5og=
github.com/AdguardTeam/dnsproxy v0.72.2/go.mod h1:PA1UiTtTHMbXPv9NjHat+zrsgK8S7p/RJ+j/3tNqtUE=
github.com/AdguardTeam/golibs v0.25.1 h1:po5dBbFCoZAySsbsMN/ZRB0WTLYDA1d8BxPgvriu/EA=
github.com/AdguardTeam/golibs v0.25.1/go.mod h1:HaTyS2wCbxFudjht9N/+/Qf1b5cMad2BAYSwe7DPCXI=
github.com/AdguardTeam/dnsproxy v0.72.3-0.20240806061520-4cc9af6704ef h1:j6MtYGWnMOj5TdRFeLA/YmUuS4GKsatt1z3bmIJQtZ8=
github.com/AdguardTeam/dnsproxy v0.72.3-0.20240806061520-4cc9af6704ef/go.mod h1:DCHTuklaAuvCgtZzpoA0TrqCdOBZJQnKjgKxbC9/kQ8=
github.com/AdguardTeam/golibs v0.25.2 h1:4+c9LjAIdd9trRk71hXghJ5OL/VRosBm+/0dKH+H39U=
github.com/AdguardTeam/golibs v0.25.2/go.mod h1:HaTyS2wCbxFudjht9N/+/Qf1b5cMad2BAYSwe7DPCXI=
github.com/AdguardTeam/urlfilter v0.19.0 h1:q7eH13+yNETlpD/VD3u5rLQOripcUdEktqZFy+KiQLk=
github.com/AdguardTeam/urlfilter v0.19.0/go.mod h1:+N54ZvxqXYLnXuvpaUhK2exDQW+djZBRSb6F6j0rkBY=
github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
Expand Down
94 changes: 0 additions & 94 deletions internal/aghalg/ringbuffer.go

This file was deleted.

169 changes: 0 additions & 169 deletions internal/aghalg/ringbuffer_test.go

This file was deleted.

1 change: 1 addition & 0 deletions internal/home/authglinet.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func glGetTokenDate(file string) uint32 {

buf := bytes.NewBuffer(bs)

// TODO(a.garipov): Get rid of github.com/josharian/native dependency.
err = binary.Read(buf, native.Endian, &dateToken)
if err != nil {
log.Error("decoding token: %s", err)
Expand Down
6 changes: 3 additions & 3 deletions internal/querylog/qlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"sync"
"time"

"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/golibs/container"
"github.com/AdguardTeam/golibs/errors"
"github.com/AdguardTeam/golibs/log"
"github.com/AdguardTeam/golibs/timeutil"
Expand All @@ -32,7 +32,7 @@ type queryLog struct {

// buffer contains recent log entries. The entries in this buffer must not
// be modified.
buffer *aghalg.RingBuffer[*logEntry]
buffer *container.RingBuffer[*logEntry]

// logFile is the path to the log file.
logFile string
Expand Down Expand Up @@ -225,7 +225,7 @@ func (l *queryLog) Add(params *AddParams) {
l.bufferLock.Lock()
defer l.bufferLock.Unlock()

l.buffer.Append(entry)
l.buffer.Push(entry)

if !l.flushPending && fileIsEnabled && l.buffer.Len() >= memSize {
l.flushPending = true
Expand Down
4 changes: 2 additions & 2 deletions internal/querylog/querylog.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"sync"
"time"

"github.com/AdguardTeam/AdGuardHome/internal/aghalg"
"github.com/AdguardTeam/AdGuardHome/internal/aghhttp"
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
"github.com/AdguardTeam/AdGuardHome/internal/filtering"
"github.com/AdguardTeam/golibs/container"
"github.com/AdguardTeam/golibs/errors"
"github.com/miekg/dns"
)
Expand Down Expand Up @@ -156,7 +156,7 @@ func newQueryLog(conf Config) (l *queryLog, err error) {
l = &queryLog{
findClient: findClient,

buffer: aghalg.NewRingBuffer[*logEntry](memSize),
buffer: container.NewRingBuffer[*logEntry](memSize),

conf: &Config{},
confMu: &sync.RWMutex{},
Expand Down
1 change: 1 addition & 0 deletions scripts/make/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ linux mips64 - softfloat
linux mips64le - softfloat
linux mipsle - softfloat
linux ppc64le - -
linux riscv64 - -
openbsd amd64 - -
openbsd arm64 - -
windows 386 - -
Expand Down

0 comments on commit 96a7c7d

Please sign in to comment.