summaryrefslogtreecommitdiff
path: root/src/or/config.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-10 23:41:55 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-10 23:41:55 -0400
commite07206afea28d110a0a7b74d4e230db3b0fe3120 (patch)
tree8f251f9c27bdfbe94e0a3d97b7e4b21a2b5fa9f0 /src/or/config.c
parent5474d8ae05da1a7b896a12e5857b2dbe0b0b8ce6 (diff)
parentcae44838fecc550f2df16de44b0ef297ecb509a6 (diff)
downloadtor-e07206afea28d110a0a7b74d4e230db3b0fe3120.tar.gz
tor-e07206afea28d110a0a7b74d4e230db3b0fe3120.zip
Merge remote-tracking branch 'yawning/bug_8402'
Diffstat (limited to 'src/or/config.c')
-rw-r--r--src/or/config.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 92bd495471..46b4afe3ae 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -3187,11 +3187,11 @@ options_validate(or_options_t *old_options, or_options_t *options,
}
}
- /* Check if more than one proxy type has been enabled. */
+ /* Check if more than one exclusive proxy type has been enabled. */
if (!!options->Socks4Proxy + !!options->Socks5Proxy +
- !!options->HTTPSProxy + !!options->ClientTransportPlugin > 1)
+ !!options->HTTPSProxy > 1)
REJECT("You have configured more than one proxy type. "
- "(Socks4Proxy|Socks5Proxy|HTTPSProxy|ClientTransportPlugin)");
+ "(Socks4Proxy|Socks5Proxy|HTTPSProxy)");
/* Check if the proxies will give surprising behavior. */
if (options->HTTPProxy && !(options->Socks4Proxy ||
@@ -4868,6 +4868,13 @@ parse_client_transport_line(const or_options_t *options,
pt_kickstart_client_proxy(transport_list, proxy_argv);
}
} else { /* external */
+ /* ClientTransportPlugins connecting through a proxy is managed only. */
+ if (options->Socks4Proxy || options->Socks5Proxy || options->HTTPSProxy) {
+ log_warn(LD_CONFIG, "You have configured an external proxy with another "
+ "proxy type. (Socks4Proxy|Socks5Proxy|HTTPSProxy)");
+ goto err;
+ }
+
if (smartlist_len(transport_list) != 1) {
log_warn(LD_CONFIG, "You can't have an external proxy with "
"more than one transports.");