diff options
author | Nick Mathewson <nickm@torproject.org> | 2012-06-12 15:21:41 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2012-06-12 15:21:41 -0400 |
commit | f4fccee4d25b0de2780468b6f3b5b3b18d03945c (patch) | |
tree | eb3fc1e6a6f10b859cc08c71a07b38dee1609c4a /src | |
parent | f0f70ba6f1e484a5217952238b22467ba4939d8a (diff) | |
download | tor-f4fccee4d25b0de2780468b6f3b5b3b18d03945c.tar tor-f4fccee4d25b0de2780468b6f3b5b3b18d03945c.tar.gz |
Add a warning for using HTTPProxy with no other proxy.
From what I can tell, this configuration is usually a mistake, and
leads people to think that all their traffic is getting proxied when
in fact practically none of it is. Resolves the issue behind "bug"
4663.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 09fcf000b..782a6e924 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3889,6 +3889,15 @@ options_validate(or_options_t *old_options, or_options_t *options, REJECT("You have configured more than one proxy type. " "(Socks4Proxy|Socks5Proxy|HTTPSProxy|ClientTransportPlugin)"); + /* Check if the proxies will give surprising behavior. */ + if (options->HTTPProxy && !(options->Socks4Proxy || + options->Socks5Proxy || + options->HTTPSProxy)) { + log_warn(LD_CONFIG, "HTTPProxy configured, but no SOCKS proxy or " + "HTTPS proxy configured. Watch out: this configuration will " + "proxy unencrypted directory connections only."); + } + if (options->Socks5ProxyUsername) { size_t len; |