docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep keep keep replace keep keep keep keep keep
|
<mask> import (
<mask> "os"
<mask> "runtime"
<mask>
<mask> "github.com/hmage/golibs/log"
<mask> "github.com/kardianos/service"
<mask> )
<mask>
<mask> const (
<mask> launchdStdoutPath = "/var/log/AdGuardHome.stdout.log"
</s> * use new logger - AdguardTeam/golibs/log </s> remove stdlog "log"
</s> add </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log"
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
|
service.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "io/ioutil"
<mask> "os"
<mask> "path/filepath"
<mask>
<mask> "github.com/hmage/golibs/log"
<mask> yaml "gopkg.in/yaml.v2"
<mask> )
<mask>
<mask> const currentSchemaVersion = 2 // used for upgrading from old configs to new config
<mask>
</s> * use new logger - AdguardTeam/golibs/log </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log" </s> remove stdlog "log"
</s> add </s> remove "github.com/hmage/golibs/log"
</s> add "github.com/AdguardTeam/golibs/log"
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cb6d97cd7b80047cfff2628cb56f1d54735e3d0
|
upgrade.go
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask>
<mask> uc := aghalg.UniqChecker{}
<mask> addPorts(
<mask> uc,
<mask> config.BindPort,
<mask> config.BetaBindPort,
<mask> config.DNS.Port,
<mask> )
<mask>
<mask> if config.TLS.Enabled {
<mask> addPorts(
<mask> uc,
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove args.bindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(args.bindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove if p != 0 {
uc.Add(p)
</s> add switch p := p.(type) {
case tcpPort, udpPort:
if p != 0 {
uc.Add(p)
}
default:
// Go on.
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/config.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask>
<mask> if config.TLS.Enabled {
<mask> addPorts(
<mask> uc,
<mask> config.TLS.PortHTTPS,
<mask> config.TLS.PortDNSOverTLS,
<mask> config.TLS.PortDNSOverQUIC,
<mask> config.TLS.PortDNSCrypt,
<mask> )
<mask> }
<mask> if err = uc.Validate(aghalg.IntIsBefore); err != nil {
<mask> return fmt.Errorf("validating ports: %w", err)
<mask> }
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove args.bindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(args.bindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port)) </s> remove addPorts(uc, config.BetaBindPort, port)
</s> add addPorts(uc, tcpPort(config.BetaBindPort), tcpPort(port))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/config.go
|
keep keep keep keep replace replace keep replace replace keep keep
|
<mask>
<mask> return nil
<mask> }
<mask>
<mask> // addPorts is a helper for ports validation. It skips zero ports.
<mask> func addPorts(uc aghalg.UniqChecker, ports ...int) {
<mask> for _, p := range ports {
<mask> if p != 0 {
<mask> uc.Add(p)
<mask> }
<mask> }
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove args.bindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(args.bindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port)) </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove addPorts(uc, config.BetaBindPort, port)
</s> add addPorts(uc, tcpPort(config.BetaBindPort), tcpPort(port))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/config.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func (req *checkConfReq) validateWeb(uc aghalg.UniqChecker) (err error) {
<mask> defer func() { err = errors.Annotate(err, "validating ports: %w") }()
<mask>
<mask> port := req.Web.Port
<mask> addPorts(uc, config.BetaBindPort, port)
<mask> if err = uc.Validate(aghalg.IntIsBefore); err != nil {
<mask> // Avoid duplicating the error into the status of DNS.
<mask> uc[port] = 1
<mask>
<mask> return err
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port)) </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove // addPorts is a helper for ports validation. It skips zero ports.
func addPorts(uc aghalg.UniqChecker, ports ...int) {
</s> add // udpPort is the port number for UDP protocol.
type udpPort int
// tcpPort is the port number for TCP protocol.
type tcpPort int
// addPorts is a helper for ports validation. It skips zero ports. Each of
// ports should be either a udpPort or a tcpPort.
func addPorts(uc aghalg.UniqChecker, ports ...interface{}) {
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/controlinstall.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func (req *checkConfReq) validateDNS(uc aghalg.UniqChecker) (canAutofix bool, err error) {
<mask> defer func() { err = errors.Annotate(err, "validating ports: %w") }()
<mask>
<mask> port := req.DNS.Port
<mask> addPorts(uc, port)
<mask> if err = uc.Validate(aghalg.IntIsBefore); err != nil {
<mask> return false, err
<mask> }
<mask>
<mask> switch port {
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove addPorts(uc, config.BetaBindPort, port)
</s> add addPorts(uc, tcpPort(config.BetaBindPort), tcpPort(port)) </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove if p != 0 {
uc.Add(p)
</s> add switch p := p.(type) {
case tcpPort, udpPort:
if p != 0 {
uc.Add(p)
}
default:
// Go on.
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/controlinstall.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> const (
<mask> defaultPortDNS = 53
<mask> defaultPortHTTP = 80
<mask> defaultPortHTTPS = 443
<mask> defaultPortQUIC = 784
<mask> defaultPortTLS = 853
<mask> )
<mask>
<mask> // Called by other modules when configuration is changed
<mask> func onConfigModified() {
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove addPorts(uc, config.BetaBindPort, port)
</s> add addPorts(uc, tcpPort(config.BetaBindPort), tcpPort(port)) </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port)) </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove if p != 0 {
uc.Add(p)
</s> add switch p := p.(type) {
case tcpPort, udpPort:
if p != 0 {
uc.Add(p)
}
default:
// Go on. </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt),
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/dns.go
|
keep keep keep replace replace replace keep keep keep keep replace replace replace replace keep keep keep
|
<mask> uc := aghalg.UniqChecker{}
<mask> addPorts(
<mask> uc,
<mask> args.bindPort,
<mask> config.BetaBindPort,
<mask> config.DNS.Port,
<mask> )
<mask> if config.TLS.Enabled {
<mask> addPorts(
<mask> uc,
<mask> config.TLS.PortHTTPS,
<mask> config.TLS.PortDNSOverTLS,
<mask> config.TLS.PortDNSOverQUIC,
<mask> config.TLS.PortDNSCrypt,
<mask> )
<mask> }
<mask> if err = uc.Validate(aghalg.IntIsBefore); err != nil {
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/home.go
|
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> if setts.Enabled {
<mask> uc := aghalg.UniqChecker{}
<mask> addPorts(
<mask> uc,
<mask> config.BindPort,
<mask> config.BetaBindPort,
<mask> config.DNS.Port,
<mask> setts.PortHTTPS,
<mask> setts.PortDNSOverTLS,
<mask> setts.PortDNSOverQUIC,
<mask> setts.PortDNSCrypt,
<mask> )
<mask>
<mask> err = uc.Validate(aghalg.IntIsBefore)
<mask> if err != nil {
<mask> aghhttp.Error(r, w, http.StatusBadRequest, "validating ports: %s", err)
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
data.PortHTTPS,
data.PortDNSOverTLS,
data.PortDNSOverQUIC,
data.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(data.PortHTTPS),
tcpPort(data.PortDNSOverTLS),
udpPort(data.PortDNSOverQUIC),
tcpPort(data.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove args.bindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(args.bindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port)) </s> remove addPorts(uc, config.BetaBindPort, port)
</s> add addPorts(uc, tcpPort(config.BetaBindPort), tcpPort(port))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/tls.go
|
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> if data.Enabled {
<mask> uc := aghalg.UniqChecker{}
<mask> addPorts(
<mask> uc,
<mask> config.BindPort,
<mask> config.BetaBindPort,
<mask> config.DNS.Port,
<mask> data.PortHTTPS,
<mask> data.PortDNSOverTLS,
<mask> data.PortDNSOverQUIC,
<mask> data.PortDNSCrypt,
<mask> )
<mask>
<mask> err = uc.Validate(aghalg.IntIsBefore)
<mask> if err != nil {
<mask> aghhttp.Error(r, w, http.StatusBadRequest, "%s", err)
</s> Pull request: 4276 upd quic port
Merge in DNS/adguard-home from 4276-doq-port to master
Closes #4276.
Squashed commit of the following:
commit cbdde622b54d0d5d11d1b4809f95a41ace990a1b
Merge: d32c13e9 2c33ab6a
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 15:47:43 2022 +0300
Merge branch 'master' into 4276-doq-port
commit d32c13e98f0fed2c863160e4e2de02ae3038e3df
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:55:09 2022 +0300
all: fix link
commit 0afd702f5192d727927df2f8d95b9317811a1be0
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:47:38 2022 +0300
all: imp docs, log changes
commit 9a77fc3daf78d32c577f1bc49aa1f8bc352d44e3
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 21 21:41:30 2022 +0300
home: upd quic port </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
setts.PortHTTPS,
setts.PortDNSOverTLS,
setts.PortDNSOverQUIC,
setts.PortDNSCrypt,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port),
tcpPort(setts.PortHTTPS),
tcpPort(setts.PortDNSOverTLS),
udpPort(setts.PortDNSOverQUIC),
tcpPort(setts.PortDNSCrypt), </s> remove config.BindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(config.BindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove args.bindPort,
config.BetaBindPort,
config.DNS.Port,
</s> add tcpPort(args.bindPort),
tcpPort(config.BetaBindPort),
udpPort(config.DNS.Port), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove config.TLS.PortHTTPS,
config.TLS.PortDNSOverTLS,
config.TLS.PortDNSOverQUIC,
config.TLS.PortDNSCrypt,
</s> add // TODO(e.burkov): Consider adding a udpPort with the same value if
// we ever support the HTTP/3 for web admin interface.
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
udpPort(config.TLS.PortDNSOverQUIC),
tcpPort(config.TLS.PortDNSCrypt), </s> remove addPorts(uc, port)
</s> add addPorts(uc, udpPort(port))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cba78a8d5ca35e33c35ff68ef0b668d78826c7f
|
internal/home/tls.go
|
keep add keep keep keep keep
|
<mask> }
<mask>
<mask> func handleTLSConfigure(w http.ResponseWriter, r *http.Request) {
<mask> data, err := unmarshalTLS(r)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> remove httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
return
</s> add return data, errorx.Decorate(err, "Your certificate does not verify") </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> remove config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
</s> add return data, nil </s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep add keep keep keep keep keep
|
<mask> return
<mask> }
<mask>
<mask> if data.CertificateChain != "" {
<mask> log.Printf("got certificate: %s", data.CertificateChain)
<mask>
<mask> if data.PrivateKey != "" {
<mask> _, err = tls.X509KeyPair([]byte(data.CertificateChain), []byte(data.PrivateKey))
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
return
</s> add return data, errorx.Decorate(err, "Your certificate does not verify") </s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts) </s> remove httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
return
</s> add return data, fmt.Errorf("You have specified an empty certificate")
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> if data.PrivateKey != "" {
<mask> _, err = tls.X509KeyPair([]byte(data.CertificateChain), []byte(data.PrivateKey))
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
<mask> return
<mask> }
<mask> }
<mask>
<mask> // now do a more extended validation
<mask> var certs []*pem.Block // PEM-encoded certificates
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts) </s> remove httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
return
</s> add return data, errorx.Decorate(err, "Your certificate does not verify") </s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> remove config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
</s> add return data, nil
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> for _, cert := range certs {
<mask> parsed, err := x509.ParseCertificate(cert.Bytes)
<mask> if err != nil {
<mask> httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
<mask> return
<mask> }
<mask> parsedCerts = append(parsedCerts, parsed)
<mask> }
<mask>
<mask> if len(parsedCerts) == 0 {
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
return
</s> add return data, fmt.Errorf("You have specified an empty certificate") </s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> remove httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
return
</s> add return data, errorx.Decorate(err, "Your certificate does not verify") </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> parsedCerts = append(parsedCerts, parsed)
<mask> }
<mask>
<mask> if len(parsedCerts) == 0 {
<mask> httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
<mask> return
<mask> }
<mask>
<mask> // spew.Dump(parsedCerts)
<mask>
<mask> opts := x509.VerifyOptions{
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
return
</s> add return data, errorx.Decorate(err, "Your certificate does not verify") </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep replace keep keep replace replace keep
|
<mask> // TODO: save it as a warning rather than error it out -- shouldn't be a big problem
<mask> mainCert := parsedCerts[0]
<mask> _, err = mainCert.Verify(opts)
<mask> if err != nil {
<mask> // TODO: let self-signed certs through
<mask> httpError(w, http.StatusBadRequest, "Your certificate does not verify: %s", err)
<mask> return
<mask> }
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> remove httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
return
</s> add return data, fmt.Errorf("You have specified an empty certificate")
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> }
<mask> }
<mask> }
<mask>
<mask> config.TLS = data
<mask> httpUpdateConfigReloadDNSReturnOK(w, r)
<mask> }
<mask>
<mask> // unmarshalTLS handles base64-encoded certificates transparently
<mask> func unmarshalTLS(r *http.Request) (tlsConfig, error) {
<mask> data := tlsConfig{}
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key") </s> remove httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
return
</s> add return data, fmt.Errorf("You have specified an empty certificate") </s> remove _, err = mainCert.Verify(opts)
</s> add _, err := mainCert.Verify(opts) </s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate")
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep add keep
|
<mask>
<mask> http.HandleFunc("/control/tls/status", postInstall(optionalAuth(ensureGET(handleTLSStatus))))
<mask> http.HandleFunc("/control/tls/configure", postInstall(optionalAuth(ensurePOST(handleTLSConfigure))))
<mask> }
</s> Introduce /tls/validate and validateCertificates() that will also be used by /tls/configure </s> remove config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
</s> add return data, nil </s> add func handleTLSValidate(w http.ResponseWriter, r *http.Request) {
data, err := unmarshalTLS(r)
if err != nil {
httpError(w, http.StatusBadRequest, "Failed to unmarshal TLS config: %s", err)
return
}
data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
}
</s> remove httpError(w, http.StatusBadRequest, "You have specified an empty certificate")
return
</s> add return data, fmt.Errorf("You have specified an empty certificate") </s> add data, err = validateCertificates(data)
if err != nil {
httpError(w, http.StatusBadRequest, "New TLS configuration does not validate: %s", err)
return
}
config.TLS = data
httpUpdateConfigReloadDNSReturnOK(w, r)
}
func validateCertificates(data tlsConfig) (tlsConfig, error) {
var err error
</s> remove httpError(w, http.StatusBadRequest, "failed to parse certificate: %s", err)
return
</s> add return data, errorx.Decorate(err, "Failed to parse certificate") </s> remove httpError(w, http.StatusBadRequest, "Invalid certificate or key: %s", err)
return
</s> add return data, errorx.Decorate(err, "Invalid certificate or key")
|
https://github.com/AdguardTeam/AdGuardHome/commit/5cbaeb82a8b3cabdba1d5d4decc67c3fe0dc7d6f
|
control.go
|
keep keep keep add keep keep keep keep keep
|
<mask> /AdGuardHome.yaml
<mask> /AdGuardHome.log
<mask> /data
<mask> /build
<mask> /dist
<mask> /client/node_modules
<mask> /client2/node_modules
<mask> /.gitattributes
<mask> /.gitignore
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add /client2/node_modules </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add dst.BetaBindPort = src.BetaBindPort </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort, </s> remove var address string
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
.dockerignore
|
keep keep add keep keep keep keep keep keep
|
<mask> /build2
<mask> /dist
<mask> /client/node_modules
<mask> /.gitattributes
<mask> /.gitignore
<mask> /.goreleaser.yml
<mask> /changelog.config.js
<mask> /coverage.txt
<mask> /Dockerfile
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add /build2 </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add dst.BetaBindPort = src.BetaBindPort </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort, </s> remove var address string
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
.dockerignore
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'name': 'build'
<mask>
<mask> 'env':
<mask> 'GO_VERSION': '1.14'
<mask> 'NODE_VERSION': '13'
<mask>
<mask> 'on':
<mask> 'push':
<mask> 'branches':
<mask> - '*'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'ipv4_addresses':
</s> add 'ip_addresses': </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip' </s> add 'required':
- 'flags'
- 'hardware_address'
- 'name'
- 'mtu' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
.github/workflows/build.yml
|
keep add keep keep keep keep
|
<mask> *-packr.go
<mask> *.db
<mask> *.snap
<mask> /bin/
<mask> /build/
<mask> /build2/
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add /build2/ </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add dst.BetaBindPort = src.BetaBindPort </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort,
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
.gitignore
|
keep keep add keep keep keep keep
|
<mask> *.snap
<mask> /bin/
<mask> /build/
<mask> /data/
<mask> /dist/
<mask> /dnsfilter/tests/dnsfilter.TestLotsOfRules*.pprof
<mask> /dnsfilter/tests/top-1m.csv
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add *.log </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add dst.BetaBindPort = src.BetaBindPort </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort,
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
.gitignore
|
keep add keep keep keep keep
|
<mask> git \
<mask> npm \
<mask> && rm -rf /tmp/* /var/cache/apk/*
<mask>
<mask> WORKDIR /app
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add yarn --cwd client2 start </s> add yarn --cwd client2 install </s> add RUN yarn --cwd client2 build </s> remove web.portHTTPS = tlsConf.PortHTTPS
</s> add </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort { </s> add yarn --cwd client2 build
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Dockerfile
|
keep keep add keep keep keep keep keep
|
<mask>
<mask> # Prepare the client code
<mask> RUN npm --prefix client ci && npm --prefix client run build-prod
<mask>
<mask> # Download go dependencies
<mask> RUN go mod download
<mask> RUN go generate ./...
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add yarn --cwd client2 install </s> add yarn --cwd client2 lint </s> add yarn --cwd client2 start </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO())
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Dockerfile
|
keep add keep keep keep keep keep
|
<mask> client:
<mask> npm --prefix client run build-prod
<mask>
<mask> client_with_deps:
<mask> npm --prefix client ci
<mask> npm --prefix client run build-prod
<mask> yarn --cwd client2 build
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add yarn --cwd client2 build </s> add RUN yarn --cwd client2 build </s> add yarn --cwd client2 start </s> add yarn --cwd client2 lint </s> add yarn --cwd client2 install </s> add yarn \
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Makefile
|
keep keep keep add keep keep keep keep keep keep
|
<mask>
<mask> client_with_deps:
<mask> npm --prefix client ci
<mask> npm --prefix client run build-prod
<mask>
<mask> client-watch:
<mask> npm --prefix client run watch
<mask> yarn --cwd client2 start
<mask>
<mask> docker:
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add yarn --cwd client2 build </s> add yarn --cwd client2 start </s> add RUN yarn --cwd client2 build </s> add yarn --cwd client2 lint </s> add yarn --cwd client2 install </s> add yarn \
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Makefile
|
keep add keep keep keep keep keep keep
|
<mask> client-watch:
<mask> npm --prefix client run watch
<mask>
<mask> docker:
<mask> DOCKER_CLI_EXPERIMENTAL=enabled \
<mask> docker buildx build \
<mask> --build-arg VERSION=$(VERSION) \
<mask> --build-arg CHANNEL=$(CHANNEL) \
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add yarn \ </s> add yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add RUN yarn --cwd client2 build </s> add yarn --cwd client2 lint </s> add yarn --cwd client2 install
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Makefile
|
keep keep keep add keep keep keep keep keep
|
<mask> lint: js-lint go-lint
<mask>
<mask> js-lint: dependencies
<mask> npm --prefix client run lint
<mask>
<mask> go-install-tools:
<mask> env GO=$(GO) sh ./scripts/go-install-tools.sh
<mask>
<mask> go-lint:
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add RUN yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add yarn --cwd client2 start </s> add yarn --cwd client2 install </s> add yarn \
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Makefile
|
keep keep add keep keep keep keep keep keep
|
<mask>
<mask> dependencies:
<mask> npm --prefix client ci
<mask> $(GO) mod download
<mask>
<mask> clean:
<mask> rm -f ./AdGuardHome ./AdGuardHome.exe ./coverage.txt
<mask> rm -f -r ./build/ ./client/node_modules/ ./data/ ./$(DIST_DIR)/
<mask> # Set the GOPATH explicitly in case make clean is called from under sudo
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add RUN yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add yarn --cwd client2 build </s> add yarn \ </s> add yarn --cwd client2 lint </s> add yarn --cwd client2 start
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
Makefile
|
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> // Raw file data to avoid re-reading of configuration file
<mask> // It's reset after config is parsed
<mask> fileData []byte
<mask>
<mask> BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
<mask> BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
<mask> Users []User `yaml:"users"` // Users that can access HTTP server
<mask> ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
<mask> Language string `yaml:"language"` // two-letter ISO 639-1 language code
<mask> RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
<mask> DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
<mask>
<mask> // TTL for a web session (in hours)
<mask> // An active session is automatically refreshed once a day.
<mask> WebSessionTTLHours uint32 `yaml:"web_session_ttl"`
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> remove firstRun bool
BindHost string
BindPort int
PortHTTPS int
</s> add firstRun bool
BindHost string
BindPort int
BetaBindPort int
PortHTTPS int </s> remove // for Rewritten:
</s> add // for Rewrite: </s> remove var address string
</s> add </s> remove portHTTPS int
</s> add </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/config.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> // initialize to default values, will be changed later when reading config or parsing command line
<mask> var config = configuration{
<mask> BindPort: 3000,
<mask> BindHost: "0.0.0.0",
<mask> DNS: dnsConfig{
<mask> BindHost: "0.0.0.0",
<mask> Port: 53,
<mask> StatsInterval: 1,
<mask> FilteringConfig: dnsforward.FilteringConfig{
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort, </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> remove var address string
</s> add </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add // This must be removed in API v1.
w.registerBetaInstallHandlers()
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/config.go
|
keep add keep keep keep keep
|
<mask> config.DHCP.Conf4.ICMPTimeout = 1000
<mask> config.DHCP.Conf6.LeaseDuration = 86400
<mask> }
<mask>
<mask> // getConfigFilename returns path to the current config file
<mask> func (c *configuration) getConfigFilename() string {
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add dst.BetaBindPort = src.BetaBindPort </s> remove var address string
</s> add </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> remove // for Rewritten:
</s> add // for Rewrite: </s> remove BindPort: 3000,
BindHost: "0.0.0.0",
</s> add BindPort: 3000,
BetaBindPort: 0,
BindHost: "0.0.0.0", </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO())
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/config.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> // construct new URL to redirect to
<mask> newURL := url.URL{
<mask> Scheme: "https",
<mask> Host: net.JoinHostPort(host, strconv.Itoa(Context.web.portHTTPS)),
<mask> Path: r.URL.Path,
<mask> RawQuery: r.URL.RawQuery,
<mask> }
<mask> http.Redirect(w, r, newURL.String(), http.StatusTemporaryRedirect)
<mask> return
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add boxBeta := packr.NewBox("../../build2/static") </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/control.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> // for FilteredBlockedService:
<mask> SvcName string `json:"service_name"`
<mask>
<mask> // for Rewritten:
<mask> CanonName string `json:"cname"` // CNAME value
<mask> IPList []net.IP `json:"ip_addrs"` // list of IP addresses
<mask> }
<mask>
<mask> func (f *Filtering) handleCheckHost(w http.ResponseWriter, r *http.Request) {
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove var address string
</s> add </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> remove firstRun bool
BindHost string
BindPort int
PortHTTPS int
</s> add firstRun bool
BindHost string
BindPort int
BetaBindPort int
PortHTTPS int </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/controlfiltering.go
|
keep keep add keep keep keep keep
|
<mask> "path/filepath"
<mask> "runtime"
<mask> "strconv"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/util"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/sysutil"
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort { </s> add dst.BetaBindPort = src.BetaBindPort </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
</s> add firstRun: Context.firstRun,
BindHost: config.BindHost,
BindPort: config.BindPort,
BetaBindPort: config.BetaBindPort, </s> remove var address string
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/controlinstall.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> httpError(w, http.StatusBadRequest, "Failed to parse 'check_config' JSON data: %s", err)
<mask> return
<mask> }
<mask>
<mask> if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
<mask> err = util.CheckPortAvailable(reqData.Web.IP, reqData.Web.Port)
<mask> if err != nil {
<mask> respData.Web.Status = fmt.Sprintf("%v", err)
<mask> }
<mask> }
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
} </s> remove web.portHTTPS = tlsConf.PortHTTPS
</s> add </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/controlinstall.go
|
keep keep keep add keep keep keep keep keep
|
<mask> // Copy installation parameters between two configuration objects
<mask> func copyInstallSettings(dst, src *configuration) {
<mask> dst.BindHost = src.BindHost
<mask> dst.BindPort = src.BindPort
<mask> dst.DNS.BindHost = src.DNS.BindHost
<mask> dst.DNS.Port = src.DNS.Port
<mask> }
<mask>
<mask> // Apply new configuration, start DNS server, restart Web server
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove web.portHTTPS = tlsConf.PortHTTPS
</s> add </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> add boxBeta := packr.NewBox("../../build2/static") </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/controlinstall.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
<mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
<mask> if restartHTTP {
<mask> go func() {
<mask> _ = Context.web.httpServer.Shutdown(context.TODO())
<mask> }()
<mask> }
<mask> }
<mask>
<mask> func (web *Web) registerInstallHandlers() {
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
} </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add // This must be removed in API v1.
w.registerBetaInstallHandlers() </s> add w.installerBeta = preInstallHandler(http.FileServer(boxBeta))
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/controlinstall.go
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> log.Fatalf("Can't initialize TLS module")
<mask> }
<mask>
<mask> webConf := webConfig{
<mask> firstRun: Context.firstRun,
<mask> BindHost: config.BindHost,
<mask> BindPort: config.BindPort,
<mask>
<mask> ReadTimeout: ReadTimeout,
<mask> ReadHeaderTimeout: ReadHeaderTimeout,
<mask> WriteTimeout: WriteTimeout,
<mask> }
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove BindPort: 3000,
BindHost: "0.0.0.0",
</s> add BindPort: 3000,
BetaBindPort: 0,
BindHost: "0.0.0.0", </s> remove Addr: address,
</s> add Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)), </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> remove Host: net.JoinHostPort(host, strconv.Itoa(Context.web.portHTTPS)),
</s> add Host: net.JoinHostPort(host, strconv.Itoa(Context.web.conf.PortHTTPS)), </s> remove web.portHTTPS = tlsConf.PortHTTPS
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/home.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> // prints IP addresses which user can use to open the admin interface
<mask> // proto is either "http" or "https"
<mask> func printHTTPAddresses(proto string) {
<mask> var address string
<mask>
<mask> tlsConf := tlsConfigSettings{}
<mask> if Context.tls != nil {
<mask> Context.tls.WriteDiskConfig(&tlsConf)
<mask> }
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove // for Rewritten:
</s> add // for Rewrite: </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort {
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/home.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> log.Println("AdGuard Home is available on the following addresses:")
<mask> ifaces, err := util.GetValidNetInterfacesForWeb()
<mask> if err != nil {
<mask> // That's weird, but we'll ignore it
<mask> address = net.JoinHostPort(config.BindHost, port)
<mask> log.Printf("Go to %s://%s", proto, address)
<mask> return
<mask> }
<mask>
<mask> for _, iface := range ifaces {
<mask> for _, addr := range iface.Addresses {
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort { </s> remove var address string
</s> add </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/home.go
|
keep keep keep keep replace replace keep keep keep replace replace
|
<mask> }
<mask>
<mask> for _, iface := range ifaces {
<mask> for _, addr := range iface.Addresses {
<mask> address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
<mask> log.Printf("Go to %s://%s", proto, address)
<mask> }
<mask> }
<mask> } else {
<mask> address = net.JoinHostPort(config.BindHost, port)
<mask> log.Printf("Go to %s://%s", proto, address)
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
</s> add </s> remove var address string
</s> add </s> add // This must be removed in API v1.
w.registerBetaInstallHandlers() </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/home.go
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> WriteTimeout = 10 * time.Second
<mask> )
<mask>
<mask> type webConfig struct {
<mask> firstRun bool
<mask> BindHost string
<mask> BindPort int
<mask> PortHTTPS int
<mask>
<mask> // ReadTimeout is an option to pass to http.Server for setting an
<mask> // appropriate field.
<mask> ReadTimeout time.Duration
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> remove portHTTPS int
</s> add </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> remove // for Rewritten:
</s> add // for Rewrite: </s> add errs := make(chan error, 2) </s> remove var address string
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // Web - module object
<mask> type Web struct {
<mask> conf *webConfig
<mask> forceHTTPS bool
<mask> portHTTPS int
<mask> httpServer *http.Server // HTTP module
<mask> httpsServer HTTPSServer // HTTPS module
<mask> }
<mask>
<mask> // CreateWeb - create module
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> remove firstRun bool
BindHost string
BindPort int
PortHTTPS int
</s> add firstRun bool
BindHost string
BindPort int
BetaBindPort int
PortHTTPS int </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add boxBeta := packr.NewBox("../../build2/static") </s> add dst.BetaBindPort = src.BetaBindPort </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep add keep keep keep keep keep keep
|
<mask> forceHTTPS bool
<mask> httpServer *http.Server // HTTP module
<mask> httpsServer HTTPSServer // HTTPS module
<mask> }
<mask>
<mask> // CreateWeb - create module
<mask> func CreateWeb(conf *webConfig) *Web {
<mask> log.Info("Initialize web module")
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove portHTTPS int
</s> add </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> remove // for Rewritten:
</s> add // for Rewrite: </s> remove var address string
</s> add </s> remove firstRun bool
BindHost string
BindPort int
PortHTTPS int
</s> add firstRun bool
BindHost string
BindPort int
BetaBindPort int
PortHTTPS int </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep add keep keep keep keep
|
<mask> w.conf = conf
<mask>
<mask> // Initialize and run the admin Web interface
<mask> box := packr.NewBox("../../build/static")
<mask>
<mask> // if not configured, redirect / to /install.html, otherwise redirect /install.html to /
<mask> Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
<mask> w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler)
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler) </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove var address string
</s> add </s> remove Host: net.JoinHostPort(host, strconv.Itoa(Context.web.portHTTPS)),
</s> add Host: net.JoinHostPort(host, strconv.Itoa(Context.web.conf.PortHTTPS)), </s> add errs := make(chan error, 2) </s> remove portHTTPS int
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // Initialize and run the admin Web interface
<mask> box := packr.NewBox("../../build/static")
<mask>
<mask> // if not configured, redirect / to /install.html, otherwise redirect /install.html to /
<mask> Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
<mask>
<mask> // add handlers for /install paths, we only need them when we're not configured yet
<mask> if conf.firstRun {
<mask> log.Info("This is the first launch of AdGuard Home, redirecting everything to /install.html ")
<mask> Context.mux.Handle("/install.html", preInstallHandler(http.FileServer(box)))
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add boxBeta := packr.NewBox("../../build2/static") </s> add w.installerBeta = preInstallHandler(http.FileServer(boxBeta)) </s> add // This must be removed in API v1.
w.registerBetaInstallHandlers() </s> add errs := make(chan error, 2) </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
</s> add </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep add keep keep keep keep keep
|
<mask> log.Info("This is the first launch of AdGuard Home, redirecting everything to /install.html ")
<mask> Context.mux.Handle("/install.html", preInstallHandler(http.FileServer(box)))
<mask> w.registerInstallHandlers()
<mask> // This must be removed in API v1.
<mask> w.registerBetaInstallHandlers()
<mask> } else {
<mask> registerControlHandlers()
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add // This must be removed in API v1.
w.registerBetaInstallHandlers() </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler) </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep add keep keep keep keep keep
|
<mask> log.Info("This is the first launch of AdGuard Home, redirecting everything to /install.html ")
<mask> Context.mux.Handle("/install.html", preInstallHandler(http.FileServer(box)))
<mask> w.installerBeta = preInstallHandler(http.FileServer(boxBeta))
<mask> w.registerInstallHandlers()
<mask> } else {
<mask> registerControlHandlers()
<mask> }
<mask>
<mask> w.httpsServer.cond = sync.NewCond(&w.httpsServer.condLock)
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add w.installerBeta = preInstallHandler(http.FileServer(boxBeta)) </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler) </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> func (web *Web) TLSConfigChanged(tlsConf tlsConfigSettings) {
<mask> log.Debug("Web: applying new TLS configuration")
<mask> web.conf.PortHTTPS = tlsConf.PortHTTPS
<mask> web.forceHTTPS = (tlsConf.ForceHTTPS && tlsConf.Enabled && tlsConf.PortHTTPS != 0)
<mask> web.portHTTPS = tlsConf.PortHTTPS
<mask>
<mask> enabled := tlsConf.Enabled &&
<mask> tlsConf.PortHTTPS != 0 &&
<mask> len(tlsConf.PrivateKeyData) != 0 &&
<mask> len(tlsConf.CertificateChainData) != 0
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort { </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add yarn \ </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> add if web.httpServerBeta != nil {
_ = web.httpServerBeta.Shutdown(context.TODO())
}
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep add keep keep keep keep
|
<mask> for !web.httpsServer.shutdown {
<mask> printHTTPAddresses("http")
<mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> web.httpServer = &http.Server{
<mask> ErrorLog: log.StdLog("web: http", log.DEBUG),
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
</s> add </s> remove Addr: address,
</s> add Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)), </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler) </s> add // handlerBeta is the handler for new client.
handlerBeta http.Handler
// installerBeta is the pre-install handler for new client.
installerBeta http.Handler
// httpServerBeta is a server for new client.
httpServerBeta *http.Server </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO())
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep replace keep keep replace
|
<mask> printHTTPAddresses("http")
<mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
<mask> web.httpServer = &http.Server{
<mask> ErrorLog: log.StdLog("web: http", log.DEBUG),
<mask> Addr: address,
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add errs := make(chan error, 2) </s> remove err := web.httpServer.ListenAndServe()
</s> add err := <-errs </s> remove Context.mux.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))
</s> add Context.mux.Handle("/", withMiddlewares(http.FileServer(box), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler))
w.handlerBeta = withMiddlewares(http.FileServer(boxBeta), gziphandler.GzipHandler, optionalAuthHandler, postInstallHandler) </s> add boxBeta := packr.NewBox("../../build2/static") </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> ReadHeaderTimeout: web.conf.ReadHeaderTimeout,
<mask> WriteTimeout: web.conf.WriteTimeout,
<mask> }
<mask>
<mask> err := web.httpServer.ListenAndServe()
<mask> if err != http.ErrServerClosed {
<mask> cleanupAlways()
<mask> log.Fatal(err)
<mask> }
<mask> // We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove Addr: address,
</s> add Addr: net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort)), </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort { </s> remove address := net.JoinHostPort(web.conf.BindHost, strconv.Itoa(web.conf.BindPort))
</s> add </s> remove var address string
</s> add </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO())
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep add keep keep keep keep
|
<mask> _ = web.httpServer.Shutdown(context.TODO())
<mask> }
<mask>
<mask> log.Info("Stopped HTTP server")
<mask> }
<mask>
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove _ = Context.web.httpServer.Shutdown(context.TODO())
</s> add _ = web.httpServer.Shutdown(context.TODO())
}()
go func() {
_ = web.httpServerBeta.Shutdown(context.TODO()) </s> remove portHTTPS int
</s> add </s> remove address = net.JoinHostPort(config.BindHost, port)
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(config.BindHost, port))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(config.BindHost, strconv.Itoa(config.BetaBindPort)))
} </s> remove address = net.JoinHostPort(addr, strconv.Itoa(config.BindPort))
log.Printf("Go to %s://%s", proto, address)
</s> add log.Printf("Go to %s://%s", proto, net.JoinHostPort(addr, strconv.Itoa(config.BindPort)))
if config.BetaBindPort != 0 {
log.Printf("Go to %s://%s (BETA)", proto, net.JoinHostPort(addr, strconv.Itoa(config.BetaBindPort)))
} </s> add if updateChannel == "none" || updateChannel == "edge" {
config.BetaBindPort = 3001
} </s> remove if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort {
</s> add if reqData.Web.Port != 0 && reqData.Web.Port != config.BindPort && reqData.Web.Port != config.BetaBindPort {
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
internal/home/web.go
|
keep keep keep add keep keep keep keep keep
|
<mask> Status of testing each requested server, with "OK" meaning that
<mask> server works, any other text means an error.
<mask> 'content':
<mask> 'application/json':
<mask> 'examples':
<mask> 'response':
<mask> 'value':
<mask> '1.1.1.1': 'OK'
<mask> '1.0.0.1': 'OK'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enable':
'type': 'boolean'
'sensitivity':
'type': 'integer' </s> add '/install/get_addresses_beta':
'get':
'tags':
- 'install'
'operationId': 'installGetAddressesBeta'
'summary': >
'UNSTABLE!: Gets the network interfaces information.'
'responses':
'200':
'description': 'OK.'
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/AddressesInfoBeta' </s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060
</s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
BetaBindPort int `yaml:"beta_bind_port"` // BetaBindPort is the port for new client
Users []User `yaml:"users"` // Users that can access HTTP server
ProxyURL string `yaml:"http_proxy"` // Proxy address for our HTTP client
Language string `yaml:"language"` // two-letter ISO 639-1 language code
RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
DebugPProf bool `yaml:"debug_pprof"` // Enable pprof HTTP server on port 6060 </s> add dst.BetaBindPort = src.BetaBindPort
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep add keep keep keep keep
|
<mask> 'content':
<mask> 'application/json':
<mask> 'examples':
<mask> 'response':
<mask> 'value':
<mask> 'enabled': false
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enable':
'type': 'boolean'
'sensitivity':
'type': 'integer' </s> add 'schema':
'$ref': '#/components/schemas/UpstreamsConfigResponse' </s> add '/install/get_addresses_beta':
'get':
'tags':
- 'install'
'operationId': 'installGetAddressesBeta'
'summary': >
'UNSTABLE!: Gets the network interfaces information.'
'responses':
'200':
'description': 'OK.'
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/AddressesInfoBeta' </s> add 'default': '' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep keep
|
<mask> '200':
<mask> 'description': 'OK.'
<mask> 'content':
<mask> 'application/json':
<mask> 'examples':
<mask> 'response':
<mask> 'value':
<mask> 'enabled': true
<mask> 'sensitivity': 13
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add '/install/get_addresses_beta':
'get':
'tags':
- 'install'
'operationId': 'installGetAddressesBeta'
'summary': >
'UNSTABLE!: Gets the network interfaces information.'
'responses':
'200':
'description': 'OK.'
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/AddressesInfoBeta' </s> add 'schema':
'$ref': '#/components/schemas/UpstreamsConfigResponse' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'flags'
- 'hardware_address'
- 'name'
- 'mtu'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep add keep keep keep keep keep
|
<mask> 'description': 'OK.'
<mask> 'content':
<mask> 'application/json':
<mask> 'examples':
<mask> 'response':
<mask> 'value':
<mask> 'enabled': false
<mask> '/clients':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enable':
'type': 'boolean'
'sensitivity':
'type': 'integer' </s> add '/install/get_addresses_beta':
'get':
'tags':
- 'install'
'operationId': 'installGetAddressesBeta'
'summary': >
'UNSTABLE!: Gets the network interfaces information.'
'responses':
'200':
'description': 'OK.'
'content':
'application/json':
'schema':
'$ref': '#/components/schemas/AddressesInfoBeta' </s> add 'schema':
'$ref': '#/components/schemas/UpstreamsConfigResponse' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
- 'yes'
- 'no'
- 'error'
'description': 'Can be: yes, no, error'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep add keep keep keep keep keep
|
<mask> 'examples':
<mask> 'response':
<mask> 'value': 'en'
<mask> '/install/get_addresses':
<mask> 'get':
<mask> 'tags':
<mask> - 'install'
<mask> 'operationId': 'installGetAddresses'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean' </s> add 'schema':
'type': 'object'
'parameters':
'enable':
'type': 'boolean'
'sensitivity':
'type': 'integer' </s> add 'schema':
'$ref': '#/components/schemas/UpstreamsConfigResponse' </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'type': 'string'
<mask> 'example': '127.0.0.1'
<mask> 'dns_port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 53
<mask> 'minimum': 1
<mask> 'maximum': 65535
<mask> 'protection_enabled':
<mask> 'type': 'boolean'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep add keep keep keep keep keep
|
<mask> - 'tls://1.1.1.1'
<mask> - 'tls://1.0.0.1'
<mask> 'Filter':
<mask> 'type': 'object'
<mask> 'description': 'Filter subscription info'
<mask> 'required':
<mask> - 'enabled'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'required':
- 'flags'
- 'hardware_address'
- 'name'
- 'mtu' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces' </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> add 'required':
- 'ip'
- 'port' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip' </s> add 'required':
- 'status'
- 'can_autofix'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep replace keep keep keep keep replace keep keep keep
|
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 443
<mask> 'description': 'HTTPS port. If 0, HTTPS will be disabled.'
<mask> 'port_dns_over_tls':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 853
<mask> 'description': 'DNS-over-TLS port. If 0, DOT will be disabled.'
<mask> 'port_dns_over_quic':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'example': 853
<mask> 'description': 'DNS-over-TLS port. If 0, DOT will be disabled.'
<mask> 'port_dns_over_quic':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 784
<mask> 'description': 'DNS-over-QUIC port. If 0, DOQ will be disabled.'
<mask> 'certificate_chain':
<mask> 'type': 'string'
<mask> 'description': 'Base64 string with PEM-encoded certificates chain'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove BindPort: 3000,
BindHost: "0.0.0.0",
</s> add BindPort: 3000,
BetaBindPort: 0,
BindHost: "0.0.0.0",
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep
|
<mask> Set to true if both certificate and private key are correct.
<mask> 'NetInterface':
<mask> 'type': 'object'
<mask> 'description': 'Network interface info'
<mask> 'properties':
<mask> 'flags':
<mask> 'type': 'string'
<mask> 'example': 'up|broadcast|multicast'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'UpstreamsConfigResponse':
'type': 'object'
'description': 'Upstreams configuration response'
'additionalProperties':
'type': 'string' </s> add 'default': '' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep replace
|
<mask> 'example': '52:54:00:11:09:ba'
<mask> 'name':
<mask> 'type': 'string'
<mask> 'example': 'eth0'
<mask> 'ipv4_addresses':
<mask> 'type': 'array'
<mask> 'items':
<mask> 'type': 'string'
<mask> 'ipv6_addresses':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'default': '' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> 'ipv6_addresses':
<mask> 'type': 'array'
<mask> 'items':
<mask> 'type': 'string'
<mask> 'gateway_ip':
<mask> 'type': 'string'
<mask> 'AddressInfo':
<mask> 'type': 'object'
<mask> 'description': 'Port information'
<mask> 'properties':
<mask> 'ip':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'ipv6_addresses':
</s> add 'mtu':
'type': 'integer'
'AddressInfoBeta':
'type': 'object'
'description': 'Port information'
'required':
- 'ip'
- 'port'
'properties':
'ip': </s> add 'required':
- 'ip'
- 'port' </s> remove 'ipv4_addresses':
</s> add 'ip_addresses': </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep
|
<mask> 'example': 53
<mask> 'AddressInfo':
<mask> 'type': 'object'
<mask> 'description': 'Port information'
<mask> 'properties':
<mask> 'ip':
<mask> 'type': 'string'
<mask> 'example': '127.0.0.1'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'ipv6_addresses':
</s> add 'mtu':
'type': 'integer'
'AddressInfoBeta':
'type': 'object'
'description': 'Port information'
'required':
- 'ip'
- 'port'
'properties':
'ip': </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'type': 'string'
<mask> 'example': '127.0.0.1'
<mask> 'port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 53
<mask> 'AddressesInfo':
<mask> 'type': 'object'
<mask> 'description': 'AdGuard Home addresses configuration'
<mask> 'properties':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep
|
<mask> 'example': 53
<mask> 'AddressesInfo':
<mask> 'type': 'object'
<mask> 'description': 'AdGuard Home addresses configuration'
<mask> 'properties':
<mask> 'dns_port':
<mask> 'type': 'integer'
<mask> 'format': 'uint16'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'description': 'AdGuard Home addresses configuration'
<mask> 'properties':
<mask> 'dns_port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 53
<mask> 'web_port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 80
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'format': 'int32'
<mask> 'example': 53
<mask> 'web_port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 80
<mask> 'interfaces':
<mask> 'type': 'object'
<mask> 'description': >
<mask> Network interfaces dictionary, keys are interface names.
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
|
<mask> 'items':
<mask> '$ref': '#/components/schemas/ClientsFindEntry'
<mask> 'ClientsFindEntry':
<mask> 'type': 'object'
<mask> 'properties':
<mask> '1.2.3.4':
<mask> 'items':
<mask> '$ref': '#/components/schemas/ClientFindSubEntry'
<mask>
<mask> 'ClientFindSubEntry':
<mask> 'type': 'object'
<mask> 'properties':
<mask> 'name':
<mask> 'type': 'string'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> remove 'ipv6_addresses':
</s> add 'mtu':
'type': 'integer'
'AddressInfoBeta':
'type': 'object'
'description': 'Port information'
'required':
- 'ip'
- 'port'
'properties':
'ip': </s> remove 'ipv4_addresses':
</s> add 'ip_addresses': </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> add 'required':
- 'status'
- 'can_autofix' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep add keep keep keep keep keep keep
|
<mask> 'items':
<mask> 'type': 'string'
<mask> 'CheckConfigRequest':
<mask> 'type': 'object'
<mask> 'description': 'Configuration to be checked'
<mask> 'properties':
<mask> 'dns':
<mask> '$ref': '#/components/schemas/CheckConfigRequestInfo'
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip' </s> remove 'ipv6_addresses':
</s> add 'mtu':
'type': 'integer'
'AddressInfoBeta':
'type': 'object'
'description': 'Port information'
'required':
- 'ip'
- 'port'
'properties':
'ip': </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> 'type': 'string'
<mask> 'example': '127.0.0.1'
<mask> 'port':
<mask> 'type': 'integer'
<mask> 'format': 'int32'
<mask> 'example': 53
<mask> 'autofix':
<mask> 'type': 'boolean'
<mask> 'example': false
<mask> 'CheckConfigResponse':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'default': ''
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep keep keep
|
<mask> 'type': 'boolean'
<mask> 'example': false
<mask> 'CheckConfigResponse':
<mask> 'type': 'object'
<mask> 'properties':
<mask> 'dns':
<mask> '$ref': '#/components/schemas/CheckConfigResponseInfo'
<mask> 'web':
<mask> '$ref': '#/components/schemas/CheckConfigResponseInfo'
<mask> 'static_ip':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'required':
- 'dns'
- 'web'
- 'username'
- 'password' </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'status'
- 'can_autofix' </s> add 'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
- 'yes'
- 'no'
- 'error'
'description': 'Can be: yes, no, error'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep add keep keep keep keep keep keep
|
<mask> '$ref': '#/components/schemas/CheckConfigStaticIpInfo'
<mask> 'CheckConfigResponseInfo':
<mask> 'type': 'object'
<mask> 'properties':
<mask> 'status':
<mask> 'type': 'string'
<mask> 'default': ''
<mask> 'example': ''
<mask> 'can_autofix':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> add 'default': '' </s> add 'default': '' </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
- 'yes'
- 'no'
- 'error'
'description': 'Can be: yes, no, error'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep add keep keep keep keep
|
<mask> 'status':
<mask> 'type': 'string'
<mask> 'example': ''
<mask> 'can_autofix':
<mask> 'type': 'boolean'
<mask> 'example': false
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'required':
- 'status'
- 'can_autofix' </s> add 'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
- 'yes'
- 'no'
- 'error'
'description': 'Can be: yes, no, error' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'default': '' </s> add 'default': '' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep add keep keep keep keep
|
<mask> 'can_autofix':
<mask> 'type': 'boolean'
<mask> 'example': false
<mask> 'CheckConfigStaticIpInfo':
<mask> 'type': 'object'
<mask> 'properties':
<mask> 'static':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> add 'required':
- 'dns'
- 'web'
- 'static_ip' </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'required':
- 'status'
- 'can_autofix' </s> add 'schema':
'type': 'object'
'parameters':
'enabled':
'type': 'boolean'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> 'CheckConfigStaticIpInfo':
<mask> 'type': 'object'
<mask> 'properties':
<mask> 'static':
<mask> 'type': 'string'
<mask> 'example': 'no'
<mask> 'description': 'Can be: yes, no, error'
<mask> 'ip':
<mask> 'type': 'string'
<mask> 'example': '192.168.1.1'
<mask> 'description': 'Current dynamic IP address. Set if static=no'
<mask> 'error':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> add 'CheckConfigStaticIpInfoStatic':
'type': 'string'
'example': 'no'
'enum':
- 'yes'
- 'no'
- 'error'
'description': 'Can be: yes, no, error' </s> add 'default': '' </s> add 'required':
- 'ip'
- 'port' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53 </s> add 'required':
- 'flags'
- 'hardware_address'
- 'name'
- 'mtu'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep keep keep
|
<mask> 'static':
<mask> '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic'
<mask> 'ip':
<mask> 'type': 'string'
<mask> 'example': '192.168.1.1'
<mask> 'description': 'Current dynamic IP address. Set if static=no'
<mask> 'error':
<mask> 'type': 'string'
<mask> 'default': ''
<mask> 'example': ''
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> add 'default': '' </s> add 'required':
- 'status'
- 'can_autofix' </s> add 'required':
- 'ip'
- 'port' </s> remove 'gateway_ip':
'type': 'string'
</s> add 'minItems': 1
'example':
- '127.0.0.1'
'port':
'type': 'integer'
'format': 'uint16'
'example': 53
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep keep
|
<mask> 'example': '192.168.1.1'
<mask> 'description': 'Current dynamic IP address. Set if static=no'
<mask> 'error':
<mask> 'type': 'string'
<mask> 'example': ''
<mask> 'description': 'Error text. Set if static=error'
<mask> 'InitialConfigurationBeta':
<mask> 'type': 'object'
<mask> 'description': >
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'default': '' </s> remove 'type': 'string'
'example': 'no'
'description': 'Can be: yes, no, error'
</s> add '$ref': '#/components/schemas/CheckConfigStaticIpInfoStatic' </s> add 'required':
- 'flags'
- 'hardware_address'
- 'name'
- 'mtu' </s> add 'default': '' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'status'
- 'can_autofix'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep keep keep add keep keep keep keep
|
<mask> 'InitialConfiguration':
<mask> 'type': 'object'
<mask> 'description': >
<mask> AdGuard Home initial configuration for the first-install wizard.
<mask> 'properties':
<mask> 'dns':
<mask> '$ref': '#/components/schemas/AddressInfo'
<mask> 'web':
</s> Pull request: beta client squashed
Merge in DNS/adguard-home from beta-client-2 to master
Squashed commit of the following:
commit b2640cc49a6c5484d730b534dcf5a8013d7fa478
Merge: 659def862 aef4659e9
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 19:23:09 2020 +0300
Merge branch 'master' into beta-client-2
commit 659def8626467949c35b7a6a0c99ffafb07b4385
Author: Eugene Burkov <[email protected]>
Date: Tue Dec 29 17:25:14 2020 +0300
all: upgrade github actions node version
commit b4b8cf8dd75672e9155da5d111ac66e8f5ba1535
Author: Vladislav Abdulmyanov <[email protected]>
Date: Tue Dec 29 16:57:14 2020 +0300
all: beta client squashed </s> add 'CheckConfigRequestBeta':
'type': 'object'
'description': 'Configuration to be checked'
'properties':
'dns':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'web':
'$ref': '#/components/schemas/CheckConfigRequestInfoBeta'
'set_static_ip':
'type': 'boolean'
'example': false </s> add 'required':
- 'dns'
- 'web'
- 'static_ip' </s> remove 'properties':
'1.2.3.4':
'items':
'$ref': '#/components/schemas/ClientFindSubEntry'
</s> add 'additionalProperties':
'$ref': '#/components/schemas/ClientFindSubEntry'
'example':
'1.2.3.4': 'test' </s> remove 'format': 'int32'
</s> add 'format': 'uint16' </s> add 'required':
- 'dns_port'
- 'web_port'
- 'interfaces' </s> add 'UpstreamsConfigResponse':
'type': 'object'
'description': 'Upstreams configuration response'
'additionalProperties':
'type': 'string'
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e20ac7ed5de861ea5c945d1775f75312d62b69f
|
openapi/openapi.yaml
|
keep add keep keep keep keep
|
<mask> versionCheckLastTime time.Time
<mask>
<mask> httpsServer HTTPSServer
<mask>
<mask> BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to
<mask> BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server
</s> * move "httpServer" to "config" </s> remove err := httpServer.ListenAndServe()
</s> add err := config.httpServer.ListenAndServe() </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove httpServer = &http.Server{
</s> add config.httpServer = &http.Server{ </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove var httpServer *http.Server
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e309a7b3a5d29323a6e08189ceb5c101fc38035
|
home/config.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
<mask> // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
<mask> if restartHTTP {
<mask> go func() {
<mask> httpServer.Shutdown(context.TODO())
<mask> }()
<mask> }
<mask>
<mask> returnOK(w)
<mask> }
</s> * move "httpServer" to "config" </s> remove err := httpServer.ListenAndServe()
</s> add err := config.httpServer.ListenAndServe() </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove httpServer = &http.Server{
</s> add config.httpServer = &http.Server{ </s> remove var httpServer *http.Server
</s> add </s> add httpServer *http.Server
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e309a7b3a5d29323a6e08189ceb5c101fc38035
|
home/control_install.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> "github.com/NYTimes/gziphandler"
<mask> "github.com/gobuffalo/packr"
<mask> )
<mask>
<mask> var httpServer *http.Server
<mask>
<mask> const (
<mask> // Used in config to indicate that syslog or eventlog (win) should be used for logger output
<mask> configSyslog = "syslog"
<mask> )
<mask>
</s> * move "httpServer" to "config" </s> add httpServer *http.Server </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove err := httpServer.ListenAndServe()
</s> add err := config.httpServer.ListenAndServe() </s> remove httpServer = &http.Server{
</s> add config.httpServer = &http.Server{ </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO())
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e309a7b3a5d29323a6e08189ceb5c101fc38035
|
home/home.go
|
keep keep keep keep replace keep keep replace keep
|
<mask> printHTTPAddresses("http")
<mask>
<mask> // we need to have new instance, because after Shutdown() the Server is not usable
<mask> address := net.JoinHostPort(config.BindHost, strconv.Itoa(config.BindPort))
<mask> httpServer = &http.Server{
<mask> Addr: address,
<mask> }
<mask> err := httpServer.ListenAndServe()
<mask> if err != http.ErrServerClosed {
</s> * move "httpServer" to "config" </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> add httpServer *http.Server </s> remove var httpServer *http.Server
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e309a7b3a5d29323a6e08189ceb5c101fc38035
|
home/home.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> config.httpsServer.shutdown = true
<mask> if config.httpsServer.server != nil {
<mask> config.httpsServer.server.Shutdown(context.TODO())
<mask> }
<mask> httpServer.Shutdown(context.TODO())
<mask> }
<mask>
<mask> // This function is called before application exits
<mask> func cleanupAlways() {
<mask> if len(config.pidFileName) != 0 {
</s> * move "httpServer" to "config" </s> remove httpServer.Shutdown(context.TODO())
</s> add config.httpServer.Shutdown(context.TODO()) </s> remove httpServer = &http.Server{
</s> add config.httpServer = &http.Server{ </s> remove err := httpServer.ListenAndServe()
</s> add err := config.httpServer.ListenAndServe() </s> add httpServer *http.Server </s> remove var httpServer *http.Server
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e309a7b3a5d29323a6e08189ceb5c101fc38035
|
home/home.go
|
keep add keep keep keep keep keep keep
|
<mask> import (
<mask> "bufio"
<mask> "fmt"
<mask> "net"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/netutil"
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove "strings"
</s> add </s> remove "io"
</s> add </s> remove "io"
</s> add </s> add "bufio"
"bytes" </s> remove "io"
</s> add </s> remove "strings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep replace keep replace keep keep keep keep
|
<mask> "fmt"
<mask> "io"
<mask> "net"
<mask> "strings"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos"
<mask> "github.com/AdguardTeam/golibs/errors"
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove "os"
</s> add "io" </s> remove "strings"
</s> add </s> remove "github.com/AdguardTeam/AdGuardHome/internal/aghos"
</s> add </s> remove "io"
</s> add </s> remove "os/exec"
"strings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> "net"
<mask> "strings"
<mask> "sync"
<mask>
<mask> "github.com/AdguardTeam/AdGuardHome/internal/aghos"
<mask> "github.com/AdguardTeam/golibs/errors"
<mask> "github.com/AdguardTeam/golibs/netutil"
<mask> )
<mask>
<mask> // ARPDB: The Network Neighborhood Database
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove "strings"
</s> add </s> add "github.com/AdguardTeam/AdGuardHome/internal/aghos" </s> add "bytes" </s> add "strings" </s> remove "io"
</s> add </s> remove "os/exec"
"strings"
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace replace replace replace keep keep keep replace replace replace keep keep keep
|
<mask> // ARP-related command. lenHint is a hint for the size of the allocated slice
<mask> // of Neighbors.
<mask> type parseNeighsFunc func(sc *bufio.Scanner, lenHint int) (ns []Neighbor)
<mask>
<mask> // runCmdFunc is the function that runs some command and returns its output
<mask> // wrapped to be a io.Reader.
<mask> type runCmdFunc func() (r io.Reader, err error)
<mask>
<mask> // cmdARPDB is the implementation of the ARPDB that uses command line to
<mask> // retrieve data.
<mask> type cmdARPDB struct {
<mask> parse parseNeighsFunc
<mask> runcmd runCmdFunc
<mask> ns *neighs
<mask> }
<mask>
<mask> // type check
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove // last is the last succeeded ARPDB index.
last int
</s> add neighs </s> add // hardwareReportsReg is the regular expression matching the lines of
// networksetup command output lines containing the interface information.
var hardwareReportsReg = regexp.MustCompile("Hardware Port: (.*?)\nDevice: (.*?)\n")
</s> remove // runCmd runs the cmd with it's args and returns the result wrapped to be an
// io.Reader. The error is returned either if the exit code retured by command
// not equals 0 or the execution itself failed.
func runCmd(cmd string, args ...string) (r io.Reader, err error) {
var code int
var out string
code, out, err = aghos.RunCommand(cmd, args...)
if err != nil {
return nil, err
} else if code != 0 {
return nil, fmt.Errorf("unexpected exit code %d", code)
}
return strings.NewReader(out), nil
}
</s> add </s> add //
// TODO(e.burkov): Think of a way to avoid cloning the slice twice. </s> remove // rcArpA runs "arp /a".
func rcArpA() (r io.Reader, err error) {
return runCmd("arp", "/a")
}
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep replace replace keep
|
<mask>
<mask> // runCmd runs the cmd with it's args and returns the result wrapped to be an
<mask> // io.Reader. The error is returned either if the exit code retured by command
<mask> // not equals 0 or the execution itself failed.
<mask> func runCmd(cmd string, args ...string) (r io.Reader, err error) {
<mask> var code int
<mask> var out string
<mask> code, out, err = aghos.RunCommand(cmd, args...)
<mask> if err != nil {
<mask> return nil, err
<mask> } else if code != 0 {
<mask> return nil, fmt.Errorf("unexpected exit code %d", code)
<mask> }
<mask>
<mask> return strings.NewReader(out), nil
<mask> }
<mask>
<mask> // Refresh implements the ARPDB interface for *cmdARPDB.
<mask> func (arp *cmdARPDB) Refresh() (err error) {
<mask> defer func() { err = errors.Annotate(err, "cmd arpdb: %w") }()
<mask>
<mask> var r io.Reader
<mask> r, err = arp.runcmd()
<mask> if err != nil {
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> add } else if code != 0 {
return fmt.Errorf("running command: unexpected exit code %d", code) </s> remove func GatewayIP(ifaceName string) net.IP {
cmd := exec.Command("ip", "route", "show", "dev", ifaceName)
log.Tracef("executing %s %v", cmd.Path, cmd.Args)
d, err := cmd.Output()
if err != nil || cmd.ProcessState.ExitCode() != 0 {
</s> add //
// TODO(e.burkov): Investigate if the gateway address may be fetched in another
// way since not every machine has the software installed.
func GatewayIP(ifaceName string) (ip net.IP) {
code, out, err := aghosRunCommand("ip", "route", "show", "dev", ifaceName)
if err != nil {
log.Debug("%s", err)
return nil
} else if code != 0 {
log.Debug("fetching gateway ip: unexpected exit code: %d", code)
</s> remove }
if code != 0 {
</s> add } else if code != 0 { </s> remove }
if code != 0 {
</s> add } else if code != 0 { </s> remove code, _, err := aghos.RunCommand("networksetup", args...)
</s> add code, _, err := aghosRunCommand("networksetup", args...)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep add keep keep keep keep keep keep
|
<mask>
<mask> code, out, err := aghosRunCommand(arp.cmd, arp.args...)
<mask> if err != nil {
<mask> return fmt.Errorf("running command: %w", err)
<mask> }
<mask>
<mask> sc := bufio.NewScanner(bytes.NewReader(out))
<mask> ns := arp.parse(sc, arp.ns.len())
<mask> if err = sc.Err(); err != nil {
<mask> // TODO(e.burkov): This error seems unreachable. Investigate.
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> add // TODO(e.burkov): This error seems unreachable. Investigate. </s> remove sc := bufio.NewScanner(r)
</s> add sc := bufio.NewScanner(bytes.NewReader(out)) </s> remove var r io.Reader
r, err = arp.runcmd()
</s> add code, out, err := aghosRunCommand(arp.cmd, arp.args...) </s> remove func getNetworkSetupHardwareReports() map[string]string {
_, out, err := aghos.RunCommand("networksetup", "-listallhardwareports")
if err != nil {
return nil
}
re, err := regexp.Compile("Hardware Port: (.*?)\nDevice: (.*?)\n")
</s> add func getNetworkSetupHardwareReports() (reports map[string]string) {
_, out, err := aghosRunCommand("networksetup", "-listallhardwareports") </s> remove func GatewayIP(ifaceName string) net.IP {
cmd := exec.Command("ip", "route", "show", "dev", ifaceName)
log.Tracef("executing %s %v", cmd.Path, cmd.Args)
d, err := cmd.Output()
if err != nil || cmd.ProcessState.ExitCode() != 0 {
</s> add //
// TODO(e.burkov): Investigate if the gateway address may be fetched in another
// way since not every machine has the software installed.
func GatewayIP(ifaceName string) (ip net.IP) {
code, out, err := aghosRunCommand("ip", "route", "show", "dev", ifaceName)
if err != nil {
log.Debug("%s", err)
return nil
} else if code != 0 {
log.Debug("fetching gateway ip: unexpected exit code: %d", code)
</s> remove args := make([]string, 0)
args = append(args, "-setdnsservers", portInfo.name)
args = append(args, dnsAddrs...)
</s> add args := append([]string{"-setdnsservers", portInfo.name}, dnsAddrs...)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if err != nil {
<mask> return fmt.Errorf("running command: %w", err)
<mask> }
<mask>
<mask> sc := bufio.NewScanner(r)
<mask> ns := arp.parse(sc, arp.ns.len())
<mask> if err = sc.Err(); err != nil {
<mask> return fmt.Errorf("scanning the output: %w", err)
<mask> }
<mask>
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> add // TODO(e.burkov): This error seems unreachable. Investigate. </s> add } else if code != 0 {
return fmt.Errorf("running command: unexpected exit code %d", code) </s> remove var r io.Reader
r, err = arp.runcmd()
</s> add code, out, err := aghosRunCommand(arp.cmd, arp.args...) </s> remove err = maybe.WriteFile("/etc/dhcpcd.conf", body, 0o644)
</s> add err = maybe.WriteFile(filename, body, 0o644) </s> remove var netInterfaces []*NetInterface
</s> add </s> remove return nil, err
}
re := regexp.MustCompile("nameserver ([a-zA-Z0-9.:]+)")
matches := re.FindAllStringSubmatch(string(body), -1)
if len(matches) == 0 {
return nil, errors.Error("found no DNS servers in /etc/resolv.conf")
}
addrs := make([]string, 0)
for i := range matches {
addrs = append(addrs, matches[i][1])
</s> add return nil, fmt.Errorf("parsing etc/resolv.conf file: %w", err)
} else if len(addrs) == 0 {
return nil, fmt.Errorf("found no dns servers in %s", filename)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep add keep keep keep keep keep keep
|
<mask> ns := arp.parse(sc, arp.ns.len())
<mask> if err = sc.Err(); err != nil {
<mask> return fmt.Errorf("scanning the output: %w", err)
<mask> }
<mask>
<mask> arp.ns.reset(ns)
<mask>
<mask> return nil
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove sc := bufio.NewScanner(r)
</s> add sc := bufio.NewScanner(bytes.NewReader(out)) </s> add } else if code != 0 {
return fmt.Errorf("running command: unexpected exit code %d", code) </s> remove err = maybe.WriteFile("/etc/dhcpcd.conf", body, 0o644)
</s> add err = maybe.WriteFile(filename, body, 0o644) </s> remove var r io.Reader
r, err = arp.runcmd()
</s> add code, out, err := aghosRunCommand(arp.cmd, arp.args...) </s> remove return nil, err
}
re := regexp.MustCompile("nameserver ([a-zA-Z0-9.:]+)")
matches := re.FindAllStringSubmatch(string(body), -1)
if len(matches) == 0 {
return nil, errors.Error("found no DNS servers in /etc/resolv.conf")
}
addrs := make([]string, 0)
for i := range matches {
addrs = append(addrs, matches[i][1])
</s> add return nil, fmt.Errorf("parsing etc/resolv.conf file: %w", err)
} else if len(addrs) == 0 {
return nil, fmt.Errorf("found no dns servers in %s", filename) </s> remove var netInterfaces []*NetInterface
</s> add
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // consequently switches between those.
<mask> type arpdbs struct {
<mask> // arps is the set of ARPDB implementations to range through.
<mask> arps []ARPDB
<mask> // last is the last succeeded ARPDB index.
<mask> last int
<mask> }
<mask>
<mask> // newARPDBs returns a properly initialized *arpdbs. It begins refreshing from
<mask> // the first of arps.
<mask> func newARPDBs(arps ...ARPDB) (arp *arpdbs) {
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove last: 0,
</s> add neighs: neighs{
mu: &sync.RWMutex{},
ns: make([]Neighbor, 0),
}, </s> remove l := len(arp.arps)
// Start from the last succeeded implementation.
for i := 0; i < l; i++ {
cur := (arp.last + i) % l
err = arp.arps[cur].Refresh()
if err == nil {
// The succeeded implementation found so update the last succeeded
// index.
arp.last = cur
return nil
</s> add for _, a := range arp.arps {
err = a.Refresh()
if err != nil {
errs = append(errs, err)
continue </s> add //
// TODO(e.burkov): Think of a way to avoid cloning the slice twice. </s> remove // runCmdFunc is the function that runs some command and returns its output
// wrapped to be a io.Reader.
type runCmdFunc func() (r io.Reader, err error)
</s> add </s> remove parse parseNeighsFunc
runcmd runCmdFunc
ns *neighs
</s> add parse parseNeighsFunc
ns *neighs
cmd string
args []string </s> remove assert.Equal(t, 2, succRefrCount)
</s> add assert.Equal(t, 1, succRefrCount)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // the first of arps.
<mask> func newARPDBs(arps ...ARPDB) (arp *arpdbs) {
<mask> return &arpdbs{
<mask> arps: arps,
<mask> last: 0,
<mask> }
<mask> }
<mask>
<mask> // type check
<mask> var _ ARPDB = (*arpdbs)(nil)
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove // last is the last succeeded ARPDB index.
last int
</s> add neighs </s> remove parse parseNeighsFunc
runcmd runCmdFunc
ns *neighs
</s> add parse parseNeighsFunc
ns *neighs
cmd string
args []string </s> remove // runCmd runs the cmd with it's args and returns the result wrapped to be an
// io.Reader. The error is returned either if the exit code retured by command
// not equals 0 or the execution itself failed.
func runCmd(cmd string, args ...string) (r io.Reader, err error) {
var code int
var out string
code, out, err = aghos.RunCommand(cmd, args...)
if err != nil {
return nil, err
} else if code != 0 {
return nil, fmt.Errorf("unexpected exit code %d", code)
}
return strings.NewReader(out), nil
}
</s> add </s> add //
// TODO(e.burkov): Think of a way to avoid cloning the slice twice. </s> remove if l := len(arp.arps); l > 0 && arp.last < l {
return arp.arps[arp.last].Neighbors()
}
return nil
</s> add return arp.clone() </s> remove require.NotPanics(t, func() {
a = NewARPDB()
})
</s> add require.NotPanics(t, func() { a = NewARPDB() })
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep keep keep keep replace keep keep keep keep
|
<mask>
<mask> // Refresh implements the ARPDB interface for *arpdbs.
<mask> func (arp *arpdbs) Refresh() (err error) {
<mask> var errs []error
<mask> l := len(arp.arps)
<mask> // Start from the last succeeded implementation.
<mask> for i := 0; i < l; i++ {
<mask> cur := (arp.last + i) % l
<mask> err = arp.arps[cur].Refresh()
<mask> if err == nil {
<mask> // The succeeded implementation found so update the last succeeded
<mask> // index.
<mask> arp.last = cur
<mask>
<mask> return nil
<mask> }
<mask>
<mask> errs = append(errs, err)
<mask> }
<mask>
<mask> return nil
<mask> }
<mask>
<mask> errs = append(errs, err)
<mask> }
<mask>
<mask> if len(errs) > 0 {
<mask> err = errors.List("each arpdb failed", errs...)
</s> Pull request: 2846 cover aghnet vol.3
Merge in DNS/adguard-home from 2846-cover-aghnet-vol.3 to master
Updates #2846.
Squashed commit of the following:
commit cb22987c43c17bbc8d098e65639cc84e2284bc7b
Merge: cf995e9d f31ffcc5
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 30 15:01:10 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit cf995e9dce635f16e10406a61e2ab12f06407f1f
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:29:50 2022 +0300
aghnet: imp tests
commit bc225fe8800633b29216840bc7d5b82d7c2d2bfb
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 18:03:06 2022 +0300
aghnet: imp tests
commit a82eb6045495b94a2e81ced9a3ef5bfe65788e56
Merge: f8081249 0d562a7b
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:39:13 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit f80812490c49f69655d409c6f015b069affa2f19
Merge: edccaa79 3603b1fc
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 17:29:20 2022 +0300
Merge branch 'master' into 2846-cover-aghnet-vol.3
commit edccaa79fca061ffeea1985c293eed123b16a09c
Author: Eugene Burkov <[email protected]>
Date: Mon Mar 28 13:53:40 2022 +0300
aghnet: imp tests
commit 7c5028c92f0a6680516bda67c73e794182c9b825
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 18:01:28 2022 +0300
aghnet: imp code & docs
commit 7897c6b13e9be340ae8a71947a8a0bab82c682eb
Author: Eugene Burkov <[email protected]>
Date: Fri Mar 25 17:11:46 2022 +0300
aghnet: imp coverage
commit 1eef110af3bf721a0275c695bf27c31815abff04
Author: Eugene Burkov <[email protected]>
Date: Wed Mar 23 21:10:29 2022 +0300
all: return byte slice </s> remove if l := len(arp.arps); l > 0 && arp.last < l {
return arp.arps[arp.last].Neighbors()
}
return nil
</s> add return arp.clone() </s> remove // last is the last succeeded ARPDB index.
last int
</s> add neighs </s> remove var r io.Reader
r, err = arp.runcmd()
</s> add code, out, err := aghosRunCommand(arp.cmd, arp.args...) </s> remove // runCmd runs the cmd with it's args and returns the result wrapped to be an
// io.Reader. The error is returned either if the exit code retured by command
// not equals 0 or the execution itself failed.
func runCmd(cmd string, args ...string) (r io.Reader, err error) {
var code int
var out string
code, out, err = aghos.RunCommand(cmd, args...)
if err != nil {
return nil, err
} else if code != 0 {
return nil, fmt.Errorf("unexpected exit code %d", code)
}
return strings.NewReader(out), nil
}
</s> add </s> remove assert.Equal(t, 2, succRefrCount)
</s> add assert.Equal(t, 1, succRefrCount)
|
https://github.com/AdguardTeam/AdGuardHome/commit/5e71f5df6a8cd12a65fecd2f1e28b2aa69609193
|
internal/aghnet/arpdb.go
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.