summaryrefslogtreecommitdiff
path: root/src/or/or.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-01-27 08:05:29 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-27 08:05:29 -0500
commit81c78ec7556b4071b4eb1f60c4867d6ba8cf4685 (patch)
tree721d4456a74b7fb07b5e88e7bb22ac0c0eeb3137 /src/or/or.h
parentad382049ed9b3408992a7a7ee4dfe2ecdb1d5897 (diff)
downloadtor-81c78ec7556b4071b4eb1f60c4867d6ba8cf4685.tar.gz
tor-81c78ec7556b4071b4eb1f60c4867d6ba8cf4685.zip
Outbindbindaddress variants for Exit and OR.
Allow separation of exit and relay traffic to different source IP addresses (Ticket #17975). Written by Michael Sonntag.
Diffstat (limited to 'src/or/or.h')
-rw-r--r--src/or/or.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/or/or.h b/src/or/or.h
index 80ce704e85..18fff78942 100644
--- a/src/or/or.h
+++ b/src/or/or.h
@@ -3545,6 +3545,12 @@ typedef struct routerset_t routerset_t;
* to pick its own port. */
#define CFG_AUTO_PORT 0xc4005e
+/** Enumeration of outbound address configuration types:
+ * Exit-only, OR-only, or both */
+typedef enum {OUTBOUND_ADDR_EXIT, OUTBOUND_ADDR_OR,
+ OUTBOUND_ADDR_EXIT_AND_OR,
+ OUTBOUND_ADDR_MAX} outbound_addr_t;
+
/** Configuration options for a Tor process. */
typedef struct {
uint32_t magic_;
@@ -3628,10 +3634,14 @@ typedef struct {
config_line_t *ControlListenAddress;
/** Local address to bind outbound sockets */
config_line_t *OutboundBindAddress;
- /** IPv4 address derived from OutboundBindAddress. */
- tor_addr_t OutboundBindAddressIPv4_;
- /** IPv6 address derived from OutboundBindAddress. */
- tor_addr_t OutboundBindAddressIPv6_;
+ /** Local address to bind outbound relay sockets */
+ config_line_t *OutboundBindAddressOR;
+ /** Local address to bind outbound exit sockets */
+ config_line_t *OutboundBindAddressExit;
+ /** Addresses derived from the various OutboundBindAddress lines.
+ * [][0] is IPv4, [][1] is IPv6
+ */
+ tor_addr_t OutboundBindAddresses[OUTBOUND_ADDR_MAX][2];
/** Directory server only: which versions of
* Tor should we tell users to run? */
config_line_t *RecommendedVersions;