feat: tor keep awake
This commit is contained in:
5 files changed
+33
No files matched your search
@@ -56,6 +56,17 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
keepAwake = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Never let Tor go dormant. By default it does after a day without use, and from then on
|
||||
only rebuilds its circuits when the next connection comes: the first .onion after a quiet
|
||||
spell may wait long enough to fail. Turn on where clients expect .onion at once, as on a
|
||||
server whose inbounds route it. A dormant Tor also starts dormant again; this wakes it.
|
||||
'';
|
||||
};
|
||||
|
||||
upstream = mkOption {
|
||||
type = types.enum [
|
||||
"direct"
|
||||
|
||||
@@ -89,6 +89,10 @@ let
|
||||
"CookieAuthentication 0"
|
||||
]
|
||||
++ lib.optional t.clientOnly "ClientOnly 1"
|
||||
++ lib.optionals t.keepAwake [
|
||||
"DormantTimeoutEnabled 0"
|
||||
"DormantCanceledByStartup 1"
|
||||
]
|
||||
++ (if t.asOutbound then [ "SocksPort 127.0.0.1:${toString t.socksPort}" ] else [ "SocksPort 0" ])
|
||||
++ lib.optionals bridgesEnabled [
|
||||
"UseBridges 1"
|
||||
|
||||
Reference in new issue
Block a user