aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2012-07-18 20:01:02 +0200
committerGeorge Kadianakis <desnacked@riseup.net>2012-07-18 20:01:02 +0200
commita1d060a68f62af3c9813f530eab70ce70d70fd6c (patch)
tree90137698ecd5c2c788a67555b1f16b63fd662984 /src
parent5ddb9b3134b30da0c4ae8857bc15ddaa7c29a4b1 (diff)
downloadtor-a1d060a68f62af3c9813f530eab70ce70d70fd6c.tar.gz
tor-a1d060a68f62af3c9813f530eab70ce70d70fd6c.zip
Better handling of server managed proxies when Tor is not a relay.
Diffstat (limited to 'src')
-rw-r--r--src/or/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/or/config.c b/src/or/config.c
index d90e0fc996..07da2dab3b 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -1464,7 +1464,7 @@ options_act(const or_options_t *old_options)
}
}
- if (options->ServerTransportPlugin) {
+ if (options->ServerTransportPlugin && server_mode(options)) {
for (cl = options->ServerTransportPlugin; cl; cl = cl->next) {
if (parse_server_transport_line(cl->value, 0)<0) {
log_warn(LD_BUG,
@@ -4019,6 +4019,13 @@ options_validate(or_options_t *old_options, or_options_t *options,
REJECT("Server transport line did not parse. See logs for details.");
}
+ if (options->ServerTransportPlugin && !server_mode(options)) {
+ log_notice(LD_GENERAL, "Tor is not configured as a relay but you specified"
+ " a ServerTransportPlugin line (%s). The ServerTransportPlugin "
+ "line will be ignored.",
+ esc_for_log(options->ServerTransportPlugin->value));
+ }
+
if (options->ConstrainedSockets) {
/* If the user wants to constrain socket buffer use, make sure the desired
* limit is between MIN|MAX_TCPSOCK_BUFFER in k increments. */