mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-25 15:10:48 +01:00
Merge remote-tracking branch 'tor-github/pr/1515'
This commit is contained in:
commit
45698e89ed
26 changed files with 43 additions and 16 deletions
3
changes/ticket32410
Normal file
3
changes/ticket32410
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
o Minor features (relay):
|
||||||
|
- When the relay module is disabled, make "DirCache 0" the default.
|
||||||
|
Closes ticket 32410.
|
|
@ -363,7 +363,13 @@ static const config_var_t option_vars_[] = {
|
||||||
V(CircuitStreamTimeout, INTERVAL, "0"),
|
V(CircuitStreamTimeout, INTERVAL, "0"),
|
||||||
V(CircuitPriorityHalflife, DOUBLE, "-1.0"), /*negative:'Use default'*/
|
V(CircuitPriorityHalflife, DOUBLE, "-1.0"), /*negative:'Use default'*/
|
||||||
V(ClientDNSRejectInternalAddresses, BOOL,"1"),
|
V(ClientDNSRejectInternalAddresses, BOOL,"1"),
|
||||||
|
#if defined(HAVE_MODULE_RELAY) || defined(TOR_UNIT_TESTS)
|
||||||
|
/* The unit tests expect the ClientOnly default to be 0. */
|
||||||
V(ClientOnly, BOOL, "0"),
|
V(ClientOnly, BOOL, "0"),
|
||||||
|
#else
|
||||||
|
/* We must be a Client if the relay module is disabled. */
|
||||||
|
V(ClientOnly, BOOL, "1"),
|
||||||
|
#endif /* defined(HAVE_MODULE_RELAY) || defined(TOR_UNIT_TESTS) */
|
||||||
V(ClientPreferIPv6ORPort, AUTOBOOL, "auto"),
|
V(ClientPreferIPv6ORPort, AUTOBOOL, "auto"),
|
||||||
V(ClientPreferIPv6DirPort, AUTOBOOL, "auto"),
|
V(ClientPreferIPv6DirPort, AUTOBOOL, "auto"),
|
||||||
V(ClientAutoIPv6ORPort, BOOL, "0"),
|
V(ClientAutoIPv6ORPort, BOOL, "0"),
|
||||||
|
@ -400,7 +406,13 @@ static const config_var_t option_vars_[] = {
|
||||||
V(DirPortFrontPage, FILENAME, NULL),
|
V(DirPortFrontPage, FILENAME, NULL),
|
||||||
VAR("DirReqStatistics", BOOL, DirReqStatistics_option, "1"),
|
VAR("DirReqStatistics", BOOL, DirReqStatistics_option, "1"),
|
||||||
VAR("DirAuthority", LINELIST, DirAuthorities, NULL),
|
VAR("DirAuthority", LINELIST, DirAuthorities, NULL),
|
||||||
|
#if defined(HAVE_MODULE_RELAY) || defined(TOR_UNIT_TESTS)
|
||||||
|
/* The unit tests expect the DirCache default to be 1. */
|
||||||
V(DirCache, BOOL, "1"),
|
V(DirCache, BOOL, "1"),
|
||||||
|
#else
|
||||||
|
/* We can't be a DirCache if the relay module is disabled. */
|
||||||
|
V(DirCache, BOOL, "0"),
|
||||||
|
#endif /* defined(HAVE_MODULE_RELAY) || defined(TOR_UNIT_TESTS) */
|
||||||
/* A DirAuthorityFallbackRate of 0.1 means that 0.5% of clients try an
|
/* A DirAuthorityFallbackRate of 0.1 means that 0.5% of clients try an
|
||||||
* authority when all fallbacks are up, and 2% try an authority when 25% of
|
* authority when all fallbacks are up, and 2% try an authority when 25% of
|
||||||
* fallbacks are down. (We rebuild the list when 25% of fallbacks are down).
|
* fallbacks are down. (We rebuild the list when 25% of fallbacks are down).
|
||||||
|
|
|
@ -573,7 +573,9 @@ struct or_options_t {
|
||||||
|
|
||||||
int DirCache; /**< Cache all directory documents and accept requests via
|
int DirCache; /**< Cache all directory documents and accept requests via
|
||||||
* tunnelled dir conns from clients. If 1, enabled (default);
|
* tunnelled dir conns from clients. If 1, enabled (default);
|
||||||
* If 0, disabled. */
|
* If 0, disabled. Use dir_server_mode() rather than
|
||||||
|
* referencing this option directly. (Except for routermode
|
||||||
|
* and relay_config, which do direct checks.) */
|
||||||
|
|
||||||
char *VirtualAddrNetworkIPv4; /**< Address and mask to hand out for virtual
|
char *VirtualAddrNetworkIPv4; /**< Address and mask to hand out for virtual
|
||||||
* MAPADDRESS requests for IPv4 addresses */
|
* MAPADDRESS requests for IPv4 addresses */
|
||||||
|
|
|
@ -122,9 +122,6 @@ options_validate_relay_mode(const or_options_t *old_options,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 31851 / 29211: Set this option the correct way */
|
|
||||||
options->ClientOnly = 1;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -0,0 +1 @@
|
||||||
|
Nickname TooManyCharactersInThisNickname
|
|
@ -1,2 +1,4 @@
|
||||||
# This nickname is too long; we won't accept it.
|
# This nickname is too long; we won't accept it.
|
||||||
|
# (Unless the relay module is disabled, because Nickname is a
|
||||||
|
# relay-only option. We'll ignore all relay-only options in #32395.)
|
||||||
Nickname TooManyCharactersInThisNickname
|
Nickname TooManyCharactersInThisNickname
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -0,0 +1 @@
|
||||||
|
Nickname has a space
|
|
@ -1,2 +1,4 @@
|
||||||
# this nickname has spaces in it and won't work.
|
# this nickname has spaces in it and won't work.
|
||||||
|
# (Unless the relay module is disabled, because Nickname is a
|
||||||
|
# relay-only option. We'll ignore all relay-only options in #32395.)
|
||||||
Nickname has a space
|
Nickname has a space
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -0,0 +1 @@
|
||||||
|
ContactInfo "\304\353\304\353\304\353@example.com"
|
|
@ -1 +1,5 @@
|
||||||
|
# We only accept ContactInfo in UTF-8 (or 7-bit ASCII)
|
||||||
|
# (Unless the relay module is disabled, because ContactInfo is a
|
||||||
|
# relay-only option. We'll ignore all relay-only options in #32395.
|
||||||
|
# But at the moment, tor canonicalises and quotes the string.)
|
||||||
ContactInfo ÄëÄëÄë@example.com
|
ContactInfo ÄëÄëÄë@example.com
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
8
src/test/conf_examples/pt_02/expected_no_dirauth_relay
Normal file
8
src/test/conf_examples/pt_02/expected_no_dirauth_relay
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
ExtORPort illegal_hostname_chars$()^*%(%
|
||||||
|
ServerTransportListenAddr bad
|
||||||
|
ServerTransportListenAddr bad2 illegal_hostname_chars$()^*%(%
|
||||||
|
ServerTransportOptions bad
|
||||||
|
ServerTransportOptions bad2 not_kv
|
||||||
|
ServerTransportPlugin bad
|
||||||
|
ServerTransportPlugin bad2 exec
|
||||||
|
ServerTransportPlugin bad3 exec /
|
|
@ -1,6 +1,8 @@
|
||||||
# Relay PT tests
|
# Relay PT tests
|
||||||
# Options from relay/transport_config.c
|
# Options from relay/transport_config.c
|
||||||
# Bad options are also ignored
|
# Bad options are also ignored
|
||||||
|
# (Unless the relay module is disabled, because they are relay-only
|
||||||
|
# options. We'll ignore all relay-only options in #32395.)
|
||||||
ExtORPort illegal_hostname_chars$()^*%(%#%)#(%*
|
ExtORPort illegal_hostname_chars$()^*%(%#%)#(%*
|
||||||
ServerTransportPlugin bad
|
ServerTransportPlugin bad
|
||||||
ServerTransportPlugin bad2 exec
|
ServerTransportPlugin bad2 exec
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
2
src/test/conf_examples/pt_08/expected_no_dirauth_relay
Normal file
2
src/test/conf_examples/pt_08/expected_no_dirauth_relay
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
ExtORPort unix:/
|
||||||
|
ServerTransportPlugin bad3 exec /
|
|
@ -1,5 +1,7 @@
|
||||||
# Relay PT tests
|
# Relay PT tests
|
||||||
# Options from relay/transport_config.c
|
# Options from relay/transport_config.c
|
||||||
# Try an invalid config with a unix socket for ExtORPort
|
# Try an invalid config with a unix socket for ExtORPort
|
||||||
|
# (Unless the relay module is disabled, because they are relay-only
|
||||||
|
# options. We'll ignore all relay-only options in #32395.)
|
||||||
ExtORPort unix:/
|
ExtORPort unix:/
|
||||||
ServerTransportPlugin bad3 exec /
|
ServerTransportPlugin bad3 exec /
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
This tor was built with relay mode disabled.
|
|
Loading…
Add table
Reference in a new issue