aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.h
diff options
context:
space:
mode:
authorteor (Tim Wilson-Brown) <teor2345@gmail.com>2016-04-28 15:37:59 +1000
committerNick Mathewson <nickm@torproject.org>2016-05-05 08:16:28 -0400
commit833b5f71a72394c02ef633ba0f78d7011fef6181 (patch)
treed8e31ef40161c2dd4b0d0577062c264a7989822e /src/or/directory.h
parent01e7f42a09108e71cede46d4a038c4b1253a3d42 (diff)
downloadtor-833b5f71a72394c02ef633ba0f78d7011fef6181.tar.gz
tor-833b5f71a72394c02ef633ba0f78d7011fef6181.zip
Make clients always use begindir for directory requests
This improves client anonymity and avoids directory header tampering. The extra load on the authorities should be offset by the fallback directories feature. This also simplifies the fixes to #18809.
Diffstat (limited to 'src/or/directory.h')
-rw-r--r--src/or/directory.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/directory.h b/src/or/directory.h
index 03c04c10c9..c4edbb5c0f 100644
--- a/src/or/directory.h
+++ b/src/or/directory.h
@@ -28,8 +28,8 @@ void directory_get_from_all_authorities(uint8_t dir_purpose,
/** Enumeration of ways to connect to a directory server */
typedef enum {
- /** Default: connect over a one-hop Tor circuit but fall back to direct
- * connection */
+ /** Default: connect over a one-hop Tor circuit. Relays fall back to direct
+ * DirPort connections, clients, onion services, and bridges do not */
DIRIND_ONEHOP=0,
/** Connect over a multi-hop anonymizing Tor circuit */
DIRIND_ANONYMOUS=1,
@@ -39,6 +39,8 @@ typedef enum {
DIRIND_ANON_DIRPORT,
} dir_indirection_t;
+int directory_must_use_begindir(const or_options_t *options);
+
MOCK_DECL(void, directory_initiate_command_routerstatus,
(const routerstatus_t *status,
uint8_t dir_purpose,