diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-05-30 23:32:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-06-02 15:11:21 -0400 |
commit | 507c1257a4d9c629fefc2adbad8db73607749734 (patch) | |
tree | 813b9478c3f0613637b4f2427489d8bd97301c96 /src/or/or.h | |
parent | 80038b545359e5156fde6d6be4015bdf7f80e779 (diff) | |
download | tor-507c1257a4d9c629fefc2adbad8db73607749734.tar.gz tor-507c1257a4d9c629fefc2adbad8db73607749734.zip |
Add an "auto" option to UseBridges
UseBridges 1 now means "connect only to bridges; if you know no
bridges, don't make connections." UseBridges auto means "Use bridges
if they are known, and we have no EntryNodes set, and we aren't a
server." UseBridges 0 means "don't use bridges."
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h index 97fecd1500..456dce2be4 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2480,7 +2480,17 @@ typedef struct { * when doing so. */ char *BridgePassword; - int UseBridges; /**< Boolean: should we start all circuits with a bridge? */ + /** Whether we should start all circuits with a bridge. "1" means strictly + * yes, "0" means strictly no, and "auto" means that we do iff any bridges + * are configured, we are not running a server and have not specified a list + * of entry nodes. */ + char *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. */ int BridgeRelay; /**< Boolean: are we acting as a bridge relay? We make |