docstring_tokens
stringlengths 0
76.5k
| code_tokens
stringlengths 75
1.81M
| label_window
sequencelengths 4
2.12k
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|---|
golang.org/x/net v0.0.0-20190119204137-ed066c81e75e h1:MDa3fSUp6MdYHouVmCCNz/zaH2a6CRcxY3VhT/K3C5Q=
golang.org/x/net v0.0.0-20190119204137-ed066c81e75e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= | <mask> go.uber.org/goleak v0.10.0/go.mod h1:VCZuO8V8mFPlL0F5J5GK1rtHV3DrFcQ1R8ryq7FK0aI=
<mask> golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9 h1:mKdxBk7AujPs8kU4m80U72y/zjbZ3UcXC7dClwKbUI0=
<mask> golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
<mask> golang.org/x/net v0.0.0-20181102091132-c10e9556a7bc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
<mask> golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6 h1:gT0Y6H7hbVPUtvtk0YGxMXPgN+p8fYlqWkgJeUCZcaQ=
<mask> golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
<mask> golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
<mask> golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
<mask> golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA=
<mask> golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
<mask> golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
<mask> golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
<mask> golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
</s> go.mod -- update dnsproxy to v0.9.11 and it's dependencies </s> remove golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM=
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb h1:pf3XwC90UUdNPYWZdFjhGBE7DUFuK3Ct1zWmZ65QN30=
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
</s> add golang.org/x/sys v0.0.0-20190122071731-054c452bb702 h1:Lk4tbZFnlyPgV+sLgTw5yGfzrlOn9kx4vSombi2FFlY=
golang.org/x/sys v0.0.0-20190122071731-054c452bb702/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= </s> remove golang.org/x/net v0.0.0-20181220203305-927f97764cc3
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb
</s> add golang.org/x/net v0.0.0-20190119204137-ed066c81e75e
golang.org/x/sys v0.0.0-20190122071731-054c452bb702 </s> remove github.com/hmage/golibs v0.0.0-20181229160906-c8491df0bfc4 h1:FMAReGTEDNr4AdbScv/PqzjMQUpkkVHiF/t8sDHQQVQ=
github.com/hmage/golibs v0.0.0-20181229160906-c8491df0bfc4/go.mod h1:H6Ev6svFxUVPFThxLtdnFfcE9e3GWufpfmcVFpqV6HM=
</s> add github.com/hmage/golibs v0.0.0-20190121112702-20153bd03c24 h1:yyDtaSMcAZdm1I6uL8YLghpWiJljfBHs8NC/P86PYQk=
github.com/hmage/golibs v0.0.0-20190121112702-20153bd03c24/go.mod h1:H6Ev6svFxUVPFThxLtdnFfcE9e3GWufpfmcVFpqV6HM= </s> remove github.com/ameshkov/dnscrypt v1.0.4 h1:vtwHm5m4R2dhcCx23wiI+gNBoy7qm4h7+kZ4Pucw/vE=
github.com/ameshkov/dnscrypt v1.0.4/go.mod h1:hVW52S6r0QvUpIwsyfZ1ifYYpfGu5pewD3pl7afMJcQ=
</s> add github.com/ameshkov/dnscrypt v1.0.6 h1:55wfnNF8c4E3JXDNlwPl2Pbs7UPPIh+kI6KK3THqYS0=
github.com/ameshkov/dnscrypt v1.0.6/go.mod h1:ZvT9LaNaJfDNXKIbkYFf24HUgHuQR6MNT6nwVvN4jMQ= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0820983d81d3317640b04072679858c1a54bcb9e | go.sum |
golang.org/x/sys v0.0.0-20190122071731-054c452bb702 h1:Lk4tbZFnlyPgV+sLgTw5yGfzrlOn9kx4vSombi2FFlY=
golang.org/x/sys v0.0.0-20190122071731-054c452bb702/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= | <mask> golang.org/x/sync v0.0.0-20181108010431-42b317875d0f h1:Bl/8QSvNqXvPGPGXa2z5xUTmV7VDcZyvRZ+QQXkXTZQ=
<mask> golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
<mask> golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4 h1:YUO/7uOKsKeq9UokNS62b8FYywz3ker1l1vDZRCRefw=
<mask> golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
<mask> golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06 h1:0oC8rFnE+74kEmuHZ46F6KHsMr5Gx2gUQPuNz28iQZM=
<mask> golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb h1:pf3XwC90UUdNPYWZdFjhGBE7DUFuK3Ct1zWmZ65QN30=
<mask> golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> gopkg.in/asaskevich/govalidator.v4 v4.0.0-20160518190739-766470278477 h1:5xUJw+lg4zao9W4HIDzlFbMYgSgtvNVHh00MEHvbGpQ=
<mask> gopkg.in/asaskevich/govalidator.v4 v4.0.0-20160518190739-766470278477/go.mod h1:QDV1vrFSrowdoOba0UM8VJPUZONT7dnfdLsM+GG53Z8=
<mask> gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
<mask> gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
<mask> gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
</s> go.mod -- update dnsproxy to v0.9.11 and it's dependencies </s> remove golang.org/x/net v0.0.0-20181220203305-927f97764cc3
golang.org/x/sys v0.0.0-20181228144115-9a3f9b0469bb
</s> add golang.org/x/net v0.0.0-20190119204137-ed066c81e75e
golang.org/x/sys v0.0.0-20190122071731-054c452bb702 </s> remove golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6 h1:gT0Y6H7hbVPUtvtk0YGxMXPgN+p8fYlqWkgJeUCZcaQ=
golang.org/x/net v0.0.0-20181213202711-891ebc4b82d6/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3 h1:eH6Eip3UpmR+yM/qI9Ijluzb1bNv/cAU/n+6l8tRSis=
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
</s> add golang.org/x/net v0.0.0-20190119204137-ed066c81e75e h1:MDa3fSUp6MdYHouVmCCNz/zaH2a6CRcxY3VhT/K3C5Q=
golang.org/x/net v0.0.0-20190119204137-ed066c81e75e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= </s> remove github.com/hmage/golibs v0.0.0-20181229160906-c8491df0bfc4 h1:FMAReGTEDNr4AdbScv/PqzjMQUpkkVHiF/t8sDHQQVQ=
github.com/hmage/golibs v0.0.0-20181229160906-c8491df0bfc4/go.mod h1:H6Ev6svFxUVPFThxLtdnFfcE9e3GWufpfmcVFpqV6HM=
</s> add github.com/hmage/golibs v0.0.0-20190121112702-20153bd03c24 h1:yyDtaSMcAZdm1I6uL8YLghpWiJljfBHs8NC/P86PYQk=
github.com/hmage/golibs v0.0.0-20190121112702-20153bd03c24/go.mod h1:H6Ev6svFxUVPFThxLtdnFfcE9e3GWufpfmcVFpqV6HM= </s> remove github.com/ameshkov/dnscrypt v1.0.4 h1:vtwHm5m4R2dhcCx23wiI+gNBoy7qm4h7+kZ4Pucw/vE=
github.com/ameshkov/dnscrypt v1.0.4/go.mod h1:hVW52S6r0QvUpIwsyfZ1ifYYpfGu5pewD3pl7afMJcQ=
</s> add github.com/ameshkov/dnscrypt v1.0.6 h1:55wfnNF8c4E3JXDNlwPl2Pbs7UPPIh+kI6KK3THqYS0=
github.com/ameshkov/dnscrypt v1.0.6/go.mod h1:ZvT9LaNaJfDNXKIbkYFf24HUgHuQR6MNT6nwVvN4jMQ= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/0820983d81d3317640b04072679858c1a54bcb9e | go.sum |
"github.com/joomcode/errorx"
| <mask> "strings"
<mask> "sync/atomic"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/urlfilter"
<mask> "github.com/bluele/gcache"
<mask> "github.com/miekg/dns"
<mask> "golang.org/x/net/publicsuffix"
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | dnsfilter/dnsfilter.go |
if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error | <mask> if e != nil {
<mask> return nil, e
<mask> }
<mask>
<mask> var firstErr error
<mask> firstErr = nil
<mask> for _, a := range addrs {
<mask> addr = fmt.Sprintf("%s:%s", a.String(), port)
<mask> con, err := dialer.DialContext(ctx, network, addr)
<mask> if err != nil {
<mask> if firstErr == nil {
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | dnsfilter/dnsfilter.go |
dialErrs = append(dialErrs, err) | <mask> for _, a := range addrs {
<mask> addr = fmt.Sprintf("%s:%s", a.String(), port)
<mask> con, err := dialer.DialContext(ctx, network, addr)
<mask> if err != nil {
<mask> if firstErr == nil {
<mask> firstErr = err
<mask> }
<mask> continue
<mask> }
<mask>
<mask> if cache {
<mask> addToDialCache(host, a.String())
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | dnsfilter/dnsfilter.go |
return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | <mask> }
<mask>
<mask> return con, err
<mask> }
<mask> return nil, firstErr
<mask> }
<mask> }
<mask>
<mask> // New creates properly initialized DNS Filter that is ready to be used
<mask> func New(c *Config, filters map[int]string) *Dnsfilter {
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | dnsfilter/dnsfilter.go |
// TODO: Get rid of global variables | <mask> tlsConfigStatus `yaml:"-" json:",inline"`
<mask> }
<mask>
<mask> // initialize to default values, will be changed later when reading config or parsing command line
<mask> var config = configuration{
<mask> ourConfigFilename: "AdGuardHome.yaml",
<mask> BindPort: 3000,
<mask> BindHost: "0.0.0.0",
<mask> DNS: dnsConfig{
<mask> BindHost: "0.0.0.0",
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | home/config.go |
if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error | <mask> if e != nil {
<mask> return nil, e
<mask> }
<mask>
<mask> var firstErr error
<mask> firstErr = nil
<mask> for _, a := range addrs {
<mask> addr = net.JoinHostPort(a.String(), port)
<mask> con, err := dialer.DialContext(ctx, network, addr)
<mask> if err != nil {
<mask> if firstErr == nil {
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | home/helpers.go |
dialErrs = append(dialErrs, err) | <mask> for _, a := range addrs {
<mask> addr = net.JoinHostPort(a.String(), port)
<mask> con, err := dialer.DialContext(ctx, network, addr)
<mask> if err != nil {
<mask> if firstErr == nil {
<mask> firstErr = err
<mask> }
<mask> continue
<mask> }
<mask> return con, err
<mask> }
<mask> return nil, firstErr
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | home/helpers.go |
return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) | <mask> continue
<mask> }
<mask> return con, err
<mask> }
<mask> return nil, firstErr
<mask> }
<mask>
<mask> // check if error is "address already in use"
<mask> func errorIsAddrInUse(err error) bool {
<mask> errOpError, ok := err.(*net.OpError)
</s> Fix #831
This commit fixes panic when customDialContext fails to resolve the host's address. </s> remove return nil, firstErr
</s> add return nil, errorx.DecorateMany(fmt.Sprintf("couldn't dial to %s", addr), dialErrs...) </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove var firstErr error
firstErr = nil
</s> add if len(addrs) == 0 {
return nil, fmt.Errorf("couldn't lookup host: %s", host)
}
var dialErrs []error </s> remove if firstErr == nil {
firstErr = err
}
</s> add dialErrs = append(dialErrs, err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/082354204b6400275854bb37708328ea62da7ed5 | home/helpers.go |
"encryption_warning": "Warning", | <mask> "encryption_issuer": "Issuer",
<mask> "encryption_hostnames": "Hostnames",
<mask> "encryption_reset": "Are you sure you want to reset encryption settings?",
<mask> "topline_expiring_certificate": "Your SSL certificate is about to expire. Update <0>Encryption settings</0>.",
<mask> "topline_expired_certificate": "Your SSL certificate is expired. Update <0>Encryption settings</0>.",
<mask> "form_error_port_range": "Enter port number in the range of 80-65535",
<mask> "form_error_port_unsafe": "Unsafe port",
<mask> "form_error_equal": "Must not be equal",
</s> Pull request: 4927-imp-ui
Updates #4927.
Squashed commit of the following:
commit 510143325805133e379ebc207cdc6bff59c94ade
Author: Ainar Garipov <[email protected]>
Date: Tue Nov 22 15:00:13 2022 +0300
home: imp err
commit fd65a9914494b6dccdee7c0f0aa08bce80ce0945
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 21 18:53:39 2022 +0300
client: imp validation ui </s> remove err = errors.Error(`certificate has no IP addresses` +
`, this may cause issues with DNS-over-TLS clients`)
</s> add err = errNoIPInCert </s> remove {warning_validation && (
<div className="col-12">
<p className="text-danger">{warning_validation}</p>
</div>
)}
</s> add {validationMessage(warning_validation, isWarning)} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08282dc4d9958d8a2ac6163d6d0921517ec45f92 | client/src/__locales/en.json |
const isWarning = valid_key && valid_cert && valid_pair;
| <mask> || !valid_key
<mask> || !valid_cert
<mask> || !valid_pair;
<mask>
<mask> return (
<mask> <form onSubmit={handleSubmit}>
<mask> <div className="row">
<mask> <div className="col-12">
<mask> <div className="form__group form__group--settings">
<mask> <Field
</s> Pull request: 4927-imp-ui
Updates #4927.
Squashed commit of the following:
commit 510143325805133e379ebc207cdc6bff59c94ade
Author: Ainar Garipov <[email protected]>
Date: Tue Nov 22 15:00:13 2022 +0300
home: imp err
commit fd65a9914494b6dccdee7c0f0aa08bce80ce0945
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 21 18:53:39 2022 +0300
client: imp validation ui </s> remove {warning_validation && (
<div className="col-12">
<p className="text-danger">{warning_validation}</p>
</div>
)}
</s> add {validationMessage(warning_validation, isWarning)} </s> remove err = errors.Error(`certificate has no IP addresses` +
`, this may cause issues with DNS-over-TLS clients`)
</s> add err = errNoIPInCert | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08282dc4d9958d8a2ac6163d6d0921517ec45f92 | client/src/components/Settings/Encryption/Form.js |
{validationMessage(warning_validation, isWarning)} | <mask> <KeyStatus validKey={valid_key} keyType={key_type} />
<mask> )}
<mask> </div>
<mask> </div>
<mask> {warning_validation && (
<mask> <div className="col-12">
<mask> <p className="text-danger">{warning_validation}</p>
<mask> </div>
<mask> )}
<mask> </div>
<mask>
<mask> <div className="btn-list mt-2">
<mask> <button
<mask> type="submit"
</s> Pull request: 4927-imp-ui
Updates #4927.
Squashed commit of the following:
commit 510143325805133e379ebc207cdc6bff59c94ade
Author: Ainar Garipov <[email protected]>
Date: Tue Nov 22 15:00:13 2022 +0300
home: imp err
commit fd65a9914494b6dccdee7c0f0aa08bce80ce0945
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 21 18:53:39 2022 +0300
client: imp validation ui </s> remove err = errors.Error(`certificate has no IP addresses` +
`, this may cause issues with DNS-over-TLS clients`)
</s> add err = errNoIPInCert | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08282dc4d9958d8a2ac6163d6d0921517ec45f92 | client/src/components/Settings/Encryption/Form.js |
// errNoIPInCert is the error that is returned from [parseCertChain] if the leaf
// certificate doesn't contain IPs.
const errNoIPInCert errors.Error = `certificates has no IP addresses; ` +
`DNS-over-TLS won't be advertised via DDR`
| <mask> return nil
<mask> }
<mask>
<mask> // parseCertChain parses the certificate chain from raw data, and returns it.
<mask> // If ok is true, the returned error, if any, is not critical.
<mask> func parseCertChain(chain []byte) (parsedCerts []*x509.Certificate, ok bool, err error) {
<mask> log.Debug("tls: got certificate chain: %d bytes", len(chain))
<mask>
</s> Pull request: 4927-imp-ui
Updates #4927.
Squashed commit of the following:
commit 510143325805133e379ebc207cdc6bff59c94ade
Author: Ainar Garipov <[email protected]>
Date: Tue Nov 22 15:00:13 2022 +0300
home: imp err
commit fd65a9914494b6dccdee7c0f0aa08bce80ce0945
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 21 18:53:39 2022 +0300
client: imp validation ui </s> remove err = errors.Error(`certificate has no IP addresses` +
`, this may cause issues with DNS-over-TLS clients`)
</s> add err = errNoIPInCert </s> remove {warning_validation && (
<div className="col-12">
<p className="text-danger">{warning_validation}</p>
</div>
)}
</s> add {validationMessage(warning_validation, isWarning)} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08282dc4d9958d8a2ac6163d6d0921517ec45f92 | internal/home/tls.go |
err = errNoIPInCert | <mask>
<mask> log.Info("tls: number of certs: %d", len(parsedCerts))
<mask>
<mask> if !aghtls.CertificateHasIP(parsedCerts[0]) {
<mask> err = errors.Error(`certificate has no IP addresses` +
<mask> `, this may cause issues with DNS-over-TLS clients`)
<mask> }
<mask>
<mask> return parsedCerts, true, err
<mask> }
<mask>
</s> Pull request: 4927-imp-ui
Updates #4927.
Squashed commit of the following:
commit 510143325805133e379ebc207cdc6bff59c94ade
Author: Ainar Garipov <[email protected]>
Date: Tue Nov 22 15:00:13 2022 +0300
home: imp err
commit fd65a9914494b6dccdee7c0f0aa08bce80ce0945
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 21 18:53:39 2022 +0300
client: imp validation ui </s> remove {warning_validation && (
<div className="col-12">
<p className="text-danger">{warning_validation}</p>
</div>
)}
</s> add {validationMessage(warning_validation, isWarning)} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08282dc4d9958d8a2ac6163d6d0921517ec45f92 | internal/home/tls.go |
'GO_VERSION': '1.18.6' | <mask> 'name': 'build'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.18'
<mask> 'NODE_VERSION': '14'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'branches':
</s> all: use precise go version in github workflows </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08799e9d0a335046f315977aefc4e468b60fddc0 | .github/workflows/build.yml |
'uses': 'actions/setup-go@v3' | <mask> 'uses': 'actions/checkout@v2'
<mask> 'with':
<mask> 'fetch-depth': 0
<mask> - 'name': 'Set up Go'
<mask> 'uses': 'actions/setup-go@v2'
<mask> 'with':
<mask> 'go-version': '${{ env.GO_VERSION }}'
<mask> - 'name': 'Set up Node'
<mask> 'uses': 'actions/setup-node@v1'
<mask> 'with':
</s> all: use precise go version in github workflows </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08799e9d0a335046f315977aefc4e468b60fddc0 | .github/workflows/build.yml |
'uses': 'actions/setup-go@v3' | <mask> 'uses': 'actions/checkout@v2'
<mask> 'with':
<mask> 'fetch-depth': 0
<mask> - 'name': 'Set up Go'
<mask> 'uses': 'actions/setup-go@v2'
<mask> 'with':
<mask> 'go-version': '${{ env.GO_VERSION }}'
<mask> - 'name': 'Set up Node'
<mask> 'uses': 'actions/setup-node@v1'
<mask> 'with':
</s> all: use precise go version in github workflows | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08799e9d0a335046f315977aefc4e468b60fddc0 | .github/workflows/build.yml |
'GO_VERSION': '1.18.6' | <mask> 'name': 'lint'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.18'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'tags':
<mask> - 'v*'
</s> all: use precise go version in github workflows </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08799e9d0a335046f315977aefc4e468b60fddc0 | .github/workflows/lint.yml |
'uses': 'actions/setup-go@v3' | <mask> 'runs-on': 'ubuntu-latest'
<mask> 'steps':
<mask> - 'uses': 'actions/checkout@v2'
<mask> - 'name': 'Set up Go'
<mask> 'uses': 'actions/setup-go@v2'
<mask> 'with':
<mask> 'go-version': '${{ env.GO_VERSION }}'
<mask> - 'name': 'run-lint'
<mask> 'run': >
<mask> make go-deps go-tools go-lint
</s> all: use precise go version in github workflows </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'uses': 'actions/setup-go@v2'
</s> add 'uses': 'actions/setup-go@v3' </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' </s> remove 'GO_VERSION': '1.18'
</s> add 'GO_VERSION': '1.18.6' | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08799e9d0a335046f315977aefc4e468b60fddc0 | .github/workflows/lint.yml |
github.com/AdguardTeam/golibs v0.10.0 | <mask> go 1.16
<mask>
<mask> require (
<mask> github.com/AdguardTeam/dnsproxy v0.39.8
<mask> github.com/AdguardTeam/golibs v0.9.3
<mask> github.com/AdguardTeam/urlfilter v0.14.6
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/ameshkov/dnscrypt/v2 v2.2.2
<mask> github.com/digineo/go-ipset/v2 v2.2.1
<mask> github.com/fsnotify/fsnotify v1.4.9
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove github.com/AdguardTeam/golibs v0.9.3 h1:noeKHJEzrSwxzX0Zi3USM3cXf1qQV99SO772jet/uEY=
github.com/AdguardTeam/golibs v0.9.3/go.mod h1:fCAMwPBJ8S7YMYbTWvYS+eeTLblP5E04IDtNAo7y7IY=
</s> add github.com/AdguardTeam/golibs v0.10.0 h1:A7MXRfZ+ItpOyS9tWKtqrLj3vZtE9FJFC+dOVY/LcWs=
github.com/AdguardTeam/golibs v0.10.0/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.mod |
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 | <mask> github.com/stretchr/testify v1.7.0
<mask> github.com/ti-mo/netfilter v0.4.0
<mask> go.etcd.io/bbolt v1.3.6
<mask> golang.org/x/crypto v0.0.0-20210817164053-32db794688a5
<mask> golang.org/x/net v0.0.0-20210825183410-e898025ed96a
<mask> golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e
<mask> gopkg.in/natefinch/lumberjack.v2 v2.0.0
<mask> gopkg.in/yaml.v2 v2.4.0
<mask> howett.net/plist v0.0.0-20201203080718-1454fab16a06
<mask> )
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw=
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
</s> add golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 h1:Z04ewVs7JhXaYkmDhBERPi41gnltfQpMWDnTnQbaCqk=
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.mod |
github.com/AdguardTeam/golibs v0.10.0 h1:A7MXRfZ+ItpOyS9tWKtqrLj3vZtE9FJFC+dOVY/LcWs=
github.com/AdguardTeam/golibs v0.10.0/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= | <mask> github.com/AdguardTeam/dnsproxy v0.39.8/go.mod h1:eDpJKAdkHORRwAedjuERv+7SWlcz4cn+5uwrbUAWHRY=
<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.9.2/go.mod h1:fCAMwPBJ8S7YMYbTWvYS+eeTLblP5E04IDtNAo7y7IY=
<mask> github.com/AdguardTeam/golibs v0.9.3 h1:noeKHJEzrSwxzX0Zi3USM3cXf1qQV99SO772jet/uEY=
<mask> github.com/AdguardTeam/golibs v0.9.3/go.mod h1:fCAMwPBJ8S7YMYbTWvYS+eeTLblP5E04IDtNAo7y7IY=
<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=
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove github.com/AdguardTeam/golibs v0.9.3
</s> add github.com/AdguardTeam/golibs v0.10.0 </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.sum |
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 h1:Z04ewVs7JhXaYkmDhBERPi41gnltfQpMWDnTnQbaCqk=
golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= | <mask> golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
<mask> golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
<mask> golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
<mask> golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
<mask> golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw=
<mask> golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
<mask> golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
<mask> golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
<mask> golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
<mask> golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
<mask> golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove golang.org/x/net v0.0.0-20210825183410-e898025ed96a
</s> add golang.org/x/net v0.0.0-20210929193557-e81a3d93ecf6 </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.sum |
<mask> golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
<mask> golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
<mask> golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
<mask> golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
<mask> golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
<mask> golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
<mask> golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
<mask> golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.sum |
|
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= | <mask> golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
<mask> golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
<mask> golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
<mask> golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
<mask> golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
<mask> golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
<mask> golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
</s> add </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | go.sum |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/go-ping/ping"
<mask> "github.com/insomniacslk/dhcp/dhcpv4"
<mask> "github.com/insomniacslk/dhcp/dhcpv4/server4"
<mask> "github.com/mdlayher/raw"
<mask> )
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dhcpd/v4.go |
s.conf.leaseTime = timeutil.Day | <mask>
<mask> s.leasedOffsets = newBitSet()
<mask>
<mask> if conf.LeaseDuration == 0 {
<mask> s.conf.leaseTime = time.Hour * 24
<mask> s.conf.LeaseDuration = uint32(s.conf.leaseTime.Seconds())
<mask> } else {
<mask> s.conf.leaseTime = time.Second * time.Duration(conf.LeaseDuration)
<mask> }
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove quarterDay = 6 * time.Hour
day = 24 * time.Hour
week = day * 7
month = day * 30
threeMonths = day * 90
</s> add quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: dc.RotationIvl}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dhcpd/v4.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/insomniacslk/dhcp/dhcpv6"
<mask> "github.com/insomniacslk/dhcp/dhcpv6/server6"
<mask> "github.com/insomniacslk/dhcp/iana"
<mask> )
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dhcpd/v6.go |
s.conf.leaseTime = timeutil.Day | <mask> return s, fmt.Errorf("dhcpv6: invalid range-start IP: %s", conf.RangeStart)
<mask> }
<mask>
<mask> if conf.LeaseDuration == 0 {
<mask> s.conf.leaseTime = time.Hour * 24
<mask> s.conf.LeaseDuration = uint32(s.conf.leaseTime.Seconds())
<mask> } else {
<mask> s.conf.leaseTime = time.Second * time.Duration(conf.LeaseDuration)
<mask> }
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove quarterDay = 6 * time.Hour
day = 24 * time.Hour
week = day * 7
month = day * 30
threeMonths = day * 90
</s> add quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dhcpd/v6.go |
<mask> "sort"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
<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: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "time"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dnsforward/config.go |
|
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/AdguardTeam/golibs/stringutil"
<mask> "github.com/ameshkov/dnscrypt/v2"
<mask> )
<mask>
<mask> // BlockingMode is an enum of all allowed blocking modes.
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dnsforward/config.go |
FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` | <mask> AllServers bool `yaml:"all_servers"` // if true, parallel queries to all configured upstream servers are enabled
<mask> FastestAddr bool `yaml:"fastest_addr"` // use Fastest Address algorithm
<mask> // FastestTimeout replaces the default timeout for dialing IP addresses
<mask> // when FastestAddr is true.
<mask> FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
<mask>
<mask> // Access settings
<mask> // --
<mask>
<mask> AllowedClients []string `yaml:"allowed_clients"` // IP addresses of whitelist clients
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove UpstreamTimeout aghtime.Duration `yaml:"upstream_timeout"`
</s> add UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dnsforward/config.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dnsforward/dnsforward_test.go |
notAfter := notBefore.Add(5 * 365 * timeutil.Day) | <mask> serialNumber, err := rand.Int(rand.Reader, serialNumberLimit)
<mask> require.NoErrorf(t, err, "failed to generate serial number: %s", err)
<mask>
<mask> notBefore := time.Now()
<mask> notAfter := notBefore.Add(5 * 365 * time.Hour * 24)
<mask>
<mask> template := x509.Certificate{
<mask> SerialNumber: serialNumber,
<mask> Subject: pkix.Name{
<mask> Organization: []string{"AdGuard Tests"},
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/dnsforward/dnsforward_test.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "go.etcd.io/bbolt"
<mask> "golang.org/x/crypto/bcrypt"
<mask> )
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/auth.go |
const cookieTTL = 365 * timeutil.Day | <mask> "golang.org/x/crypto/bcrypt"
<mask> )
<mask>
<mask> // cookieTTL is the time-to-live of the session cookie.
<mask> const cookieTTL = 365 * 24 * time.Hour
<mask>
<mask> // sessionCookieName is the name of the session cookie.
<mask> const sessionCookieName = "agh_session"
<mask>
<mask> // sessionTokenSize is the length of session token in bytes.
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove UpstreamTimeout aghtime.Duration `yaml:"upstream_timeout"`
</s> add UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/auth.go |
<mask> "net"
<mask> "os"
<mask> "path/filepath"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dhcpd"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
|
<mask> "path/filepath"
<mask> "sync"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
<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/AdGuardHome/internal/stats"
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "time"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
|
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/google/renameio/maybe"
<mask> yaml "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> const (
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats | <mask>
<mask> QueryLogEnabled bool `yaml:"querylog_enabled"` // if true, query log is enabled
<mask> QueryLogFileEnabled bool `yaml:"querylog_file_enabled"` // if true, query log will be written to a file
<mask> // QueryLogInterval is the interval for query log's files rotation.
<mask> QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
<mask> QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
<mask> AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
<mask>
<mask> dnsforward.FilteringConfig `yaml:",inline"`
<mask>
<mask> FilteringEnabled bool `yaml:"filtering_enabled"` // whether or not use filter lists
<mask> FiltersUpdateIntervalHours uint32 `yaml:"filters_update_interval"` // time period to update filters (in hours)
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` </s> remove UpstreamTimeout aghtime.Duration `yaml:"upstream_timeout"`
</s> add UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` </s> remove UpstreamTimeout: aghtime.Duration{Duration: dnsforward.DefaultTimeout},
</s> add UpstreamTimeout: timeutil.Duration{Duration: dnsforward.DefaultTimeout}, </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` | <mask> FiltersUpdateIntervalHours uint32 `yaml:"filters_update_interval"` // time period to update filters (in hours)
<mask> DnsfilterConf filtering.Config `yaml:",inline"`
<mask>
<mask> // UpstreamTimeout is the timeout for querying upstream servers.
<mask> UpstreamTimeout aghtime.Duration `yaml:"upstream_timeout"`
<mask>
<mask> // LocalDomainName is the domain name used for known internal hosts.
<mask> // For example, a machine called "myhost" can be addressed as
<mask> // "myhost.lan" when LocalDomainName is "lan".
<mask> LocalDomainName string `yaml:"local_domain_name"`
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove FastestTimeout aghtime.Duration `yaml:"fastest_timeout"`
</s> add FastestTimeout timeutil.Duration `yaml:"fastest_timeout"` </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
FastestTimeout: timeutil.Duration{ | <mask> BlockedResponseTTL: 10, // in seconds
<mask> Ratelimit: 20,
<mask> RefuseAny: true,
<mask> AllServers: false,
<mask> FastestTimeout: aghtime.Duration{
<mask> Duration: fastip.DefaultPingWaitTimeout,
<mask> },
<mask>
<mask> TrustedProxies: []string{"127.0.0.0/8", "::1/128"},
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove UpstreamTimeout: aghtime.Duration{Duration: dnsforward.DefaultTimeout},
</s> add UpstreamTimeout: timeutil.Duration{Duration: dnsforward.DefaultTimeout}, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
UpstreamTimeout: timeutil.Duration{Duration: dnsforward.DefaultTimeout}, | <mask> MaxGoroutines: 300,
<mask> },
<mask> FilteringEnabled: true, // whether or not use filter lists
<mask> FiltersUpdateIntervalHours: 24,
<mask> UpstreamTimeout: aghtime.Duration{Duration: dnsforward.DefaultTimeout},
<mask> LocalDomainName: "lan",
<mask> ResolveClients: true,
<mask> UsePrivateRDNS: true,
<mask> },
<mask> TLS: tlsConfigSettings{
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove FastestTimeout: aghtime.Duration{
</s> add FastestTimeout: timeutil.Duration{ </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove want: aghtime.Duration{Duration: 24 * time.Hour},
</s> add want: timeutil.Duration{Duration: timeutil.Day}, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
config.DNS.QueryLogInterval = timeutil.Duration{Duration: 90 * timeutil.Day} | <mask> config.WebSessionTTLHours = 30 * 24
<mask>
<mask> config.DNS.QueryLogEnabled = true
<mask> config.DNS.QueryLogFileEnabled = true
<mask> config.DNS.QueryLogInterval = aghtime.Duration{Duration: 90 * 24 * time.Hour}
<mask> config.DNS.QueryLogMemSize = 1000
<mask>
<mask> config.DNS.CacheSize = 4 * 1024 * 1024
<mask> config.DNS.DnsfilterConf.SafeBrowsingCacheSize = 1 * 1024 * 1024
<mask> config.DNS.DnsfilterConf.SafeSearchCacheSize = 1 * 1024 * 1024
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove quarterDay = 6 * time.Hour
day = 24 * time.Hour
week = day * 7
month = day * 30
threeMonths = day * 90
</s> add quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: dc.RotationIvl}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} | <mask> config.DNS.FiltersUpdateIntervalHours = 24
<mask> }
<mask>
<mask> if config.DNS.UpstreamTimeout.Duration == 0 {
<mask> config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: dc.RotationIvl}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} | <mask> dc := querylog.Config{}
<mask> Context.queryLog.WriteDiskConfig(&dc)
<mask> config.DNS.QueryLogEnabled = dc.Enabled
<mask> config.DNS.QueryLogFileEnabled = dc.FileEnabled
<mask> config.DNS.QueryLogInterval = aghtime.Duration{Duration: dc.RotationIvl}
<mask> config.DNS.QueryLogMemSize = dc.MemSize
<mask> config.DNS.AnonymizeClientIP = dc.AnonymizeClientIP
<mask> }
<mask>
<mask> if Context.dnsFilter != nil {
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: 90 * 24 * time.Hour}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: 90 * timeutil.Day} </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/config.go |
<mask> "strconv"
<mask> "strings"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/crypto/bcrypt"
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade.go |
|
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> "github.com/google/renameio/maybe"
<mask> "golang.org/x/crypto/bcrypt"
<mask> yaml "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> // currentSchemaVersion is the current schema version.
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade.go |
dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} | <mask> return fmt.Errorf("unexpected type of %s: %T", field, qlogIvlVal)
<mask> }
<mask> }
<mask>
<mask> dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
<mask>
<mask> return nil
<mask> }
<mask>
<mask> // TODO(a.garipov): Replace with log.Output when we port it to our logging
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove time.Sleep(24 * time.Hour)
</s> add time.Sleep(timeutil.Day) </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> import (
<mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
<mask>
<mask> // TODO(a.garipov): Cover all migrations, use a testdata/ dir.
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add </s> remove "time"
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade_test.go |
want: timeutil.Duration{Duration: timeutil.Day}, | <mask> wantErr string
<mask> name string
<mask> }{{
<mask> ivl: 1,
<mask> want: aghtime.Duration{Duration: 24 * time.Hour},
<mask> wantErr: "",
<mask> name: "success",
<mask> }, {
<mask> ivl: 0.25,
<mask> want: 0,
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove UpstreamTimeout aghtime.Duration `yaml:"upstream_timeout"`
</s> add UpstreamTimeout timeutil.Duration `yaml:"upstream_timeout"` </s> remove UpstreamTimeout: aghtime.Duration{Duration: dnsforward.DefaultTimeout},
</s> add UpstreamTimeout: timeutil.Duration{Duration: dnsforward.DefaultTimeout}, </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: 90 * 24 * time.Hour}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: 90 * timeutil.Day} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade_test.go |
var newIvl timeutil.Duration
newIvl, ok = newDNSConf["querylog_interval"].(timeutil.Duration) | <mask> var newDNSConf yobj
<mask> newDNSConf, ok = dnsVal.(yobj)
<mask> require.True(t, ok)
<mask>
<mask> var newIvl aghtime.Duration
<mask> newIvl, ok = newDNSConf["querylog_interval"].(aghtime.Duration)
<mask> require.True(t, ok)
<mask>
<mask> assert.Equal(t, tc.want, newIvl)
<mask> })
<mask> }
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove var ivlVal aghtime.Duration
ivlVal, ok = ivl.(aghtime.Duration)
</s> add var ivlVal timeutil.Duration
ivlVal, ok = ivl.(timeutil.Duration) </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: dc.RotationIvl}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: dc.RotationIvl} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade_test.go |
var ivlVal timeutil.Duration
ivlVal, ok = ivl.(timeutil.Duration) | <mask> var ivl interface{}
<mask> ivl, ok = dnsVal["querylog_interval"]
<mask> require.True(t, ok)
<mask>
<mask> var ivlVal aghtime.Duration
<mask> ivlVal, ok = ivl.(aghtime.Duration)
<mask> require.True(t, ok)
<mask>
<mask> assert.Equal(t, 90*24*time.Hour, ivlVal.Duration)
<mask> })
<mask> }
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove var newIvl aghtime.Duration
newIvl, ok = newDNSConf["querylog_interval"].(aghtime.Duration)
</s> add var newIvl timeutil.Duration
newIvl, ok = newDNSConf["querylog_interval"].(timeutil.Duration) </s> remove quarterDay = 6 * time.Hour
day = 24 * time.Hour
week = day * 7
month = day * 30
threeMonths = day * 90
</s> add quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/home/upgrade_test.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> const (
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog.go |
quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 | <mask>
<mask> func checkInterval(ivl time.Duration) (ok bool) {
<mask> // The constants for possible values of query log's rotation interval.
<mask> const (
<mask> quarterDay = 6 * time.Hour
<mask> day = 24 * time.Hour
<mask> week = day * 7
<mask> month = day * 30
<mask> threeMonths = day * 90
<mask> )
<mask>
<mask> return ivl == quarterDay || ivl == day || ivl == week || ivl == month || ivl == threeMonths
<mask> }
<mask>
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove config.DNS.QueryLogInterval = aghtime.Duration{Duration: 90 * 24 * time.Hour}
</s> add config.DNS.QueryLogInterval = timeutil.Duration{Duration: 90 * timeutil.Day} </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/AdGuardHome/internal/aghtest"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/dnsproxy/proxyutil"
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
<mask>
<mask> func TestMain(m *testing.M) {
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog_test.go |
RotationIvl: timeutil.Day, | <mask> func TestQueryLog(t *testing.T) {
<mask> l := newQueryLog(Config{
<mask> Enabled: true,
<mask> FileEnabled: true,
<mask> RotationIvl: 24 * time.Hour,
<mask> MemSize: 100,
<mask> BaseDir: t.TempDir(),
<mask> })
<mask>
<mask> // Add disk entries.
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog_test.go |
RotationIvl: timeutil.Day, | <mask>
<mask> func TestQueryLogOffsetLimit(t *testing.T) {
<mask> l := newQueryLog(Config{
<mask> Enabled: true,
<mask> RotationIvl: 24 * time.Hour,
<mask> MemSize: 100,
<mask> BaseDir: t.TempDir(),
<mask> })
<mask>
<mask> const (
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog_test.go |
RotationIvl: timeutil.Day, | <mask> func TestQueryLogMaxFileScanEntries(t *testing.T) {
<mask> l := newQueryLog(Config{
<mask> Enabled: true,
<mask> FileEnabled: true,
<mask> RotationIvl: 24 * time.Hour,
<mask> MemSize: 100,
<mask> BaseDir: t.TempDir(),
<mask> })
<mask>
<mask> const entNum = 10
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog_test.go |
RotationIvl: timeutil.Day, | <mask> func TestQueryLogFileDisabled(t *testing.T) {
<mask> l := newQueryLog(Config{
<mask> Enabled: true,
<mask> FileEnabled: false,
<mask> RotationIvl: 24 * time.Hour,
<mask> MemSize: 2,
<mask> BaseDir: t.TempDir(),
<mask> })
<mask>
<mask> addEntry(l, "example1.org", net.IPv4(1, 1, 1, 1), net.IPv4(2, 2, 2, 1))
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove want: aghtime.Duration{Duration: 24 * time.Hour},
</s> add want: timeutil.Duration{Duration: timeutil.Day}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/qlog_test.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/filtering"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> "github.com/miekg/dns"
<mask> )
<mask>
<mask> // QueryLog - main interface
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/querylog.go |
l.conf.RotationIvl = timeutil.Day | <mask> log.Info(
<mask> "querylog: warning: unsupported rotation interval %d, setting to 1 day",
<mask> conf.RotationIvl,
<mask> )
<mask> l.conf.RotationIvl = 24 * time.Hour
<mask> }
<mask>
<mask> return l
<mask> }
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove quarterDay = 6 * time.Hour
day = 24 * time.Hour
week = day * 7
month = day * 30
threeMonths = day * 90
</s> add quarterDay = timeutil.Day / 4
day = timeutil.Day
week = timeutil.Day * 7
month = timeutil.Day * 30
threeMonths = timeutil.Day * 90 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/querylog.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // flushLogBuffer flushes the current buffer to file and resets the current buffer
<mask> func (l *queryLog) flushLogBuffer(fullFlush bool) error {
<mask> if !l.conf.FileEnabled {
<mask> return nil
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove QueryLogInterval aghtime.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats
</s> add QueryLogInterval timeutil.Duration `yaml:"querylog_interval"`
QueryLogMemSize uint32 `yaml:"querylog_size_memory"` // number of entries kept in memory before they are flushed to disk
AnonymizeClientIP bool `yaml:"anonymize_client_ip"` // anonymize clients' IP addresses in logs and stats </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove const cookieTTL = 365 * 24 * time.Hour
</s> add const cookieTTL = 365 * timeutil.Day </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/querylogfile.go |
time.Sleep(timeutil.Day) | <mask> }
<mask> }
<mask>
<mask> // What?
<mask> time.Sleep(24 * time.Hour)
<mask> }
<mask> }
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove dns[field] = aghtime.Duration{Duration: time.Duration(qlogIvl) * 24 * time.Hour}
</s> add dns[field] = timeutil.Duration{Duration: time.Duration(qlogIvl) * timeutil.Day} </s> remove config.DNS.UpstreamTimeout = aghtime.Duration{Duration: dnsforward.DefaultTimeout}
</s> add config.DNS.UpstreamTimeout = timeutil.Duration{Duration: dnsforward.DefaultTimeout} </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove s.conf.leaseTime = time.Hour * 24
</s> add s.conf.leaseTime = timeutil.Day </s> remove l.conf.RotationIvl = 24 * time.Hour
</s> add l.conf.RotationIvl = timeutil.Day | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/querylogfile.go |
"github.com/AdguardTeam/golibs/timeutil" | <mask> "testing"
<mask> "time"
<mask>
<mask> "github.com/miekg/dns"
<mask> "github.com/stretchr/testify/assert"
<mask> "github.com/stretchr/testify/require"
<mask> )
<mask>
<mask> func TestQueryLog_Search_findClient(t *testing.T) {
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghtime"
</s> add "github.com/AdguardTeam/golibs/timeutil" </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/search_test.go |
RotationIvl: timeutil.Day, | <mask>
<mask> l := newQueryLog(Config{
<mask> FindClient: findClient,
<mask> BaseDir: t.TempDir(),
<mask> RotationIvl: 24 * time.Hour,
<mask> MemSize: 100,
<mask> Enabled: true,
<mask> FileEnabled: true,
<mask> AnonymizeClientIP: false,
<mask> })
</s> Pull request: upd golibs, use timeutil
Merge in DNS/adguard-home from use-timeutil to master
Squashed commit of the following:
commit 28defb577b2b00efa448f63fe6a0cc468aa53164
Author: Eugene Burkov <[email protected]>
Date: Thu Sep 30 19:46:38 2021 +0300
all: upd golibs, use timeutil </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove RotationIvl: 24 * time.Hour,
</s> add RotationIvl: timeutil.Day, </s> remove FastestTimeout: aghtime.Duration{
</s> add FastestTimeout: timeutil.Duration{ | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/08ec3f604ea5ed5a9a7fa443ce64e25468ccaecb | internal/querylog/search_test.go |
if err != nil {
log.Debug("dhcpv4: trying a connection: %s", err)
}
| <mask>
<mask> for {
<mask> ok, next, err := tryConn(req, c, iface)
<mask> if next {
<mask> continue
<mask> }
<mask> if ok {
<mask> return true, nil
<mask> }
</s> Pull request: dhcpd: fix possible infinite loop, set timeouts better
Merge in DNS/adguard-home from 2301-dhcp-check to master
Closes #2301.
Squashed commit of the following:
commit bf5c31b8592f909a372fcdaebacc491d310cc3e6
Author: Ainar Garipov <[email protected]>
Date: Fri Nov 13 14:28:54 2020 +0300
dhcpd: fix possible infinite loop, set timeouts better </s> remove log.Debug("%s", err)
</s> add return false, err </s> remove _ = c.SetReadDeadline(time.Now().Add(defaultDiscoverTime))
</s> add err = c.SetDeadline(time.Now().Add(defaultDiscoverTime))
if err != nil {
return false, false, fmt.Errorf("setting deadline: %w", err)
}
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09196118e9f5f089dc09e792f040bdc97fcc7432 | internal/dhcpd/check_other_dhcp.go |
return false, err | <mask> if ok {
<mask> return true, nil
<mask> }
<mask> if err != nil {
<mask> log.Debug("%s", err)
<mask> }
<mask> }
<mask> }
<mask>
<mask> // TODO(a.garipov): Refactor further. Inspect error handling, remove the next
</s> Pull request: dhcpd: fix possible infinite loop, set timeouts better
Merge in DNS/adguard-home from 2301-dhcp-check to master
Closes #2301.
Squashed commit of the following:
commit bf5c31b8592f909a372fcdaebacc491d310cc3e6
Author: Ainar Garipov <[email protected]>
Date: Fri Nov 13 14:28:54 2020 +0300
dhcpd: fix possible infinite loop, set timeouts better </s> remove _ = c.SetReadDeadline(time.Now().Add(defaultDiscoverTime))
</s> add err = c.SetDeadline(time.Now().Add(defaultDiscoverTime))
if err != nil {
return false, false, fmt.Errorf("setting deadline: %w", err)
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09196118e9f5f089dc09e792f040bdc97fcc7432 | internal/dhcpd/check_other_dhcp.go |
err = c.SetDeadline(time.Now().Add(defaultDiscoverTime))
if err != nil {
return false, false, fmt.Errorf("setting deadline: %w", err)
}
| <mask> // progressively longer timeouts.
<mask> log.Tracef("waiting %v for an answer", defaultDiscoverTime)
<mask>
<mask> b := make([]byte, 1500)
<mask> _ = c.SetReadDeadline(time.Now().Add(defaultDiscoverTime))
<mask> n, _, err := c.ReadFrom(b)
<mask> if err != nil {
<mask> if isTimeout(err) {
<mask> log.Debug("dhcpv4: didn't receive dhcp response")
<mask>
</s> Pull request: dhcpd: fix possible infinite loop, set timeouts better
Merge in DNS/adguard-home from 2301-dhcp-check to master
Closes #2301.
Squashed commit of the following:
commit bf5c31b8592f909a372fcdaebacc491d310cc3e6
Author: Ainar Garipov <[email protected]>
Date: Fri Nov 13 14:28:54 2020 +0300
dhcpd: fix possible infinite loop, set timeouts better </s> remove log.Debug("%s", err)
</s> add return false, err | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09196118e9f5f089dc09e792f040bdc97fcc7432 | internal/dhcpd/check_other_dhcp.go |
dnsfilter {{if .FilteringEnabled}}{{.FilterFile}}{{end}} { | <mask> return nil
<mask> }
<mask>
<mask> const coreDNSConfigTemplate = `. {
<mask> {{if .FilteringEnabled}}dnsfilter {{.FilterFile}} {
<mask> {{if .SafeBrowsingEnabled}}safebrowsing{{end}}
<mask> {{if .ParentalEnabled}}parental {{.ParentalSensitivity}}{{end}}
<mask> {{if .SafeSearchEnabled}}safesearch{{end}}
<mask> {{if .QueryLogEnabled}}querylog{{end}}
<mask> }{{end}}
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove }{{end}}
</s> add } </s> remove hosts {
fallthrough
}
</s> add hosts {
fallthrough
} </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | config.go |
} | <mask> {{if .SafeBrowsingEnabled}}safebrowsing{{end}}
<mask> {{if .ParentalEnabled}}parental {{.ParentalSensitivity}}{{end}}
<mask> {{if .SafeSearchEnabled}}safesearch{{end}}
<mask> {{if .QueryLogEnabled}}querylog{{end}}
<mask> }{{end}}
<mask> {{.Pprof}}
<mask> hosts {
<mask> fallthrough
<mask> }
<mask> {{if .UpstreamDNS}}forward . {{range .UpstreamDNS}}{{.}} {{end}}{{end}}
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove hosts {
fallthrough
}
</s> add hosts {
fallthrough
} </s> remove {{if .FilteringEnabled}}dnsfilter {{.FilterFile}} {
</s> add dnsfilter {{if .FilteringEnabled}}{{.FilterFile}}{{end}} { </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | config.go |
hosts {
fallthrough
} | <mask> {{if .SafeSearchEnabled}}safesearch{{end}}
<mask> {{if .QueryLogEnabled}}querylog{{end}}
<mask> }{{end}}
<mask> {{.Pprof}}
<mask> hosts {
<mask> fallthrough
<mask> }
<mask> {{if .UpstreamDNS}}forward . {{range .UpstreamDNS}}{{.}} {{end}}{{end}}
<mask> {{.Cache}}
<mask> {{.Prometheus}}
<mask> }
<mask> `
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove }{{end}}
</s> add } </s> remove {{if .FilteringEnabled}}dnsfilter {{.FilterFile}} {
</s> add dnsfilter {{if .FilteringEnabled}}{{.FilterFile}}{{end}} { </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | config.go |
filterFileNames := []string{} | <mask> *p = defaultPlugin
<mask> p.d = dnsfilter.New()
<mask> p.hosts = make(map[string]net.IP)
<mask>
<mask> var filterFileName string
<mask> for c.Next() {
<mask> args := c.RemainingArgs()
<mask> if len(args) == 0 {
<mask> // must have at least one argument
<mask> return nil, c.ArgErr()
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) </s> remove filterFileName = args[0]
</s> add </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) | <mask>
<mask> var filterFileName string
<mask> for c.Next() {
<mask> args := c.RemainingArgs()
<mask> if len(args) == 0 {
<mask> // must have at least one argument
<mask> return nil, c.ArgErr()
<mask> }
<mask> filterFileName = args[0]
<mask> for c.NextBlock() {
<mask> switch c.Val() {
<mask> case "safebrowsing":
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove filterFileName = args[0]
</s> add </s> remove var filterFileName string
</s> add filterFileNames := []string{} </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
<mask> if len(args) == 0 {
<mask> // must have at least one argument
<mask> return nil, c.ArgErr()
<mask> }
<mask> filterFileName = args[0]
<mask> for c.NextBlock() {
<mask> switch c.Val() {
<mask> case "safebrowsing":
<mask> p.d.EnableSafeBrowsing()
<mask> if c.NextArg() {
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) </s> remove var filterFileName string
</s> add filterFileNames := []string{} </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
|
log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) | <mask> }
<mask> }
<mask> }
<mask>
<mask> file, err := os.Open(filterFileName)
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask> defer file.Close()
<mask>
<mask> count := 0
<mask> scanner := bufio.NewScanner(file)
<mask> for scanner.Scan() {
<mask> text := scanner.Text()
<mask> if p.parseEtcHosts(text) {
<mask> continue
<mask> }
<mask> err = p.d.AddRule(text, 0)
<mask> if err == dnsfilter.ErrInvalidSyntax {
<mask> continue
<mask> }
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask> count++
<mask> }
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} </s> remove filterFileName = args[0]
</s> add </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) | <mask> }
<mask> if err != nil {
<mask> return nil, err
<mask> }
<mask> count++
<mask> }
<mask> log.Printf("Added %d rules from %s", count, filterFileName)
<mask>
<mask> if err = scanner.Err(); err != nil {
<mask> return nil, err
<mask> }
<mask>
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove filterFileName = args[0]
</s> add </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
if err = scanner.Err(); err != nil {
return nil, err
} | <mask> count++
<mask> }
<mask> log.Printf("Added %d rules from %s", count, filterFileName)
<mask>
<mask> if err = scanner.Err(); err != nil {
<mask> return nil, err
<mask> }
<mask>
<mask> p.upstream, err = upstream.New(nil)
<mask> if err != nil {
<mask> return nil, err
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove filterFileName = args[0]
</s> add </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
var err error | <mask> }
<mask>
<mask> p.upstream, err = upstream.New(nil)
<mask> if err != nil {
<mask> return nil, err
<mask> }
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove if err = scanner.Err(); err != nil {
return nil, err
</s> add if err = scanner.Err(); err != nil {
return nil, err
} </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove filterFileName = args[0]
</s> add </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin.go |
{`dnsfilter`, false},
{`dnsfilter /dev/nonexistent/abcdef`, true}, | <mask> for i, testcase := range []struct {
<mask> config string
<mask> failing bool
<mask> }{
<mask> {`dnsfilter`, true},
<mask> {`dnsfilter ../tests/dns.txt`, false},
<mask> {`dnsfilter ../tests/dns.txt { safebrowsing }`, false},
<mask> {`dnsfilter ../tests/dns.txt { parental }`, true},
<mask> } {
<mask> c := caddy.NewTestController("dns", testcase.config)
</s> Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working. </s> remove file, err := os.Open(filterFileName)
if err != nil {
return nil, err
}
defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, 0)
if err == dnsfilter.ErrInvalidSyntax {
continue
}
</s> add log.Printf("filterFileNames = %+v", filterFileNames)
for i, filterFileName := range filterFileNames {
file, err := os.Open(filterFileName) </s> remove if len(args) == 0 {
// must have at least one argument
return nil, c.ArgErr()
</s> add if len(args) > 0 {
filterFileNames = append(filterFileNames, args...) </s> remove var filterFileName string
</s> add filterFileNames := []string{} </s> remove count++
}
log.Printf("Added %d rules from %s", count, filterFileName)
</s> add defer file.Close()
count := 0
scanner := bufio.NewScanner(file)
for scanner.Scan() {
text := scanner.Text()
if p.parseEtcHosts(text) {
continue
}
err = p.d.AddRule(text, uint32(i))
if err == dnsfilter.ErrInvalidSyntax {
continue
}
if err != nil {
return nil, err
}
count++
}
log.Printf("Added %d rules from %s", count, filterFileName) </s> remove filterFileName = args[0]
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09a39cce03f69b1f9801e66d763d7b5208411336 | coredns_plugin/coredns_plugin_test.go |
github.com/ameshkov/dnscrypt/v2 v2.0.0 | <mask> github.com/AdguardTeam/golibs v0.4.4
<mask> github.com/AdguardTeam/urlfilter v0.13.0
<mask> github.com/NYTimes/gziphandler v1.1.1
<mask> github.com/beefsack/go-rate v0.0.0-20200827232406-6cde80facd47 // indirect
<mask> github.com/fsnotify/fsnotify v1.4.9
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663
<mask> github.com/gobuffalo/envy v1.9.0 // indirect
<mask> github.com/gobuffalo/packr v1.30.1
<mask> github.com/gobuffalo/packr/v2 v2.8.1 // indirect
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.mod |
<mask> github.com/AdguardTeam/golibs v0.4.3/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/golibs v0.4.4 h1:cM9UySQiYFW79zo5XRwnaIWVzfW4eNXmZktMrWbthpw=
<mask> github.com/AdguardTeam/golibs v0.4.4/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4=
<mask> github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU=
<mask> github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
<mask> github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
<mask> github.com/AdguardTeam/urlfilter v0.13.0 h1:MfO46K81JVTkhgP6gRu/buKl5wAOSfusjiDwjT1JN1c=
<mask> github.com/AdguardTeam/urlfilter v0.13.0/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/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove github.com/lucas-clemente/quic-go v0.19.0 h1:IG5lB7DfHl6eZ7WTBVL8bnbDg0JGwDv906l6JffQbyg=
github.com/lucas-clemente/quic-go v0.19.0/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add </s> remove github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
<mask> github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
<mask> github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
<mask> github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI=
<mask> github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
<mask> github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
<mask> github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663 h1:jI2GiiRh+pPbey52EVmbU6kuLiXqwy4CXZ4gwUBj8Y0=
<mask> github.com/go-ping/ping v0.0.0-20201115131931-3300c582a663/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
<mask> github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
<mask> github.com/go-test/deep v1.0.5 h1:AKODKU3pDH1RzZzm6YZu77YWtEAq6uh1rLIAQlay2qc=
<mask> github.com/go-test/deep v1.0.5/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove github.com/lucas-clemente/quic-go v0.19.0 h1:IG5lB7DfHl6eZ7WTBVL8bnbDg0JGwDv906l6JffQbyg=
github.com/lucas-clemente/quic-go v0.19.0/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0=
</s> add </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
<mask> github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
<mask> github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
<mask> github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
<mask> github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
<mask> github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
<mask> github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
<mask> github.com/kardianos/service v1.2.0 h1:bGuZ/epo3vrt8IPC7mnKQolqFeYJb7Cs8Rk4PSOBB/g=
<mask> github.com/kardianos/service v1.2.0/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
<mask> github.com/karrick/godirwalk v1.10.12 h1:BqUm+LuJcXjGv1d2mj3gBiQyrQ57a0rYoAmhvJQ7RDU=
<mask> github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA=
<mask> github.com/karrick/godirwalk v1.15.8/go.mod h1:j4mkqPuvaLI8mp1DroR3P6ad7cyYd4c1qeJ3RV7ULlk=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add </s> remove github.com/lucas-clemente/quic-go v0.19.0 h1:IG5lB7DfHl6eZ7WTBVL8bnbDg0JGwDv906l6JffQbyg=
github.com/lucas-clemente/quic-go v0.19.0/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
<mask> github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
<mask> github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
<mask> github.com/lucas-clemente/quic-go v0.18.1 h1:DMR7guC0NtVS8zNZR3IO7NARZvZygkSC56GGtC6cyys=
<mask> github.com/lucas-clemente/quic-go v0.18.1/go.mod h1:yXttHsSNxQi8AWijC/vLP+OJczXqzHSOcJrM5ITUlCg=
<mask> github.com/lucas-clemente/quic-go v0.19.0 h1:IG5lB7DfHl6eZ7WTBVL8bnbDg0JGwDv906l6JffQbyg=
<mask> github.com/lucas-clemente/quic-go v0.19.0/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0=
<mask> github.com/lucas-clemente/quic-go v0.19.1 h1:J9TkQJGJVOR3UmGhd4zdVYwKSA0EoXbLRf15uQJ6gT4=
<mask> github.com/lucas-clemente/quic-go v0.19.1/go.mod h1:ZUygOqIoai0ASXXLJ92LTnKdbqh9MHCLTX6Nr1jUrK0=
<mask> github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
<mask> github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
<mask> github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
<mask> golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI=
<mask> golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
<mask> golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=
<mask> golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
<mask> golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9 h1:umElSU9WZirRdgu2yFHY0ayQkEnKiOC1TtM3fWXFnoU=
<mask> golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
<mask> golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9 h1:phUcVbl53swtrUN8kQEXFhUxPlIlWyBfKmidCu7P95o=
<mask> golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
<mask> golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
<mask> golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
<mask> golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add </s> remove github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
<mask> golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
<mask> golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20190411185658-b44545bcd369/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
<mask> golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add </s> remove github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0=
github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | go.sum |
|
"github.com/ameshkov/dnscrypt/v2" | <mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/dnsproxy/upstream"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // FilteringConfig represents the DNS filtering configuration of AdGuard Home
<mask> // The zero FilteringConfig is empty and ready for use.
<mask> type FilteringConfig struct {
<mask> // Callbacks for other modules
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/dnsforward/config.go |
// DNSCryptConfig is the DNSCrypt server configuration struct.
type DNSCryptConfig struct {
UDPListenAddr *net.UDPAddr
TCPListenAddr *net.TCPAddr
ProviderName string
ResolverCert *dnscrypt.Cert
Enabled bool
}
| <mask> // DNS names from certificate (SAN) or CN value from Subject
<mask> dnsNames []string
<mask> }
<mask>
<mask> // ServerConfig represents server configuration.
<mask> // The zero ServerConfig is empty and ready for use.
<mask> type ServerConfig struct {
<mask> UDPListenAddr *net.UDPAddr // UDP listen address
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/dnsforward/config.go |
DNSCryptConfig | <mask> FilteringConfig
<mask> TLSConfig
<mask> TLSAllowUnencryptedDOH bool
<mask>
<mask> TLSv12Roots *x509.CertPool // list of root CAs for TLSv1.2
<mask> TLSCiphers []uint16 // list of TLS ciphers to use
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/dnsforward/config.go |
if s.conf.DNSCryptConfig.Enabled {
proxyConfig.DNSCryptUDPListenAddr = []*net.UDPAddr{s.conf.DNSCryptConfig.UDPListenAddr}
proxyConfig.DNSCryptTCPListenAddr = []*net.TCPAddr{s.conf.DNSCryptConfig.TCPListenAddr}
proxyConfig.DNSCryptProviderName = s.conf.DNSCryptConfig.ProviderName
proxyConfig.DNSCryptResolverCert = s.conf.DNSCryptConfig.ResolverCert
}
| <mask> if err != nil {
<mask> return proxyConfig, err
<mask> }
<mask>
<mask> // Validate proxy config
<mask> if proxyConfig.UpstreamConfig == nil || len(proxyConfig.UpstreamConfig.Upstreams) == 0 {
<mask> return proxyConfig, errors.New("no default upstream servers configured")
<mask> }
<mask>
<mask> return proxyConfig, nil
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() </s> remove dnsConfig := generateServerConfig()
</s> add dnsConfig, err := generateServerConfig()
if err != nil {
closeDNSServer()
return fmt.Errorf("generateServerConfig: %w", err)
}
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/dnsforward/config.go |
// PortDNSCrypt is the port for DNSCrypt requests. If it's zero,
// DNSCrypt is disabled.
PortDNSCrypt int `yaml:"port_dnscrypt" json:"port_dnscrypt"`
// DNSCryptConfigFile is the path to the DNSCrypt config file. Must be
// set if PortDNSCrypt is not zero.
//
// See https://github.com/AdguardTeam/dnsproxy and
// https://github.com/ameshkov/dnscrypt.
DNSCryptConfigFile string `yaml:"dnscrypt_config_file" json:"dnscrypt_config_file"`
| <mask> PortHTTPS int `yaml:"port_https" json:"port_https,omitempty"` // HTTPS port. If 0, HTTPS will be disabled
<mask> PortDNSOverTLS int `yaml:"port_dns_over_tls" json:"port_dns_over_tls,omitempty"` // DNS-over-TLS port. If 0, DOT will be disabled
<mask> PortDNSOverQUIC uint16 `yaml:"port_dns_over_quic" json:"port_dns_over_quic,omitempty"` // DNS-over-QUIC port. If 0, DoQ will be disabled
<mask>
<mask> // Allow DOH queries via unencrypted HTTP (e.g. for reverse proxying)
<mask> AllowUnencryptedDOH bool `yaml:"allow_unencrypted_doh" json:"allow_unencrypted_doh"`
<mask>
<mask> dnsforward.TLSConfig `yaml:",inline" json:",inline"`
<mask> }
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/config.go |
"os" | <mask> import (
<mask> "fmt"
<mask> "net"
<mask> "path/filepath"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/agherr"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
github.com/AdguardTeam/urlfilter v0.12.3/go.mod h1:1fcCQx5TGJANrQN6sHNNM9KPBl7qx7BJml45ko6vru0=
</s> add </s> remove github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a h1:O9xspHB2yrvKfMQ1m6OQhqe37i5yvg0dXAYMuAjugmM=
github.com/go-ping/ping v0.0.0-20201022122018-3977ed72668a/go.mod h1:35JbSyV/BYqHwwRA6Zr1uVDm1637YlNOU61wI797NPI=
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
"github.com/AdguardTeam/AdGuardHome/internal/agherr" | <mask> "path/filepath"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsfilter"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/dnsforward"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/querylog"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/stats"
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask> "github.com/AdguardTeam/dnsproxy/proxy"
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
"github.com/ameshkov/dnscrypt/v2"
yaml "gopkg.in/yaml.v2" | <mask> "github.com/AdguardTeam/dnsproxy/proxy"
<mask> "github.com/AdguardTeam/golibs/log"
<mask> )
<mask>
<mask> // Called by other modules when configuration is changed
<mask> func onConfigModified() {
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
dnsConfig, err := generateServerConfig()
if err != nil {
closeDNSServer()
return fmt.Errorf("generateServerConfig: %w", err)
}
| <mask> p.DHCPServer = Context.dhcpServer
<mask> }
<mask> Context.dnsServer = dnsforward.NewServer(p)
<mask> Context.clients.dnsServer = Context.dnsServer
<mask> dnsConfig := generateServerConfig()
<mask> err = Context.dnsServer.Prepare(&dnsConfig)
<mask> if err != nil {
<mask> closeDNSServer()
<mask> return fmt.Errorf("dnsServer.Prepare: %w", err)
<mask> }
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
bindHost := net.ParseIP(config.DNS.BindHost)
newconfig = dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port}, | <mask> Context.whois.Begin(ip)
<mask> }
<mask> }
<mask>
<mask> func generateServerConfig() dnsforward.ServerConfig {
<mask> newconfig := dnsforward.ServerConfig{
<mask> UDPListenAddr: &net.UDPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
<mask> TCPListenAddr: &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
<mask> FilteringConfig: config.DNS.FilteringConfig,
<mask> ConfigModified: onConfigModified,
<mask> HTTPRegister: httpRegister,
<mask> OnDNSRequest: onDNSRequest,
<mask> }
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove func reconfigureDNSServer() error {
newconfig := generateServerConfig()
err := Context.dnsServer.Reconfigure(&newconfig)
</s> add func reconfigureDNSServer() (err error) {
var newconfig dnsforward.ServerConfig
newconfig, err = generateServerConfig() </s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, </s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove return fmt.Errorf("couldn't start forwarding DNS server: %w", err)
</s> add return fmt.Errorf("generating forwarding dns server config: %w", err)
}
err = Context.dnsServer.Reconfigure(&newconfig)
if err != nil {
return fmt.Errorf("starting forwarding dns server: %w", err) | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
IP: bindHost, | <mask> newconfig.TLSConfig = tlsConf.TLSConfig
<mask>
<mask> if tlsConf.PortDNSOverTLS != 0 {
<mask> newconfig.TLSListenAddr = &net.TCPAddr{
<mask> IP: net.ParseIP(config.DNS.BindHost),
<mask> Port: tlsConf.PortDNSOverTLS,
<mask> }
<mask> }
<mask>
<mask> if tlsConf.PortDNSOverQUIC != 0 {
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove func generateServerConfig() dnsforward.ServerConfig {
newconfig := dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
</s> add func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
bindHost := net.ParseIP(config.DNS.BindHost)
newconfig = dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |
IP: bindHost, | <mask> }
<mask>
<mask> if tlsConf.PortDNSOverQUIC != 0 {
<mask> newconfig.QUICListenAddr = &net.UDPAddr{
<mask> IP: net.ParseIP(config.DNS.BindHost),
<mask> Port: int(tlsConf.PortDNSOverQUIC),
<mask> }
<mask> }
<mask> }
<mask> newconfig.TLSv12Roots = Context.tlsRoots
</s> Pull request: all: add dnscrypt support
Merge in DNS/adguard-home from 1361-dnscrypt to master
Closes #1361.
Squashed commit of the following:
commit 31b780c16cc6b68336b95275f62381cee2e822a2
Merge: c2ce98aaf 9b963fc77
Author: Ainar Garipov <[email protected]>
Date: Mon Dec 7 17:48:41 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit c2ce98aaf24bd5ed5b5cd7da86aae093866ab34e
Merge: 3bf3d7b96 63e513e33
Author: Ainar Garipov <[email protected]>
Date: Fri Dec 4 19:32:40 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 3bf3d7b96530c86b54545462390562ebedc616b2
Merge: 5de451996 4134220c5
Author: Ainar Garipov <[email protected]>
Date: Thu Dec 3 17:31:59 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 5de451996d48ab3792ce78291068f72785303494
Merge: 60d7976f7 ab8defdb0
Author: Ainar Garipov <[email protected]>
Date: Wed Dec 2 19:07:56 2020 +0300
Merge branch 'master' into 1361-dnscrypt
commit 60d7976f7c7ad0316751b92477a31f882c1e3134
Author: Ainar Garipov <[email protected]>
Date: Mon Nov 30 19:11:14 2020 +0300
all: add dnscrypt support </s> remove IP: net.ParseIP(config.DNS.BindHost),
</s> add IP: bindHost, </s> remove return newconfig
</s> add return newconfig, nil
}
func newDNSCrypt(bindHost net.IP, tlsConf tlsConfigSettings) (dnscc dnsforward.DNSCryptConfig, err error) {
if tlsConf.DNSCryptConfigFile == "" {
return dnscc, agherr.Error("no dnscrypt_config_file")
}
f, err := os.Open(tlsConf.DNSCryptConfigFile)
if err != nil {
return dnscc, fmt.Errorf("opening dnscrypt config: %w", err)
}
defer f.Close()
rc := &dnscrypt.ResolverConfig{}
err = yaml.NewDecoder(f).Decode(rc)
if err != nil {
return dnscc, fmt.Errorf("decoding dnscrypt config: %w", err)
}
cert, err := rc.CreateCert()
if err != nil {
return dnscc, fmt.Errorf("creating dnscrypt cert: %w", err)
}
udpAddr := &net.UDPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
tcpAddr := &net.TCPAddr{
IP: bindHost,
Port: tlsConf.PortDNSCrypt,
}
return dnsforward.DNSCryptConfig{
UDPListenAddr: udpAddr,
TCPListenAddr: tcpAddr,
ResolverCert: cert,
ProviderName: rc.ProviderName,
Enabled: true,
}, nil </s> remove func generateServerConfig() dnsforward.ServerConfig {
newconfig := dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: net.ParseIP(config.DNS.BindHost), Port: config.DNS.Port},
</s> add func generateServerConfig() (newconfig dnsforward.ServerConfig, err error) {
bindHost := net.ParseIP(config.DNS.BindHost)
newconfig = dnsforward.ServerConfig{
UDPListenAddr: &net.UDPAddr{IP: bindHost, Port: config.DNS.Port},
TCPListenAddr: &net.TCPAddr{IP: bindHost, Port: config.DNS.Port}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/AdguardTeam/AdGuardHome/commit/09b6eba7d9de4ac9522acad8585d9befe7e2cea1 | internal/home/dns.go |