summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorMike Perry <mikeperry-git@torproject.org>2017-12-22 06:35:29 +0000
committerMike Perry <mikeperry-git@torproject.org>2018-01-19 22:21:49 +0000
commit489628a7e4ae716b78a9515fd36d54cca5353272 (patch)
treed112aacb3b29d7a7c67d665d12ccff6a91dcf875 /src/or/or.h
parent86ee771c28777141ee5eec30fa9739a7cec32981 (diff)
downloadtor-489628a7e4ae716b78a9515fd36d54cca5353272.tar.gz
tor-489628a7e4ae716b78a9515fd36d54cca5353272.zip
Bug 23101: Pre-build HS-specific circuits (instead of general).
Prebuilt circs are 4 hops, since only server side HSDIR and intro circs are 3 hops, and it is OK if those sometimes take longer to build.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/or.h b/src/or/or.h
index b878ef8fd4..d3d8877047 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -547,13 +547,23 @@ typedef enum {
/** This circuit is used for uploading hsdirs */
#define CIRCUIT_PURPOSE_S_HSDIR_POST 19
#define CIRCUIT_PURPOSE_S_HS_MAX_ 19
+
/** A testing circuit; not meant to be used for actual traffic. */
#define CIRCUIT_PURPOSE_TESTING 20
/** A controller made this circuit and Tor should not use it. */
#define CIRCUIT_PURPOSE_CONTROLLER 21
/** This circuit is used for path bias probing only */
#define CIRCUIT_PURPOSE_PATH_BIAS_TESTING 22
-#define CIRCUIT_PURPOSE_MAX_ 22
+
+/** This circuit is used for vanguards/restricted paths.
+ *
+ * This type of circuit is *only* created preemptively and never
+ * on-demand. When an HS operation needs to take place (e.g. connect to an
+ * intro point), these circuits are then cannibalized and repurposed to the
+ * actual needed HS purpose. */
+#define CIRCUIT_PURPOSE_HS_VANGUARDS 23
+
+#define CIRCUIT_PURPOSE_MAX_ 23
/** A catch-all for unrecognized purposes. Currently we don't expect
* to make or see any circuits with this purpose. */
#define CIRCUIT_PURPOSE_UNKNOWN 255