Skip to content

Commit 5d023d2

Browse files
committed
Revert "New feature: sleep mode"
This reverts commit e931b23.
1 parent e931b23 commit 5d023d2

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

dnscrypt-proxy/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ type Config struct {
4949
BlockIPv6 bool `toml:"block_ipv6"`
5050
BlockUnqualified bool `toml:"block_unqualified"`
5151
BlockUndelegated bool `toml:"block_undelegated"`
52-
SleepMode bool `toml:"sleep_mode"`
5352
Cache bool
5453
CacheSize int `toml:"cache_size"`
5554
CacheNegTTL uint32 `toml:"cache_neg_ttl"`
@@ -475,8 +474,6 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
475474
proxy.pluginBlockIPv6 = config.BlockIPv6
476475
proxy.pluginBlockUnqualified = config.BlockUnqualified
477476
proxy.pluginBlockUndelegated = config.BlockUndelegated
478-
proxy.sleepMode = config.SleepMode
479-
480477
proxy.cache = config.Cache
481478
proxy.cacheSize = config.CacheSize
482479

dnscrypt-proxy/example-dnscrypt-proxy.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ max_clients = 250
5555
# user_name = 'nobody'
5656

5757

58-
## Sleep mode: add an incremental delay to queries so that you eventually get some sleep instead of watching videos all night long.
59-
60-
sleep_mode = false
61-
62-
6358
## Require servers (from remote sources) to satisfy specific properties
6459

6560
# Use servers reachable over IPv4

dnscrypt-proxy/proxy.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ type Proxy struct {
7171
certRefreshDelayAfterFailure time.Duration
7272
timeout time.Duration
7373
certRefreshDelay time.Duration
74-
sleepDelay time.Duration
7574
cacheSize int
7675
logMaxBackups int
7776
logMaxAge int
@@ -95,7 +94,6 @@ type Proxy struct {
9594
anonDirectCertFallback bool
9695
pluginBlockUndelegated bool
9796
child bool
98-
sleepMode bool
9997
requiredProps stamps.ServerInformalProperties
10098
ServerNames []string
10199
DisabledServerNames []string
@@ -619,12 +617,6 @@ func (proxy *Proxy) processIncomingQuery(
619617
if len(query) < MinDNSPacketSize {
620618
return response
621619
}
622-
623-
if proxy.sleepMode {
624-
time.Sleep(proxy.sleepDelay)
625-
proxy.sleepDelay += 10 * time.Microsecond
626-
}
627-
628620
pluginsState := NewPluginsState(proxy, clientProto, clientAddr, serverProto, start)
629621
serverName := "-"
630622
needsEDNS0Padding := false

0 commit comments

Comments
 (0)