aboutsummaryrefslogtreecommitdiff
path: root/src/feature/client/transports.h
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2019-07-02 20:21:13 +0200
committerDavid Goulet <dgoulet@torproject.org>2020-10-06 09:30:11 -0400
commit5f61e19d8a4e96be9e8692777d835dde8d1ea7f8 (patch)
tree2965fc7099ef48322deba8203968573b15d095f7 /src/feature/client/transports.h
parent69c1a4ebc369d79b2a58c25926187407a34b511e (diff)
downloadtor-5f61e19d8a4e96be9e8692777d835dde8d1ea7f8.tar.gz
tor-5f61e19d8a4e96be9e8692777d835dde8d1ea7f8.zip
Expose TOR_PT_OUTBOUND_BIND_ADDRESS_{V4,V6} to Pluggable Transports.
This patch adds support for exposing the environment variables `TOR_PT_OUTBOUND_BIND_ADDRESS_V4` and `TOR_PT_OUTBOUND_BIND_ADDRESS_V6` to Pluggable Transport proccesses. These two values will contain the IPv4 and IPv6 address that the user have specified in torrc that they wish the PT to use for all outgoing IP packets. It is important to note here that it is up to the indvidual Pluggable Transport if they are willing to honor these values or ignore them completely. One can test this feature using the following dummy PT written in POSIX shell script: #!/bin/sh echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv4: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V4}\"" echo "LOG SEVERITY=warning MESSAGE=\"Value for IPv6: ${TOR_PT_OUTBOUND_BIND_ADDRESS_V6}\"" while true ; do sleep 1 done with the following entries in your torrc: OutboundBindAddressPT 203.0.113.4 OutboundBindAddress 203.0.113.5 OutboundBindAddressPT 2001:db8::4 OutboundBindAddress 2001:db8::5 See: https://bugs.torproject.org/5304
Diffstat (limited to 'src/feature/client/transports.h')
-rw-r--r--src/feature/client/transports.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/feature/client/transports.h b/src/feature/client/transports.h
index 1ed942c175..3aff1cb248 100644
--- a/src/feature/client/transports.h
+++ b/src/feature/client/transports.h
@@ -149,6 +149,8 @@ STATIC void managed_proxy_stderr_callback(process_t *, const char *, size_t);
STATIC bool managed_proxy_exit_callback(process_t *, process_exit_code_t);
STATIC int managed_proxy_severity_parse(const char *);
+STATIC const tor_addr_t *managed_proxy_outbound_address(const or_options_t *,
+ sa_family_t);
#endif /* defined(PT_PRIVATE) */