mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Add a new config option __DisablePredictedCircuits designed for
use by the controller, when we don't want Tor to build any circuits preemptively. svn:r10054
This commit is contained in:
parent
313ac313be
commit
7fb4365cd3
@ -63,6 +63,9 @@ Changes in version 0.2.0.1-alpha - 2007-??-??
|
|||||||
o Minor features (other):
|
o Minor features (other):
|
||||||
- Correctly report Windows 95 OSR2 and Windows 98 SE.
|
- Correctly report Windows 95 OSR2 and Windows 98 SE.
|
||||||
- More unit tests.
|
- More unit tests.
|
||||||
|
- Add a new config option __DisablePredictedCircuits designed for
|
||||||
|
use by the controller, when we don't want Tor to build any circuits
|
||||||
|
preemptively.
|
||||||
|
|
||||||
o Removed features:
|
o Removed features:
|
||||||
- Removed support for the old binary "version 0" controller protocol.
|
- Removed support for the old binary "version 0" controller protocol.
|
||||||
|
@ -448,6 +448,7 @@ void
|
|||||||
circuit_build_needed_circs(time_t now)
|
circuit_build_needed_circs(time_t now)
|
||||||
{
|
{
|
||||||
static long time_to_new_circuit = 0;
|
static long time_to_new_circuit = 0;
|
||||||
|
or_options_t *options = get_options();
|
||||||
|
|
||||||
/* launch a new circ for any pending streams that need one */
|
/* launch a new circ for any pending streams that need one */
|
||||||
connection_ap_attach_pending();
|
connection_ap_attach_pending();
|
||||||
@ -457,7 +458,7 @@ circuit_build_needed_circs(time_t now)
|
|||||||
|
|
||||||
if (time_to_new_circuit < now) {
|
if (time_to_new_circuit < now) {
|
||||||
circuit_reset_failure_count(1);
|
circuit_reset_failure_count(1);
|
||||||
time_to_new_circuit = now + get_options()->NewCircuitPeriod;
|
time_to_new_circuit = now + options->NewCircuitPeriod;
|
||||||
if (proxy_mode(get_options()))
|
if (proxy_mode(get_options()))
|
||||||
addressmap_clean(now);
|
addressmap_clean(now);
|
||||||
circuit_expire_old_circuits(now);
|
circuit_expire_old_circuits(now);
|
||||||
@ -472,6 +473,7 @@ circuit_build_needed_circs(time_t now)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
if (!options->DisablePredictedCircuits)
|
||||||
circuit_predict_and_launch_new();
|
circuit_predict_and_launch_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,6 @@ static config_var_t _option_vars[] = {
|
|||||||
VAR("AccountingMax", MEMUNIT, AccountingMax, "0 bytes"),
|
VAR("AccountingMax", MEMUNIT, AccountingMax, "0 bytes"),
|
||||||
VAR("AccountingStart", STRING, AccountingStart, NULL),
|
VAR("AccountingStart", STRING, AccountingStart, NULL),
|
||||||
VAR("Address", STRING, Address, NULL),
|
VAR("Address", STRING, Address, NULL),
|
||||||
VAR("__AllDirActionsPrivate",BOOL, AllDirActionsPrivate, "0"),
|
|
||||||
VAR("AllowInvalidNodes", CSV, AllowInvalidNodes,
|
VAR("AllowInvalidNodes", CSV, AllowInvalidNodes,
|
||||||
"middle,rendezvous"),
|
"middle,rendezvous"),
|
||||||
VAR("AllowNonRFC953Hostnames", BOOL, AllowNonRFC953Hostnames, "0"),
|
VAR("AllowNonRFC953Hostnames", BOOL, AllowNonRFC953Hostnames, "0"),
|
||||||
@ -258,6 +257,8 @@ static config_var_t _option_vars[] = {
|
|||||||
VAR("V1AuthoritativeDirectory",BOOL, V1AuthoritativeDir, "0"),
|
VAR("V1AuthoritativeDirectory",BOOL, V1AuthoritativeDir, "0"),
|
||||||
VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
|
VAR("VersioningAuthoritativeDirectory",BOOL,VersioningAuthoritativeDir, "0"),
|
||||||
VAR("VirtualAddrNetwork", STRING, VirtualAddrNetwork, "127.192.0.0/10"),
|
VAR("VirtualAddrNetwork", STRING, VirtualAddrNetwork, "127.192.0.0/10"),
|
||||||
|
VAR("__AllDirActionsPrivate",BOOL, AllDirActionsPrivate, "0"),
|
||||||
|
VAR("__DisablePredictedCircuits",BOOL,DisablePredictedCircuits,"0"),
|
||||||
VAR("__LeaveStreamsUnattached", BOOL,LeaveStreamsUnattached, "0"),
|
VAR("__LeaveStreamsUnattached", BOOL,LeaveStreamsUnattached, "0"),
|
||||||
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
{ NULL, CONFIG_TYPE_OBSOLETE, 0, NULL }
|
||||||
};
|
};
|
||||||
|
@ -1820,6 +1820,9 @@ typedef struct {
|
|||||||
int LeaveStreamsUnattached; /**< Boolean: Does Tor attach new streams to
|
int LeaveStreamsUnattached; /**< Boolean: Does Tor attach new streams to
|
||||||
* circuits itself (0), or does it expect a controller
|
* circuits itself (0), or does it expect a controller
|
||||||
* to cope? (1) */
|
* to cope? (1) */
|
||||||
|
int DisablePredictedCircuits; /**< Boolean: does Tor preemptively
|
||||||
|
* make circuits in the background (0),
|
||||||
|
* or not (1)? */
|
||||||
int ShutdownWaitLength; /**< When we get a SIGINT and we're a server, how
|
int ShutdownWaitLength; /**< When we get a SIGINT and we're a server, how
|
||||||
* long do we wait before exiting? */
|
* long do we wait before exiting? */
|
||||||
int SafeLogging; /**< Boolean: are we allowed to log sensitive strings
|
int SafeLogging; /**< Boolean: are we allowed to log sensitive strings
|
||||||
|
Loading…
Reference in New Issue
Block a user