mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/config.c src/or/or.h
This commit is contained in:
commit
a046966baf
7
changes/bug2355_revert
Normal file
7
changes/bug2355_revert
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
o Minor bugfixes:
|
||||||
|
- Revert the UseBridges option to its behavior before 0.2.2.28-beta.
|
||||||
|
When we changed the default behavior to "use bridges if any are
|
||||||
|
listed in the torrc", we broke a number of users who had bridges
|
||||||
|
in their torrc files but who didn't actually want to use them.
|
||||||
|
Partial resolution for bug 3354.
|
||||||
|
|
@ -726,14 +726,10 @@ The following options are useful only for clients (that is, if
|
|||||||
from the configured bridge authorities when feasible. It will fall back to
|
from the configured bridge authorities when feasible. It will fall back to
|
||||||
a direct request if the authority responds with a 404. (Default: 0)
|
a direct request if the authority responds with a 404. (Default: 0)
|
||||||
|
|
||||||
**UseBridges** **0**|**1**|**auto**::
|
**UseBridges** **0**|**1**::
|
||||||
Make Tor fetch descriptors for each bridge listed in the "Bridge"
|
When set, Tor will fetch descriptors for each bridge listed in the "Bridge"
|
||||||
config lines, and use these relays as both entry guards and directory
|
config lines, and use these relays as both entry guards and directory
|
||||||
guards. If the option is 1, bridges must be used and if no bridges are
|
guards. (Default: 0)
|
||||||
configured Tor will not make any connections until a bridge is configured;
|
|
||||||
if it's "auto", Tor will use bridges if any are configured, otherwise it
|
|
||||||
will connect directly to the Tor network; if it's 0, bridges are not used
|
|
||||||
at all. (Defaults to auto)
|
|
||||||
|
|
||||||
**UseEntryGuards** **0**|**1**::
|
**UseEntryGuards** **0**|**1**::
|
||||||
If this option is set to 1, we pick a few long-term entry servers, and try
|
If this option is set to 1, we pick a few long-term entry servers, and try
|
||||||
|
@ -387,7 +387,7 @@ static config_var_t _option_vars[] = {
|
|||||||
V(TransPort, PORT, "0"),
|
V(TransPort, PORT, "0"),
|
||||||
V(TunnelDirConns, BOOL, "1"),
|
V(TunnelDirConns, BOOL, "1"),
|
||||||
V(UpdateBridgesFromAuthority, BOOL, "0"),
|
V(UpdateBridgesFromAuthority, BOOL, "0"),
|
||||||
VAR("UseBridges", AUTOBOOL, UseBridges_, "auto"),
|
V(UseBridges, BOOL, "0"),
|
||||||
V(UseEntryGuards, BOOL, "1"),
|
V(UseEntryGuards, BOOL, "1"),
|
||||||
V(UseMicrodescriptors, AUTOBOOL, "0"),
|
V(UseMicrodescriptors, AUTOBOOL, "0"),
|
||||||
V(User, STRING, NULL),
|
V(User, STRING, NULL),
|
||||||
@ -3331,14 +3331,6 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
"of the Internet, so they must not set Reachable*Addresses "
|
"of the Internet, so they must not set Reachable*Addresses "
|
||||||
"or FascistFirewall.");
|
"or FascistFirewall.");
|
||||||
|
|
||||||
if (options->UseBridges_ == -1) {
|
|
||||||
options->UseBridges = (options->Bridges &&
|
|
||||||
!server_mode(options) &&
|
|
||||||
!options->EntryNodes);
|
|
||||||
} else {
|
|
||||||
options->UseBridges = options->UseBridges_;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options->UseBridges &&
|
if (options->UseBridges &&
|
||||||
server_mode(options))
|
server_mode(options))
|
||||||
REJECT("Servers must be able to freely connect to the rest "
|
REJECT("Servers must be able to freely connect to the rest "
|
||||||
@ -3684,8 +3676,10 @@ options_validate(or_options_t *old_options, or_options_t *options,
|
|||||||
if (validate_dir_authorities(options, old_options) < 0)
|
if (validate_dir_authorities(options, old_options) < 0)
|
||||||
REJECT("Directory authority line did not parse. See logs for details.");
|
REJECT("Directory authority line did not parse. See logs for details.");
|
||||||
|
|
||||||
|
if (options->UseBridges && !options->Bridges)
|
||||||
|
REJECT("If you set UseBridges, you must specify at least one bridge.");
|
||||||
if (options->UseBridges && !options->TunnelDirConns)
|
if (options->UseBridges && !options->TunnelDirConns)
|
||||||
REJECT("TunnelDirConns set to 0 only works with UseBridges set to 0");
|
REJECT("If you set UseBridges, you must set TunnelDirConns.");
|
||||||
if (options->Bridges) {
|
if (options->Bridges) {
|
||||||
for (cl = options->Bridges; cl; cl = cl->next) {
|
for (cl = options->Bridges; cl; cl = cl->next) {
|
||||||
if (parse_bridge_line(cl->value, 1)<0)
|
if (parse_bridge_line(cl->value, 1)<0)
|
||||||
|
13
src/or/or.h
13
src/or/or.h
@ -2646,18 +2646,7 @@ typedef struct {
|
|||||||
* when doing so. */
|
* when doing so. */
|
||||||
char *BridgePassword;
|
char *BridgePassword;
|
||||||
|
|
||||||
/** Whether we should start all circuits with a bridge. This is an
|
int UseBridges; /**< Boolean: should we start all circuits with a bridge? */
|
||||||
* "autobool": 1 means strictly yes, 0 means strictly no, and -1 means that
|
|
||||||
* we do iff any bridges are configured, we are not running a server and
|
|
||||||
* have not specified a list of entry nodes. Don't use this value directly;
|
|
||||||
* use <b>UseBridges</b> instead. */
|
|
||||||
int UseBridges_;
|
|
||||||
/** Effective value of UseBridges. Will be set equally for UseBridges set to
|
|
||||||
* 1 or 0, but for 'auto' it will be set to 1 iff any bridges are
|
|
||||||
* configured, we are not running a server and have not specified a list of
|
|
||||||
* entry nodes. */
|
|
||||||
int UseBridges;
|
|
||||||
|
|
||||||
config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
|
config_line_t *Bridges; /**< List of bootstrap bridge addresses. */
|
||||||
|
|
||||||
int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make
|
int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make
|
||||||
|
Loading…
Reference in New Issue
Block a user