diff options
author | George Kadianakis <desnacked@gmail.com> | 2011-06-14 02:51:59 +0200 |
---|---|---|
committer | George Kadianakis <desnacked@gmail.com> | 2011-06-14 02:51:59 +0200 |
commit | a79bea40d84fd369ef4df950765afc4c635f9b31 (patch) | |
tree | 711a80ae2de2c1cab591d0cb6d562b0e54e42ee4 /src/or/config.c | |
parent | 00ec4b2c002928f1a901950e2cc851578f295b1b (diff) | |
download | tor-a79bea40d84fd369ef4df950765afc4c635f9b31.tar tor-a79bea40d84fd369ef4df950765afc4c635f9b31.tar.gz |
We now warn the user if a proxy server is not up when we try to connect with it.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 13 |
1 files changed, 11 insertions, 2 deletions
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; |