Merge: * set BlockingMode: "null_ip" by default; minor improvements
Squashed commit of the following: commit 653544b98dc4d1b9a74e1509d0e6104b71bcdcb3 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 17:34:41 2019 +0300 * DNS reconfigure: protect against delayed socket fd close commit 9e650f37dee7f771bf1d9d714c35f0a81788aa16 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 15:28:33 2019 +0300 - fix race on startup commit 878fdb8fc4ebbc6fab683a65f5e4298e64c2073e Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 15:11:21 2019 +0300 * travis: don't run tests commit 1c4ab60684ee22d55e6d2a3350c0f24d9844255c Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 14:56:28 2019 +0300 * travis: 'release.sh' and then run tests commit e1f644b8d9a1f3b46990cdfb1b75fd81b3a49d33 Author: Simon Zolin <s.zolin@adguard.com> Date: Wed Dec 11 14:52:59 2019 +0300 * set BlockingMode: "null_ip" by default
This commit is contained in:
parent
daf17f16f2
commit
c9ccc53282
|
@ -42,8 +42,6 @@ matrix:
|
||||||
script:
|
script:
|
||||||
- node -v
|
- node -v
|
||||||
- npm -v
|
- npm -v
|
||||||
# Run tests just in case
|
|
||||||
- go test -race -v -bench=. ./...
|
|
||||||
# Prepare releases
|
# Prepare releases
|
||||||
- ./release.sh
|
- ./release.sh
|
||||||
- ls -l dist
|
- ls -l dist
|
||||||
|
|
|
@ -360,10 +360,9 @@ func (s *Server) Reconfigure(config *ServerConfig) error {
|
||||||
return errorx.Decorate(err, "could not reconfigure the server")
|
return errorx.Decorate(err, "could not reconfigure the server")
|
||||||
}
|
}
|
||||||
|
|
||||||
// On some Windows versions the UDP port we've just closed in proxy.Stop() doesn't get actually closed right away.
|
// It seems that net.Listener.Close() doesn't close file descriptors right away.
|
||||||
if runtime.GOOS == "windows" {
|
// We wait for some time and hope that this fd will be closed.
|
||||||
time.Sleep(1 * time.Second)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
|
||||||
|
|
||||||
err = s.Prepare(config)
|
err = s.Prepare(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -158,7 +158,7 @@ var config = configuration{
|
||||||
StatsInterval: 1,
|
StatsInterval: 1,
|
||||||
FilteringConfig: dnsforward.FilteringConfig{
|
FilteringConfig: dnsforward.FilteringConfig{
|
||||||
ProtectionEnabled: true, // whether or not use any of dnsfilter features
|
ProtectionEnabled: true, // whether or not use any of dnsfilter features
|
||||||
BlockingMode: "nxdomain", // mode how to answer filtered requests
|
BlockingMode: "null_ip", // mode how to answer filtered requests
|
||||||
BlockedResponseTTL: 10, // in seconds
|
BlockedResponseTTL: 10, // in seconds
|
||||||
Ratelimit: 20,
|
Ratelimit: 20,
|
||||||
RefuseAny: true,
|
RefuseAny: true,
|
||||||
|
|
|
@ -172,7 +172,7 @@ func run(args options) {
|
||||||
log.Fatalf("%s", err)
|
log.Fatalf("%s", err)
|
||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
err = startDNSServer()
|
err := startDNSServer()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue