docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep add keep keep keep keep keep
|
<mask> "os"
<mask> "testing"
<mask>
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func TestMain(m *testing.M) {
<mask> testutil.DiscardLogOutput(m)
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
|
internal/update/update_test.go
|
keep keep keep add keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/AdGuardHome/internal/testutil"
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func startHTTPServer(data string) (net.Listener, uint16) {
<mask> mux := http.NewServeMux()
<mask> mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
<mask> _, _ = w.Write([]byte(data))
<mask> })
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. </s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> remove t.Logf("IP addresses: %v", ips)
</s> add </s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
|
internal/update/update_test.go
|
keep keep keep add keep keep keep keep keep
|
<mask> "strings"
<mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> )
<mask>
<mask> func TestMain(m *testing.M) {
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/testutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
|
internal/util/auto_hosts_test.go
|
keep add keep keep keep keep keep keep
|
<mask> )
<mask>
<mask> func prepareTestDir() string {
<mask> const dir = "./agh-test"
<mask> _ = os.RemoveAll(dir)
<mask> _ = os.MkdirAll(dir, 0o755)
<mask> return dir
<mask> }
</s> Pull request: 2273 clean tests output
Merge in DNS/adguard-home from 2273-clean-tests-output to master
Closes #2273.
Squashed commit of the following:
commit 7571a33fc1f76300bd256578b3afa95338e399c4
Merge: f17df0f9c a19523b25
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:45:30 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit f17df0f9ce2a3ed25db33fbc6a2e7cabd33f657b
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:35:42 2020 +0300
home: move build constraint on top line
commit 3717c8ef5a51f9dcaa7e524bfa7b0f1d90bec93d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:24:50 2020 +0300
all: add improvements to changelog
commit de6d5afe39d74a3c3d3e0bbe6d0e09aea0214d56
Merge: 43d4f7acf 394fc5a9d
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 15:04:38 2020 +0300
Merge branch 'master' into 2273-clean-tests-output
commit 43d4f7acf188e810aa7277cb6479110c9842e8be
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 13:38:13 2020 +0300
dnsfilter: remove redundant test logging
commit 7194c1413006b8f52fc454e89ab052bf52e4e517
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 16 12:19:14 2020 +0300
testutil: improve comments
commit 9f17ab08e287fa69ce30d9e7eec8ea8880f87716
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:22:08 2020 +0300
nclient4: fix wrong function name
commit f355749149b2a4485792ba2bdcbc0bb4b629d726
Author: Eugene Burkov <[email protected]>
Date: Sat Nov 14 01:07:22 2020 +0300
testutil: fix comments and naming
commit f8c50a260bfae08d594a7f37d603941d3680a45e
Author: Eugene Burkov <[email protected]>
Date: Fri Nov 13 14:09:50 2020 +0300
testutil: create a package and include it
commit f169cdc4084b719de65aa0cdc65200b48785322e
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:15:58 2020 +0300
agherr: discard loggers output
commit 360e736b5a2a30f2c5350448234f14b841e3ea27
Author: Eugene Burkov <[email protected]>
Date: Thu Nov 12 20:09:55 2020 +0300
all: replace default log writer with ioutil.Discard
Closes #2273. </s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
</s> add func TestMain(m *testing.M) {
testutil.DiscardLogOutput(m)
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/6358240e9b0f10acdc05b470a64535df8cfcf67e
|
internal/util/auto_hosts_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> go 1.16
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.39.0
<mask> github.com/AdguardTeam/golibs v0.8.0
<mask> github.com/AdguardTeam/urlfilter v0.14.6
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.1
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsnotify v1.4.9
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/google/go-cmp v0.5.5 // indirect
</s> add github.com/google/go-cmp v0.5.5 </s> remove github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0=
</s> add </s> add github.com/AdguardTeam/golibs v0.8.4 h1:jd6GwvQQtfSLOKn30qisDVujvas3q7Agjm3BOEqRWpQ=
github.com/AdguardTeam/golibs v0.8.4/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= </s> remove github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I=
github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0=
</s> add </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0=
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.mod
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.1
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsnotify v1.4.9
<mask> github.com/go-ping/ping v0.0.0-20210506233800-ff8be3320020
<mask> github.com/google/go-cmp v0.5.5 // indirect
<mask> github.com/google/renameio v1.0.1
<mask> github.com/insomniacslk/dhcp v0.0.0-20210310193751-cfd4d47082c2
<mask> github.com/kardianos/service v1.2.0
<mask> github.com/lucas-clemente/quic-go v0.21.1
<mask> github.com/mdlayher/netlink v1.4.0
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0
</s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0=
</s> add </s> remove github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
</s> add </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.mod
|
keep replace replace keep keep keep keep replace
|
<mask> github.com/AdguardTeam/dhcp v0.0.0-20210519141215-51808c73c0bf/go.mod h1:TKl4jN3Voofo4UJIicyNhWGp/nlQqQkFxmwIFTvBkKI=
<mask> github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I=
<mask> github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0=
<mask> github.com/AdguardTeam/dnsproxy v0.39.0 h1:5/PN2mpUeCTWtvqXUbSPTMJSOad4lJscPzm+C2f4jB4=
<mask> github.com/AdguardTeam/dnsproxy v0.39.0/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0=
<mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0=
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0
</s> add github.com/AdguardTeam/golibs v0.8.4 </s> add github.com/AdguardTeam/golibs v0.8.4 h1:jd6GwvQQtfSLOKn30qisDVujvas3q7Agjm3BOEqRWpQ=
github.com/AdguardTeam/golibs v0.8.4/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(),
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.sum
|
keep keep add keep keep keep keep keep keep
|
<mask> github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.8.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU=
<mask> github.com/AdguardTeam/urlfilter v0.14.6 h1:emqoKZElooHACYehRBYENeKVN1a/rspxiqTIMYLuoIo=
<mask> github.com/AdguardTeam/urlfilter v0.14.6/go.mod h1:klx4JbOfc4EaNb5lWLqOwfg+pVcyRukmoJRvO55lL5U=
<mask> github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
<mask> github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
<mask> github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I=
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0 h1:rHo+yIgT2fivFG0yW2Cwk/DPc2+t/Aw6QvzPpiIFre0=
</s> add </s> remove github.com/AdguardTeam/dnsproxy v0.38.3 h1:DvycTEOn2wuHmY+HE5XL4EnCV2EVbpREpbgZB06IJ0I=
github.com/AdguardTeam/dnsproxy v0.38.3/go.mod h1:aNXKNdTyKfgAG2OS712SYSaGIM9AasZsZxfiY4YiR/0=
</s> add </s> remove github.com/AdguardTeam/golibs v0.8.0
</s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(),
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.sum
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY=
<mask> github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
<mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw=
<mask> github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us=
<mask> github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0=
<mask> github.com/ameshkov/dnscrypt/v2 v2.1.3/go.mod h1:+8SbPbVXpxxcUsgGi8eodkqWPo1MyNHxKYC8hDpqLSo=
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.1 h1:+cApRxzeBZqjUNsN26TTz7r5A8U+buON3kJgIYE3QWQ=
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.1/go.mod h1:+8SbPbVXpxxcUsgGi8eodkqWPo1MyNHxKYC8hDpqLSo=
<mask> github.com/ameshkov/dnsstamps v1.0.1/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A=
<mask> github.com/ameshkov/dnsstamps v1.0.3 h1:Srzik+J9mivH1alRACTbys2xOxs0lRH9qnTA7Y1OYVo=
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/AdguardTeam/golibs v0.8.0
</s> add github.com/AdguardTeam/golibs v0.8.4 </s> remove github.com/google/go-cmp v0.5.5 // indirect
</s> add github.com/google/go-cmp v0.5.5 </s> remove github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
</s> add </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(),
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.sum
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
<mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 h1:/jC7qQFrv8CrSJVmaolDVOxTfS9kc36uB6H40kdbQq8=
<mask> github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis=
<mask> github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
<mask> github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
<mask> github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
<mask> github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ=
<mask> github.com/joomcode/errorx v1.0.3 h1:3e1mi0u7/HTPNdg6d6DYyKGBhA5l9XpsfuVE29NxnWw=
<mask> github.com/joomcode/errorx v1.0.3/go.mod h1:eQzdtdlNyN7etw6YCS4W4+lu442waxZYw5yvz0ULrRo=
<mask> github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 h1:uhL5Gw7BINiiPAo24A2sxkcDI0Jt/sqp1v5xQCniEFA=
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove github.com/ameshkov/dnscrypt/v2 v2.1.3 h1:DG4Uf7LSDg6XDj9sp3maxh3Ur26jeGQaP5MeYosn6v0=
</s> add </s> remove github.com/google/go-cmp v0.5.5 // indirect
</s> add github.com/google/go-cmp v0.5.5 </s> remove make openapi-lint
</s> add make VERBOSE="$verbose" openapi-lint </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(),
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
go.sum
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "syscall"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // ErrNoStaticIPInfo is returned by IfaceHasStaticIP when no information about
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net.go
|
keep keep keep add keep keep keep keep
|
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // ErrNoStaticIPInfo is returned by IfaceHasStaticIP when no information about
<mask> // the IP being static is available.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove addrs *aghstrings.Set
</s> add addrs *stringutil.Set </s> remove allTags *aghstrings.Set
</s> add allTags *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if ip4 := ip.To4(); ip4 != nil {
<mask> strLen, suffix = arpaV4MaxLen, arpaV4Suffix[1:]
<mask> ip = ip4
<mask> writeByte = func(val byte) {
<mask> aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
<mask> }
<mask>
<mask> } else if ip6 := ip.To16(); ip6 != nil {
<mask> strLen, suffix = arpaV6MaxLen, arpaV6Suffix[1:]
<mask> ip = ip6
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove aghstrings.WriteToBuilder(b, m.Path)
</s> add stringutil.WriteToBuilder(b, m.Path)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> } else if ip6 := ip.To16(); ip6 != nil {
<mask> strLen, suffix = arpaV6MaxLen, arpaV6Suffix[1:]
<mask> ip = ip6
<mask> writeByte = func(val byte) {
<mask> aghstrings.WriteToBuilder(
<mask> b,
<mask> strconv.FormatUint(uint64(val&0xF), 16),
<mask> dot,
<mask> strconv.FormatUint(uint64(val>>4), 16),
<mask> dot,
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
</s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> b.Grow(strLen)
<mask> for i := len(ip) - 1; i >= 0; i-- {
<mask> writeByte(ip[i])
<mask> }
<mask> aghstrings.WriteToBuilder(b, suffix)
<mask>
<mask> return b.String()
<mask> }
<mask>
<mask> // CollectAllIfacesAddrs returns the slice of all network interfaces IP
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> add stringutil.WriteToBuilder(b, pcTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/sys/unix"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net_linux.go
|
keep keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/sys/unix"
<mask> )
<mask>
<mask> // recurrentChecker is used to check all the files which may include references
<mask> // for other ones.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove allTags *aghstrings.Set
</s> add allTags *stringutil.Set
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net_linux.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return subsources, has, nil
<mask> }
<mask>
<mask> // handlePatterns parses the patterns and takes care of duplicates.
<mask> func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) (
<mask> subsources []string,
<mask> err error,
<mask> ) {
<mask> subsources = make([]string, 0, len(patterns))
<mask> for _, p := range patterns {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net_linux.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> var patterns, subsources []string
<mask> // The slice of sources is separate from the set of sources to keep the
<mask> // order in which the files are walked.
<mask> for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
<mask> patterns, has, err = rc.checkFile(sources[i], desired)
<mask> if err != nil {
<mask> if errors.Is(err, os.ErrNotExist) {
<mask> continue
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) (
</s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove aghstrings.WriteToBuilder(b, suffix)
</s> add stringutil.WriteToBuilder(b, suffix) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net_linux.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func ifacesStaticConfig(r io.Reader, ifaceName string) (subsources []string, has bool, err error) {
<mask> s := bufio.NewScanner(r)
<mask> for s.Scan() {
<mask> line := strings.TrimSpace(s.Text())
<mask> if aghstrings.IsCommentOrEmpty(line) {
<mask> continue
<mask> }
<mask>
<mask> // TODO(e.burkov): As man page interfaces(5) says, a line may be
<mask> // extended across multiple lines by making the last character a
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder(
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/net_linux.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> )
<mask>
<mask> // defaultHostGen is the default method of generating host for Refresh.
<mask> func defaultHostGen() (host string) {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/systemresolvers_others.go
|
keep keep add keep keep keep keep
|
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> )
<mask>
<mask> // defaultHostGen is the default method of generating host for Refresh.
<mask> func defaultHostGen() (host string) {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove cnames := aghstrings.NewSet()
</s> add cnames := stringutil.NewSet()
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/systemresolvers_others.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> resolver *net.Resolver
<mask> hostGenFunc HostGenFunc
<mask>
<mask> // addrs is the set that contains cached local resolvers' addresses.
<mask> addrs *aghstrings.Set
<mask> addrsLock sync.RWMutex
<mask> }
<mask>
<mask> const (
<mask> // errBadAddrPassed is returned when dialFunc can't parse an IP address.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allTags *aghstrings.Set
</s> add allTags *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/systemresolvers_others.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> resolver: &net.Resolver{
<mask> PreferGo: true,
<mask> },
<mask> hostGenFunc: hostGenFunc,
<mask> addrs: aghstrings.NewSet(),
<mask> }
<mask> s.resolver.Dial = s.dialFunc
<mask>
<mask> return s
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/aghnet/systemresolvers_others.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/go-ping/ping"
<mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dhcpd/v4.go
|
keep keep keep add keep keep keep keep keep
|
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/go-ping/ping"
<mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dhcpd/v4.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // leased.
<mask> leasedOffsets *bitSet
<mask>
<mask> // leaseHosts is the set of all hostnames of all known DHCP clients.
<mask> leaseHosts *aghstrings.Set
<mask>
<mask> // leases contains all dynamic and static leases.
<mask> leases []*Lease
<mask>
<mask> // leasesLock protects leases, leaseHosts, and leasedOffsets.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove addrs *aghstrings.Set
</s> add addrs *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dhcpd/v4.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return
<mask> }
<mask>
<mask> s.leasedOffsets = newBitSet()
<mask> s.leaseHosts = aghstrings.NewSet()
<mask> s.leases = nil
<mask>
<mask> for _, l := range leases {
<mask> if !l.IsStatic() {
<mask> l.Hostname = s.validHostnameForClient(l.Hostname, l.IP)
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) (
</s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
</s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dhcpd/v4.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // Create DHCPv4 server
<mask> func v4Create(conf V4ServerConf) (srv DHCPServer, err error) {
<mask> s := &v4Server{}
<mask> s.conf = conf
<mask> s.leaseHosts = aghstrings.NewSet()
<mask>
<mask> // TODO(a.garipov): Don't use a disabled server in other places or just
<mask> // use an interface.
<mask> if !conf.Enabled {
<mask> return s, nil
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove if aghstrings.IsCommentOrEmpty(line) {
</s> add if len(line) == 0 || line[0] == '#' { </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dhcpd/v4.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "net/http"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
<mask> )
<mask>
<mask> // accessCtx controls IP and client blocking that takes place before all other
<mask> // processing. An accessCtx is safe for concurrent use.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> type accessCtx struct {
<mask> allowedIPs *aghnet.IPMap
<mask> blockedIPs *aghnet.IPMap
<mask>
<mask> allowedClientIDs *aghstrings.Set
<mask> blockedClientIDs *aghstrings.Set
<mask>
<mask> blockedHostsEng *urlfilter.DNSEngine
<mask>
<mask> // TODO(a.garipov): Create a type for a set of IP networks.
<mask> // aghnet.IPNetSet?
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allTags *aghstrings.Set
</s> add allTags *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove addrs *aghstrings.Set
</s> add addrs *stringutil.Set </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func processAccessClients(
<mask> clientStrs []string,
<mask> ips *aghnet.IPMap,
<mask> nets *[]*net.IPNet,
<mask> clientIDs *aghstrings.Set,
<mask> ) (err error) {
<mask> for i, s := range clientStrs {
<mask> if ip := net.ParseIP(s); ip != nil {
<mask> ips.Set(ip, unit{})
<mask> } else if cidrIP, ipnet, cidrErr := net.ParseCIDR(s); cidrErr == nil {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
</s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove if aghstrings.IsCommentOrEmpty(input) {
</s> add if IsCommentOrEmpty(input) { </s> remove func (rc *recurrentChecker) handlePatterns(sourcesSet *aghstrings.Set, patterns []string) (
</s> add func (rc *recurrentChecker) handlePatterns(sourcesSet *stringutil.Set, patterns []string) ( </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> a = &accessCtx{
<mask> allowedIPs: aghnet.NewIPMap(0),
<mask> blockedIPs: aghnet.NewIPMap(0),
<mask>
<mask> allowedClientIDs: aghstrings.NewSet(),
<mask> blockedClientIDs: aghstrings.NewSet(),
<mask> }
<mask>
<mask> err = processAccessClients(allowed, a.allowedIPs, &a.allowedNets, a.allowedClientIDs)
<mask> if err != nil {
<mask> return nil, fmt.Errorf("adding allowed: %w", err)
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove addrs: aghstrings.NewSet(),
</s> add addrs: stringutil.NewSet(),
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> b := &strings.Builder{}
<mask> for _, h := range blockedHosts {
<mask> aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n")
<mask> }
<mask>
<mask> lists := []filterlist.RuleList{
<mask> &filterlist.StringRuleList{
<mask> ID: int(0),
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, m.Path)
</s> add stringutil.WriteToBuilder(b, m.Path) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
</s> add stringutil.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> s.serverLock.RLock()
<mask> defer s.serverLock.RUnlock()
<mask>
<mask> return accessListJSON{
<mask> AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients),
<mask> DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients),
<mask> BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts),
<mask> }
<mask> }
<mask>
<mask> func (s *Server) handleAccessList(w http.ResponseWriter, r *http.Request) {
<mask> j := s.accessListJSON()
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
</s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
</s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS)
</s> add bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/access.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/config.go
|
keep keep keep add keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/ameshkov/dnscrypt/v2"
<mask> )
<mask>
<mask> // BlockingMode is an enum of all allowed blocking modes.
<mask> type BlockingMode string
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/config.go
|
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
|
<mask> data, err := os.ReadFile(s.conf.UpstreamDNSFileName)
<mask> if err != nil {
<mask> return err
<mask> }
<mask> d := string(data)
<mask> for len(d) != 0 {
<mask> s := aghstrings.SplitNext(&d, '\n')
<mask> upstreams = append(upstreams, s)
<mask> }
<mask> log.Debug("dns: using %d upstream servers from file %s", len(upstreams), s.conf.UpstreamDNSFileName)
<mask> } else {
<mask> upstreams = s.conf.UpstreamDNS
<mask> }
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove cnames := aghstrings.NewSet()
</s> add cnames := stringutil.NewSet()
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/config.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> } else {
<mask> upstreams = s.conf.UpstreamDNS
<mask> }
<mask>
<mask> upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
<mask> upstreamConfig, err := proxy.ParseUpstreamsConfig(
<mask> upstreams,
<mask> &upstream.Options{
<mask> Bootstrap: s.conf.BootstrapDNS,
<mask> Timeout: s.conf.UpstreamTimeout,
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
</s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/config.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dns.go
|
keep keep add keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // To transfer information between modules
<mask> type dnsContext struct {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dns.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> if d.Addr != nil && s.conf.GetCustomUpstreamByClient != nil {
<mask> // Use the clientID first, since it has a higher priority.
<mask> id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
<mask> upsConf, err := s.conf.GetCustomUpstreamByClient(id)
<mask> if err != nil {
<mask> log.Error("dns: getting custom upstreams for client %s: %s", id, err)
<mask> } else if upsConf != nil {
<mask> log.Debug("dns: using custom upstreams for client %s", id)
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove cnames := aghstrings.NewSet()
</s> add cnames := stringutil.NewSet() </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dns.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/stats"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // DefaultTimeout is the default upstream timeout
<mask> const DefaultTimeout = 10 * time.Second
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> defer s.serverLock.RUnlock()
<mask>
<mask> sc := s.conf.FilteringConfig
<mask> *c = sc
<mask> c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
<mask> c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
<mask> c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
<mask> c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
<mask> c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
<mask> c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
<mask> c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
<mask> }
<mask>
<mask> // RDNSSettings returns the copy of actual RDNS configuration.
<mask> func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients, resolvePTR bool) {
<mask> s.serverLock.RLock()
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
</s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
</s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients),
DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts),
</s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients),
DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags)
cy.IDs = aghstrings.CloneSlice(cli.IDs)
cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices)
cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams)
</s> add cy.Tags = stringutil.CloneSlice(cli.Tags)
cy.IDs = stringutil.CloneSlice(cli.IDs)
cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices)
cy.Upstreams = stringutil.CloneSlice(cli.Upstreams) </s> remove clients.allTags = aghstrings.NewSet(clientTags...)
</s> add clients.allTags = stringutil.NewSet(clientTags...)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func (s *Server) RDNSSettings() (localPTRResolvers []string, resolveClients, resolvePTR bool) {
<mask> s.serverLock.RLock()
<mask> defer s.serverLock.RUnlock()
<mask>
<mask> return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
<mask> s.conf.ResolveClients,
<mask> s.conf.UsePrivateRDNS
<mask> }
<mask>
<mask> // Resolve - get IP addresses by host name from an upstream server.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients),
DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts),
</s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients),
DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
</s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove if aghstrings.IsCommentOrEmpty(input) {
</s> add if IsCommentOrEmpty(input) { </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove allTags *aghstrings.Set
</s> add allTags *stringutil.Set
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask>
<mask> ourAddrsSet := aghstrings.NewSet(ourAddrs...)
<mask>
<mask> // TODO(e.burkov): The approach of subtracting sets of strings is not
<mask> // really applicable here since in case of listening on all network
<mask> // interfaces we should check the whole interface's network to cut off
<mask> // all the loopback addresses as well.
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder(b, suffix)
</s> add stringutil.WriteToBuilder(b, suffix) </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // TODO(e.burkov): The approach of subtracting sets of strings is not
<mask> // really applicable here since in case of listening on all network
<mask> // interfaces we should check the whole interface's network to cut off
<mask> // all the loopback addresses as well.
<mask> return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
<mask> }
<mask>
<mask> // setupResolvers initializes the resolvers for local addresses. For internal
<mask> // use only.
<mask> func (s *Server) setupResolvers(localAddrs []string) (err error) {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove aghstrings.WriteToBuilder(b, suffix)
</s> add stringutil.WriteToBuilder(b, suffix) </s> remove leaseHosts *aghstrings.Set
</s> add leaseHosts *stringutil.Set </s> remove for sourcesSet := aghstrings.NewSet(rc.initPath); i < len(sources); i++ {
</s> add for sourcesSet := stringutil.NewSet(rc.initPath); i < len(sources); i++ { </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/dnsforward.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep add keep keep keep keep
|
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> func httpError(r *http.Request, w http.ResponseWriter, code int, format string, args ...interface{}) {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep keep replace keep replace keep keep keep keep
|
<mask> s.serverLock.RLock()
<mask> defer s.serverLock.RUnlock()
<mask>
<mask> upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
<mask> upstreamFile := s.conf.UpstreamDNSFileName
<mask> bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS)
<mask> protectionEnabled := s.conf.ProtectionEnabled
<mask> blockingMode := s.conf.BlockingMode
<mask> blockingIPv4 := s.conf.BlockingIPv4
<mask> blockingIPv6 := s.conf.BlockingIPv6
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove AllowedClients: aghstrings.CloneSlice(s.conf.AllowedClients),
DisallowedClients: aghstrings.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: aghstrings.CloneSlice(s.conf.BlockedHosts),
</s> add AllowedClients: stringutil.CloneSlice(s.conf.AllowedClients),
DisallowedClients: stringutil.CloneSlice(s.conf.DisallowedClients),
BlockedHosts: stringutil.CloneSlice(s.conf.BlockedHosts), </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
</s> add localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> cacheMaxTTL := s.conf.CacheMaxTTL
<mask> cacheOptimistic := s.conf.CacheOptimistic
<mask> resolveClients := s.conf.ResolveClients
<mask> usePrivateRDNS := s.conf.UsePrivateRDNS
<mask> localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
<mask> var upstreamMode string
<mask> if s.conf.FastestAddr {
<mask> upstreamMode = "fastest_addr"
<mask> } else if s.conf.AllServers {
<mask> upstreamMode = "parallel"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
</s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot) </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove aghstrings.WriteToBuilder(b, m.Path)
</s> add stringutil.WriteToBuilder(b, m.Path) </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove aghstrings.WriteToBuilder(b, sep, ver)
</s> add stringutil.WriteToBuilder(b, sep, ver)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep add keep keep keep keep keep keep
|
<mask> PrivateUpstreams []string `json:"private_upstream"`
<mask> }
<mask>
<mask> // ValidateUpstreams validates each upstream and returns an error if any
<mask> // upstream is invalid or if there are no default upstreams specified.
<mask> //
<mask> // TODO(e.burkov): Move into aghnet or even into dnsproxy.
<mask> func ValidateUpstreams(upstreams []string) (err error) {
<mask> // No need to validate comments
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove if aghstrings.IsCommentOrEmpty(input) {
</s> add if IsCommentOrEmpty(input) { </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> //
<mask> // TODO(e.burkov): Move into aghnet or even into dnsproxy.
<mask> func ValidateUpstreams(upstreams []string) (err error) {
<mask> // No need to validate comments
<mask> upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
<mask>
<mask> // Consider this case valid because defaultDNS will be used
<mask> if len(upstreams) == 0 {
<mask> return nil
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> remove if aghstrings.IsCommentOrEmpty(line) {
</s> add if len(line) == 0 || line[0] == '#' { </s> remove if aghstrings.IsCommentOrEmpty(input) {
</s> add if IsCommentOrEmpty(input) {
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return nil
<mask> }
<mask>
<mask> func checkDNS(input string, bootstrap []string, timeout time.Duration, ef excFunc) (err error) {
<mask> if aghstrings.IsCommentOrEmpty(input) {
<mask> return nil
<mask> }
<mask>
<mask> // Separate upstream from domains list.
<mask> var useDefault bool
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
</s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove clientIDs *aghstrings.Set,
</s> add clientIDs *stringutil.Set, </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http.go
|
keep keep add keep keep keep keep
|
<mask> }
<mask> }
<mask>
<mask> // TODO(a.garipov): Rewrite to check the actual error messages.
<mask> func TestValidateUpstream(t *testing.T) {
<mask> testCases := []struct {
<mask> name string
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
</s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/dnsforward/http_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "sync"
<mask> "sync/atomic"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/filtering.go
|
keep keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/AdguardTeam/urlfilter/filterlist"
<mask> "github.com/AdguardTeam/urlfilter/rules"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/filtering.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if len(rr) != 0 {
<mask> res.Reason = Rewritten
<mask> }
<mask>
<mask> cnames := aghstrings.NewSet()
<mask> origHost := host
<mask> for len(rr) != 0 && rr[0].Type == dns.TypeCNAME {
<mask> log.Debug("rewrite: CNAME for %s is %s", host, rr[0].Answer)
<mask>
<mask> if host == rr[0].Answer { // "host == CNAME" is an exception
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove if aghstrings.IsCommentOrEmpty(line) {
</s> add if len(line) == 0 || line[0] == '#' {
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/filtering.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "sort"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> "golang.org/x/net/publicsuffix"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/safebrowsing.go
|
keep keep keep add keep keep keep keep
|
<mask>
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> "golang.org/x/net/publicsuffix"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/safebrowsing.go
|
keep keep keep keep replace keep keep keep replace keep keep keep keep
|
<mask>
<mask> for hash := range c.hashToHost {
<mask> // TODO(e.burkov, a.garipov): Find out and document why exactly
<mask> // this slice.
<mask> aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
<mask> }
<mask>
<mask> if c.svc == "SafeBrowsing" {
<mask> aghstrings.WriteToBuilder(b, sbTXTSuffix)
<mask>
<mask> return b.String()
<mask> }
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> add stringutil.WriteToBuilder(b, pcTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
</s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/safebrowsing.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> return b.String()
<mask> }
<mask>
<mask> aghstrings.WriteToBuilder(b, pcTXTSuffix)
<mask>
<mask> return b.String()
<mask> }
<mask>
<mask> // Find the target hash in TXT response
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, sbTXTSuffix)
</s> add stringutil.WriteToBuilder(b, sbTXTSuffix) </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
</s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, suffix)
</s> add stringutil.WriteToBuilder(b, suffix) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".")
</s> add stringutil.WriteToBuilder(b, hex.EncodeToString(hash[0:2]), ".") </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/filtering/safebrowsing.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> const clientsUpdatePeriod = 10 * time.Minute
<mask>
<mask> var webHandlersRegistered = false
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/google/go-cmp/cmp" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove var allowedLanguages = aghstrings.NewSet(
</s> add var allowedLanguages = stringutil.NewSet( </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> ipToRC *aghnet.IPMap
<mask>
<mask> lock sync.Mutex
<mask>
<mask> allTags *aghstrings.Set
<mask>
<mask> // dhcpServer is used for looking up clients IP addresses by MAC addresses
<mask> dhcpServer *dhcpd.Server
<mask>
<mask> // dnsServer is used for checking clients IP status access list status
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove return aghstrings.CloneSlice(s.conf.LocalPTRResolvers),
</s> add return stringutil.CloneSlice(s.conf.LocalPTRResolvers), </s> remove addrs *aghstrings.Set
</s> add addrs *stringutil.Set </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> clients.list = make(map[string]*Client)
<mask> clients.idIndex = make(map[string]*Client)
<mask> clients.ipToRC = aghnet.NewIPMap(0)
<mask>
<mask> clients.allTags = aghstrings.NewSet(clientTags...)
<mask>
<mask> clients.dhcpServer = dhcpServer
<mask> clients.etcHosts = etcHosts
<mask> clients.addFromConfig(objects)
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags)
cy.IDs = aghstrings.CloneSlice(cli.IDs)
cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices)
cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams)
</s> add cy.Tags = stringutil.CloneSlice(cli.Tags)
cy.IDs = stringutil.CloneSlice(cli.IDs)
cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices)
cy.Upstreams = stringutil.CloneSlice(cli.Upstreams) </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove v = aghstrings.Coalesce(orgname, v)
</s> add v = stringutil.Coalesce(orgname, v) </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove aghstrings.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
</s> add stringutil.WriteToBuilder(b, strconv.Itoa(int(val)), dot)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> SafeBrowsingEnabled: cli.SafeBrowsingEnabled,
<mask> UseGlobalBlockedServices: !cli.UseOwnBlockedServices,
<mask> }
<mask>
<mask> cy.Tags = aghstrings.CloneSlice(cli.Tags)
<mask> cy.IDs = aghstrings.CloneSlice(cli.IDs)
<mask> cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices)
<mask> cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams)
<mask>
<mask> *objects = append(*objects, cy)
<mask> }
<mask> clients.lock.Unlock()
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove clients.allTags = aghstrings.NewSet(clientTags...)
</s> add clients.allTags = stringutil.NewSet(clientTags...) </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove v = aghstrings.Coalesce(orgname, v)
</s> add v = stringutil.Coalesce(orgname, v) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> if !ok {
<mask> return nil, false
<mask> }
<mask>
<mask> c.IDs = aghstrings.CloneSlice(c.IDs)
<mask> c.Tags = aghstrings.CloneSlice(c.Tags)
<mask> c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
<mask> c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
<mask> return c, true
<mask> }
<mask>
<mask> // findUpstreams returns upstreams configured for the client, identified either
<mask> // by its IP address or its ClientID. upsConf is nil if the client isn't found
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty) </s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if !ok {
<mask> return nil, nil
<mask> }
<mask>
<mask> upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
<mask> if len(upstreams) == 0 {
<mask> return nil, nil
<mask> }
<mask>
<mask> if c.upstreamConfig != nil {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove id := aghstrings.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr))
</s> add id := stringutil.Coalesce(ctx.clientID, ipStringFromAddr(d.Addr)) </s> remove if aghstrings.IsCommentOrEmpty(input) {
</s> add if IsCommentOrEmpty(input) {
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/clients.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "io"
<mask> "net/http"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // TODO(a.garipov): Get rid of a global variable?
<mask> var allowedLanguages = aghstrings.NewSet(
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet(
</s> add var allowedLanguages = stringutil.NewSet( </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/i18n.go
|
keep add keep keep keep keep keep keep
|
<mask>
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // TODO(a.garipov): Get rid of a global variable?
<mask> var allowedLanguages = stringutil.NewSet(
<mask> "be",
<mask> "bg",
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove var allowedLanguages = aghstrings.NewSet(
</s> add var allowedLanguages = stringutil.NewSet( </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set </s> add "github.com/google/go-cmp/cmp" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet()
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/i18n.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // TODO(a.garipov): Get rid of a global variable?
<mask> var allowedLanguages = aghstrings.NewSet(
<mask> "be",
<mask> "bg",
<mask> "cs",
<mask> "da",
<mask> "de",
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set </s> add "github.com/google/go-cmp/cmp" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet()
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/i18n.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghnet"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtest"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/rdns_test.go
|
keep add keep keep keep keep
|
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/rdns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> clients: &clientsContainer{
<mask> list: map[string]*Client{},
<mask> idIndex: tc.cliIDIndex,
<mask> ipToRC: aghnet.NewIPMap(0),
<mask> allTags: aghstrings.NewSet(),
<mask> },
<mask> }
<mask> ipCache.Clear()
<mask> ipCache.Set(net.IP{1, 2, 3, 4}, ttl)
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove addrs: aghstrings.NewSet(),
</s> add addrs: stringutil.NewSet(), </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
</s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, pcTXTSuffix)
</s> add stringutil.WriteToBuilder(b, pcTXTSuffix)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/rdns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> cc := &clientsContainer{
<mask> list: map[string]*Client{},
<mask> idIndex: map[string]*Client{},
<mask> ipToRC: aghnet.NewIPMap(0),
<mask> allTags: aghstrings.NewSet(),
<mask> }
<mask> ch := make(chan net.IP)
<mask> rdns := &RDNS{
<mask> exchanger: &rDNSExchanger{
<mask> ex: aghtest.Exchanger{
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove allTags: aghstrings.NewSet(),
</s> add allTags: stringutil.NewSet(), </s> remove allowedClientIDs: aghstrings.NewSet(),
blockedClientIDs: aghstrings.NewSet(),
</s> add allowedClientIDs: stringutil.NewSet(),
blockedClientIDs: stringutil.NewSet(), </s> remove bootstraps := aghstrings.CloneSliceOrEmpty(s.conf.BootstrapDNS)
</s> add bootstraps := stringutil.CloneSliceOrEmpty(s.conf.BootstrapDNS) </s> remove upstreams := aghstrings.CloneSliceOrEmpty(s.conf.UpstreamDNS)
</s> add upstreams := stringutil.CloneSliceOrEmpty(s.conf.UpstreamDNS) </s> remove localPTRUpstreams := aghstrings.CloneSliceOrEmpty(s.conf.LocalPTRResolvers)
</s> add localPTRUpstreams := stringutil.CloneSliceOrEmpty(s.conf.LocalPTRResolvers) </s> remove aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n")
</s> add stringutil.WriteToBuilder(b, strings.ToLower(h), "\n")
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/rdns_test.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "fmt"
<mask> "net/http"
<mask> "os"
<mask> "path/filepath"
<mask> "reflect"
<mask> "runtime"
<mask> "strings"
<mask> "sync"
<mask> "time"
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/tls.go
|
keep keep add keep keep keep keep
|
<mask>
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "golang.org/x/sys/cpu"
<mask> )
<mask>
<mask> var tlsWebHandlersRegistered = false
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove var allowedLanguages = aghstrings.NewSet(
</s> add var allowedLanguages = stringutil.NewSet( </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/tls.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> status = validateCertificates(string(data.CertificateChainData), string(data.PrivateKeyData), data.ServerName)
<mask> restartHTTPS := false
<mask> t.confLock.Lock()
<mask> if !reflect.DeepEqual(t.conf, data) {
<mask> log.Printf("tls config settings have changed, will restart HTTPS server")
<mask> restartHTTPS = true
<mask> }
<mask> // Note: don't do just `t.conf = data` because we must preserve all other members of t.conf
<mask> t.conf.Enabled = data.Enabled
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove c.IDs = aghstrings.CloneSlice(c.IDs)
c.Tags = aghstrings.CloneSlice(c.Tags)
c.BlockedServices = aghstrings.CloneSlice(c.BlockedServices)
c.Upstreams = aghstrings.CloneSlice(c.Upstreams)
</s> add c.IDs = stringutil.CloneSlice(c.IDs)
c.Tags = stringutil.CloneSlice(c.Tags)
c.BlockedServices = stringutil.CloneSlice(c.BlockedServices)
c.Upstreams = stringutil.CloneSlice(c.Upstreams) </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet() </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/google/go-cmp/cmp" </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/tls.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/whois.go
|
keep keep keep add keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghio"
<mask> "github.com/AdguardTeam/golibs/cache"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> const (
<mask> defaultServer = "whois.arin.net"
<mask> defaultPort = "43"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/google/go-cmp/cmp"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/whois.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> case "city", "country":
<mask> v = trimValue(v)
<mask> case "descr", "netname":
<mask> k = "orgname"
<mask> v = aghstrings.Coalesce(orgname, v)
<mask> orgname = v
<mask> case "whois":
<mask> k = "whois"
<mask> case "referralserver":
<mask> k = "whois"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove if !aghstrings.InSlice(filteringStatusValues, val) {
</s> add if !stringutil.InSlice(filteringStatusValues, val) { </s> remove clients.allTags = aghstrings.NewSet(clientTags...)
</s> add clients.allTags = stringutil.NewSet(clientTags...) </s> remove cy.Tags = aghstrings.CloneSlice(cli.Tags)
cy.IDs = aghstrings.CloneSlice(cli.IDs)
cy.BlockedServices = aghstrings.CloneSlice(cli.BlockedServices)
cy.Upstreams = aghstrings.CloneSlice(cli.Upstreams)
</s> add cy.Tags = stringutil.CloneSlice(cli.Tags)
cy.IDs = stringutil.CloneSlice(cli.IDs)
cy.BlockedServices = stringutil.CloneSlice(cli.BlockedServices)
cy.Upstreams = stringutil.CloneSlice(cli.Upstreams) </s> remove c.RatelimitWhitelist = aghstrings.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = aghstrings.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = aghstrings.CloneSlice(sc.AllowedClients)
c.DisallowedClients = aghstrings.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = aghstrings.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = aghstrings.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = aghstrings.CloneSlice(sc.UpstreamDNS)
</s> add c.RatelimitWhitelist = stringutil.CloneSlice(sc.RatelimitWhitelist)
c.BootstrapDNS = stringutil.CloneSlice(sc.BootstrapDNS)
c.AllowedClients = stringutil.CloneSlice(sc.AllowedClients)
c.DisallowedClients = stringutil.CloneSlice(sc.DisallowedClients)
c.BlockedHosts = stringutil.CloneSlice(sc.BlockedHosts)
c.TrustedProxies = stringutil.CloneSlice(sc.TrustedProxies)
c.UpstreamDNS = stringutil.CloneSlice(sc.UpstreamDNS) </s> remove s.leaseHosts = aghstrings.NewSet()
</s> add s.leaseHosts = stringutil.NewSet()
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/home/whois.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strconv"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> "github.com/AdguardTeam/golibs/jsonutil"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "golang.org/x/net/idna"
<mask> )
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add "github.com/AdguardTeam/golibs/stringutil" </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/querylog/http.go
|
keep add keep keep keep keep keep keep
|
<mask> "github.com/AdguardTeam/golibs/jsonutil"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "golang.org/x/net/idna"
<mask> )
<mask>
<mask> type qlogConfig struct {
<mask> Enabled bool `json:"enabled"`
<mask> // Use float64 here to support fractional numbers and not mess the API
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove allowedClientIDs *aghstrings.Set
blockedClientIDs *aghstrings.Set
</s> add allowedClientIDs *stringutil.Set
blockedClientIDs *stringutil.Set </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> add "github.com/AdguardTeam/golibs/stringutil"
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/querylog/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // twice.
<mask> asciiVal = ""
<mask> }
<mask> case ctFilteringStatus:
<mask> if !aghstrings.InSlice(filteringStatusValues, val) {
<mask> return false, sc, fmt.Errorf("invalid value %s", val)
<mask> }
<mask> default:
<mask> return false, sc, fmt.Errorf(
<mask> "invalid criterion type %v: should be one of %v",
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> add ourAddrsSet := stringutil.NewSet(ourAddrs...) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil
</s> add return stringutil.FilterOut(addrs, ourAddrsSet.Has), nil </s> remove v = aghstrings.Coalesce(orgname, v)
</s> add v = stringutil.Coalesce(orgname, v) </s> remove d := string(data)
for len(d) != 0 {
s := aghstrings.SplitNext(&d, '\n')
upstreams = append(upstreams, s)
}
</s> add upstreams = stringutil.SplitTrimmed(string(data), "\n")
</s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
</s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/querylog/http.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "runtime/debug"
<mask> "strconv"
<mask> "strings"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
<mask> )
<mask>
<mask> // Channel constants.
<mask> const (
<mask> ChannelDevelopment = "development"
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> add "github.com/AdguardTeam/golibs/stringutil" </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghstrings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> b := &strings.Builder{}
<mask>
<mask> aghstrings.WriteToBuilder(b, m.Path)
<mask> if ver := m.Version; ver != "" {
<mask> sep := modInfoAtSep
<mask> if ver == "(devel)" {
<mask> sep = modInfoDevSep
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, sep, ver)
</s> add stringutil.WriteToBuilder(b, sep, ver) </s> remove aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n")
</s> add stringutil.WriteToBuilder(b, strings.ToLower(h), "\n") </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr) </s> remove aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
</s> add stringutil.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep keep replace keep keep replace keep keep
|
<mask> if ver == "(devel)" {
<mask> sep = modInfoDevSep
<mask> }
<mask> aghstrings.WriteToBuilder(b, sep, ver)
<mask> }
<mask> if sum := m.Sum; sum != "" {
<mask> aghstrings.WriteToBuilder(b, modInfoSumLeft, sum, modInfoSumRight)
<mask> }
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, m.Path)
</s> add stringutil.WriteToBuilder(b, m.Path) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
</s> add stringutil.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // TODO(e.burkov): Make it write into passed io.Writer.
<mask> func Verbose() (v string) {
<mask> b := &strings.Builder{}
<mask>
<mask> aghstrings.WriteToBuilder(
<mask> b,
<mask> vFmtAGHHdr,
<mask> nl,
<mask> vFmtVerHdr,
<mask> version,
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, strings.ToLower(h), "\n")
</s> add stringutil.WriteToBuilder(b, strings.ToLower(h), "\n") </s> remove aghstrings.WriteToBuilder(b, m.Path)
</s> add stringutil.WriteToBuilder(b, m.Path) </s> remove upstreams = aghstrings.FilterOut(upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams = stringutil.FilterOut(upstreams, IsCommentOrEmpty) </s> remove aghstrings.WriteToBuilder(
</s> add stringutil.WriteToBuilder( </s> add // IsCommentOrEmpty returns true of the string starts with a "#" character or is
// an empty string. This function is useful for filtering out non-upstream
// lines from upstream configs.
func IsCommentOrEmpty(s string) (ok bool) {
return len(s) == 0 || s[0] == '#'
}
</s> remove if aghstrings.IsCommentOrEmpty(line) {
</s> add if len(line) == 0 || line[0] == '#' {
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep replace keep replace keep
|
<mask> )
<mask> if buildtime != "" {
<mask> aghstrings.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
<mask> }
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
<mask> if goarm != "" {
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace)) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep replace keep replace keep keep
|
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
<mask> if goarm != "" {
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
<mask> } else if gomips != "" {
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
<mask> }
<mask> aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace)) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
</s> add stringutil.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
<mask> } else if gomips != "" {
<mask> aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
<mask> }
<mask> aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
<mask>
<mask> info, ok := debug.ReadBuildInfo()
<mask> if !ok {
<mask> return b.String()
<mask> }
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
</s> add stringutil.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtDepsHdr) </s> remove aghstrings.WriteToBuilder(b, nltb, depStr)
</s> add stringutil.WriteToBuilder(b, nltb, depStr)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep keep keep keep replace keep keep replace
|
<mask> if len(info.Deps) == 0 {
<mask> return b.String()
<mask> }
<mask>
<mask> aghstrings.WriteToBuilder(b, nl, vFmtDepsHdr)
<mask> for _, dep := range info.Deps {
<mask> if depStr := fmtModule(dep); depStr != "" {
<mask> aghstrings.WriteToBuilder(b, nltb, depStr)
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove aghstrings.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace))
</s> add stringutil.WriteToBuilder(b, nl, vFmtRaceHdr, strconv.FormatBool(isRace)) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOMIPSHdr, gomips) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOOSHdr, nl, vFmtGOARCHHdr) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime)
</s> add stringutil.WriteToBuilder(b, nl, vFmtTimeHdr, buildtime) </s> remove aghstrings.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
</s> add stringutil.WriteToBuilder(b, nl, vFmtGOARMHdr, "v", goarm)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
internal/version/version.go
|
keep replace keep keep keep replace keep keep keep
|
<mask> # if there are any, because the commit could be in a temporary branch.
<mask> git grep -e 'TODO.*!!' -- ':!HACKING.md' ':!scripts/hooks/pre-commit' | cat || :
<mask>
<mask> if [ "$( git diff --cached --name-only -- 'client/*.js' )" ]
<mask> then
<mask> make js-lint js-test
<mask> fi
<mask>
<mask> if [ "$( git diff --cached --name-only -- 'client2/*.js' 'client2/*.ts' 'client2/*.tsx' )" ]
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove make js-beta-lint js-beta-test
</s> add make VERBOSE="$verbose" js-beta-lint js-beta-test </s> remove make txt-lint
</s> add make VERBOSE="$verbose" txt-lint </s> remove make go-os-check go-lint go-test
</s> add make VERBOSE="$verbose" go-os-check go-lint go-test </s> remove make openapi-lint
</s> add make VERBOSE="$verbose" openapi-lint </s> remove if aghstrings.IsCommentOrEmpty(line) {
</s> add if len(line) == 0 || line[0] == '#' {
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
scripts/hooks/pre-commit
|
keep replace keep keep keep keep replace keep keep
|
<mask> then
<mask> make js-beta-lint js-beta-test
<mask> fi
<mask>
<mask> if [ "$( git diff --cached --name-only -- '*.go' '*.mod' '*.sh' 'Makefile' )" ]
<mask> then
<mask> make go-os-check go-lint go-test
<mask> fi
<mask>
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove make txt-lint
</s> add make VERBOSE="$verbose" txt-lint </s> remove make js-lint js-test
</s> add make VERBOSE="$verbose" js-lint js-test </s> remove make openapi-lint
</s> add make VERBOSE="$verbose" openapi-lint </s> remove git grep -e 'TODO.*!!' -- ':!HACKING.md' ':!scripts/hooks/pre-commit' | cat || :
</s> add git grep -e 'TODO.*!!' -- ':!scripts/hooks/pre-commit' | cat || :
verbose="${VERBOSE:-0}"
readonly verbose </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
scripts/hooks/pre-commit
|
keep keep keep replace keep keep keep keep replace
|
<mask>
<mask> if [ "$( git diff --cached --name-only -- '*.md' '*.yaml' '*.yml' )" ]
<mask> then
<mask> make txt-lint
<mask> fi
<mask>
<mask> if [ "$( git diff --cached --name-only -- './openapi/openapi.yaml' )" ]
<mask> then
<mask> make openapi-lint
</s> Pull request: all: replace aghstrings with stringutil
Merge in DNS/adguard-home from add-stringutil to master
Squashed commit of the following:
commit 4ca9b29356de7d0a162b1e5a6496c691e9751f15
Author: Ainar Garipov <[email protected]>
Date: Thu Jul 29 17:29:25 2021 +0300
all: replace aghstrings with stringutil </s> remove make go-os-check go-lint go-test
</s> add make VERBOSE="$verbose" go-os-check go-lint go-test </s> remove make js-beta-lint js-beta-test
</s> add make VERBOSE="$verbose" js-beta-lint js-beta-test </s> remove make js-lint js-test
</s> add make VERBOSE="$verbose" js-lint js-test </s> remove git grep -e 'TODO.*!!' -- ':!HACKING.md' ':!scripts/hooks/pre-commit' | cat || :
</s> add git grep -e 'TODO.*!!' -- ':!scripts/hooks/pre-commit' | cat || :
verbose="${VERBOSE:-0}"
readonly verbose </s> remove upstreams := aghstrings.FilterOut(c.Upstreams, aghstrings.IsCommentOrEmpty)
</s> add upstreams := stringutil.FilterOut(c.Upstreams, dnsforward.IsCommentOrEmpty)
|
https://github.com/AdguardTeam/AdGuardHome/commit/63ee95dfbed2ee4320779dfca78f4cb5e4ad86e6
|
scripts/hooks/pre-commit
|
keep keep add keep keep keep keep keep keep
|
<mask> "strings"
<mask> "syscall"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/update"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> type getVersionJSONRequest struct {
<mask> RecheckNow bool `json:"recheck_now"`
</s> Pull request: 2231 autoupdate
Merge in DNS/adguard-home from 2231-autoupdate to master
Updates #2231.
Squashed commit of the following:
commit 4ee9148ee7a38f2759898302a2109aa982fb4ee9
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 30 19:08:14 2020 +0300
sysutil: provide os-independent interface
commit 778097c5fdeb1dec94f4cfc6443d08f92d9db0ba
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 30 16:40:33 2020 +0300
all: add sysutil package </s> remove "github.com/AdguardTeam/AdGuardHome/internal/util"
</s> add </s> add "github.com/AdguardTeam/AdGuardHome/internal/sysutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/sysutil" </s> remove err := util.ConfigureSyslog(serviceName)
</s> add err := sysutil.ConfigureSyslog(serviceName) </s> remove util.SetRlimit(config.RlimitNoFile)
</s> add sysutil.SetRlimit(config.RlimitNoFile) </s> remove admin, _ := util.HaveAdminRights()
</s> add admin, _ := sysutil.HaveAdminRights()
|
https://github.com/AdguardTeam/AdGuardHome/commit/641db73a86a6d9d047f47c403bca70af320f23e9
|
internal/home/control_update.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "strings"
<mask> "syscall"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/update"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> type getVersionJSONRequest struct {
<mask> RecheckNow bool `json:"recheck_now"`
</s> Pull request: 2231 autoupdate
Merge in DNS/adguard-home from 2231-autoupdate to master
Updates #2231.
Squashed commit of the following:
commit 4ee9148ee7a38f2759898302a2109aa982fb4ee9
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 30 19:08:14 2020 +0300
sysutil: provide os-independent interface
commit 778097c5fdeb1dec94f4cfc6443d08f92d9db0ba
Author: Eugene Burkov <[email protected]>
Date: Mon Nov 30 16:40:33 2020 +0300
all: add sysutil package </s> add "github.com/AdguardTeam/AdGuardHome/internal/sysutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/sysutil" </s> add "github.com/AdguardTeam/AdGuardHome/internal/sysutil" </s> remove err := util.ConfigureSyslog(serviceName)
</s> add err := sysutil.ConfigureSyslog(serviceName) </s> remove util.SetRlimit(config.RlimitNoFile)
</s> add sysutil.SetRlimit(config.RlimitNoFile) </s> remove admin, _ := util.HaveAdminRights()
</s> add admin, _ := sysutil.HaveAdminRights()
|
https://github.com/AdguardTeam/AdGuardHome/commit/641db73a86a6d9d047f47c403bca70af320f23e9
|
internal/home/control_update.go
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.