From a79bea40d84fd369ef4df950765afc4c635f9b31 Mon Sep 17 00:00:00 2001 From: George Kadianakis Date: Tue, 14 Jun 2011 02:51:59 +0200 Subject: We now warn the user if a proxy server is not up when we try to connect with it. --- src/or/config.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/or/config.c') diff --git a/src/or/config.c b/src/or/config.c index b659d9b7a..47702873b 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3565,8 +3565,17 @@ options_validate(or_options_t *old_options, or_options_t *options, } } - if (options->Socks4Proxy && options->Socks5Proxy) - REJECT("You cannot specify both Socks4Proxy and SOCKS5Proxy"); + /* Check if more than one proxy type has been enabled. This looks REALLY ugly! */ + if ((options->Socks4Proxy && (options->Socks5Proxy || options->HTTPSProxy + || options->ClientTransportPlugin)) || + (options->Socks5Proxy && (options->Socks4Proxy || options->HTTPSProxy + || options->ClientTransportPlugin)) || + (options->HTTPSProxy && (options->Socks4Proxy || options->Socks5Proxy + || options->ClientTransportPlugin)) || + (options->ClientTransportPlugin && (options->Socks4Proxy + || options->Socks5Proxy || options->HTTPSProxy))) + REJECT("You have configured more than one proxy types. " + "(Socks4Proxy|Socks5Proxy|HTTPSProxy|ClientTransportPlugin)"); if (options->Socks5ProxyUsername) { size_t len; -- cgit v1.2.3