]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add a warning for using HTTPProxy with no other proxy.
authorNick Mathewson <nickm@torproject.org>
Tue, 12 Jun 2012 19:21:41 +0000 (15:21 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 12 Jun 2012 19:21:41 +0000 (15:21 -0400)
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.

changes/bug4663 [new file with mode: 0644]
src/or/config.c

diff --git a/changes/bug4663 b/changes/bug4663
new file mode 100644 (file)
index 0000000..f720ff5
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor features:
+    - Warn the user when HTTPProxy, but no other proxy type, is
+      configured. This can cause surprising behavior: it doesn't send
+      all of Tor's traffic over the HTTPProxy--it sends unencrypted
+      directory traffic only. Resolves ticket 4663.
index 09fcf000be987958721f1c58ed0867dbc8c00d86..782a6e92481536fdecc048d6aa7d4e0e1436cebf 100644 (file)
@@ -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;