Loading changes/ticket40228 0 → 100644 +4 −0 Original line number Diff line number Diff line o Minor features (dormant mode): - Add a new 'DormantTimeoutEnabled' option to allow coarse-grained control over whether the client ever becomes dormant from inactivity. Most people won't need this. Closes ticket 40228. doc/man/tor.1.txt +6 −0 Original line number Diff line number Diff line Loading @@ -1888,6 +1888,12 @@ The following options control when Tor enters and leaves dormant mode: counts as client activity for the purpose of DormantClientTimeout. If false, then only network activity counts. (Default: 1) [[DormantTimeoutEnabled]] **DormantTimeoutEnabled** **0**|**1**:: If false, then no amount of time without activity is sufficient to make Tor go dormant. Setting this option to zero is only recommended for special-purpose applications that need to use the Tor binary for something other than sending or receiving Tor traffic. (Default: 1) == NODE SELECTION OPTIONS // These options are in alphabetical order, with exceptions as noted. Loading src/app/config/config.c +3 −2 Original line number Diff line number Diff line Loading @@ -425,6 +425,7 @@ static const config_var_t option_vars_[] = { VPORT(DNSPort), OBSOLETE("DNSListenAddress"), V(DormantClientTimeout, INTERVAL, "24 hours"), V(DormantTimeoutEnabled, BOOL, "1"), V(DormantTimeoutDisabledByIdleStreams, BOOL, "1"), V(DormantOnFirstStartup, BOOL, "0"), V(DormantCanceledByStartup, BOOL, "0"), Loading src/app/config/or_options_st.h +7 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,13 @@ struct or_options_t { **/ int DormantClientTimeout; /** * Boolean: If enabled, then we consider the timeout when deciding whether * to be dormant. If not enabled, then only the SIGNAL ACTIVE/DORMANT * controls can change our status. **/ int DormantTimeoutEnabled; /** Boolean: true if having an idle stream is sufficient to prevent a client * from becoming dormant. **/ Loading src/core/mainloop/mainloop.c +6 −0 Original line number Diff line number Diff line Loading @@ -1823,6 +1823,12 @@ check_network_participation_callback(time_t now, const or_options_t *options) goto found_activity; } /* If we aren't allowed to become dormant, then participation doesn't matter */ if (! options->DormantTimeoutEnabled) { goto found_activity; } /* If we're running an onion service, we can't become dormant. */ /* XXXX this would be nice to change, so that we can be dormant with a * service. */ Loading Loading
changes/ticket40228 0 → 100644 +4 −0 Original line number Diff line number Diff line o Minor features (dormant mode): - Add a new 'DormantTimeoutEnabled' option to allow coarse-grained control over whether the client ever becomes dormant from inactivity. Most people won't need this. Closes ticket 40228.
doc/man/tor.1.txt +6 −0 Original line number Diff line number Diff line Loading @@ -1888,6 +1888,12 @@ The following options control when Tor enters and leaves dormant mode: counts as client activity for the purpose of DormantClientTimeout. If false, then only network activity counts. (Default: 1) [[DormantTimeoutEnabled]] **DormantTimeoutEnabled** **0**|**1**:: If false, then no amount of time without activity is sufficient to make Tor go dormant. Setting this option to zero is only recommended for special-purpose applications that need to use the Tor binary for something other than sending or receiving Tor traffic. (Default: 1) == NODE SELECTION OPTIONS // These options are in alphabetical order, with exceptions as noted. Loading
src/app/config/config.c +3 −2 Original line number Diff line number Diff line Loading @@ -425,6 +425,7 @@ static const config_var_t option_vars_[] = { VPORT(DNSPort), OBSOLETE("DNSListenAddress"), V(DormantClientTimeout, INTERVAL, "24 hours"), V(DormantTimeoutEnabled, BOOL, "1"), V(DormantTimeoutDisabledByIdleStreams, BOOL, "1"), V(DormantOnFirstStartup, BOOL, "0"), V(DormantCanceledByStartup, BOOL, "0"), Loading
src/app/config/or_options_st.h +7 −0 Original line number Diff line number Diff line Loading @@ -1065,6 +1065,13 @@ struct or_options_t { **/ int DormantClientTimeout; /** * Boolean: If enabled, then we consider the timeout when deciding whether * to be dormant. If not enabled, then only the SIGNAL ACTIVE/DORMANT * controls can change our status. **/ int DormantTimeoutEnabled; /** Boolean: true if having an idle stream is sufficient to prevent a client * from becoming dormant. **/ Loading
src/core/mainloop/mainloop.c +6 −0 Original line number Diff line number Diff line Loading @@ -1823,6 +1823,12 @@ check_network_participation_callback(time_t now, const or_options_t *options) goto found_activity; } /* If we aren't allowed to become dormant, then participation doesn't matter */ if (! options->DormantTimeoutEnabled) { goto found_activity; } /* If we're running an onion service, we can't become dormant. */ /* XXXX this would be nice to change, so that we can be dormant with a * service. */ Loading