Revert "New feature: sleep mode"

This reverts commit e931b234b7.
This commit is contained in:
Frank Denis 2022-04-02 09:33:49 +02:00
parent e931b234b7
commit 5d023d2a7c
3 changed files with 0 additions and 16 deletions

View File

@ -49,7 +49,6 @@ type Config struct {
BlockIPv6 bool `toml:"block_ipv6"`
BlockUnqualified bool `toml:"block_unqualified"`
BlockUndelegated bool `toml:"block_undelegated"`
SleepMode bool `toml:"sleep_mode"`
Cache bool
CacheSize int `toml:"cache_size"`
CacheNegTTL uint32 `toml:"cache_neg_ttl"`
@ -475,8 +474,6 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
proxy.pluginBlockIPv6 = config.BlockIPv6
proxy.pluginBlockUnqualified = config.BlockUnqualified
proxy.pluginBlockUndelegated = config.BlockUndelegated
proxy.sleepMode = config.SleepMode
proxy.cache = config.Cache
proxy.cacheSize = config.CacheSize

View File

@ -55,11 +55,6 @@ max_clients = 250
# user_name = 'nobody'
## Sleep mode: add an incremental delay to queries so that you eventually get some sleep instead of watching videos all night long.
sleep_mode = false
## Require servers (from remote sources) to satisfy specific properties
# Use servers reachable over IPv4

View File

@ -71,7 +71,6 @@ type Proxy struct {
certRefreshDelayAfterFailure time.Duration
timeout time.Duration
certRefreshDelay time.Duration
sleepDelay time.Duration
cacheSize int
logMaxBackups int
logMaxAge int
@ -95,7 +94,6 @@ type Proxy struct {
anonDirectCertFallback bool
pluginBlockUndelegated bool
child bool
sleepMode bool
requiredProps stamps.ServerInformalProperties
ServerNames []string
DisabledServerNames []string
@ -619,12 +617,6 @@ func (proxy *Proxy) processIncomingQuery(
if len(query) < MinDNSPacketSize {
return response
}
if proxy.sleepMode {
time.Sleep(proxy.sleepDelay)
proxy.sleepDelay += 10 * time.Microsecond
}
pluginsState := NewPluginsState(proxy, clientProto, clientAddr, serverProto, start)
serverName := "-"
needsEDNS0Padding := false