Skip to content
Browse files

fixes bug with setting of HTTP proxy value

in newer version of Apache HTTPClient the proxy setting was being ignored
  • Loading branch information
n8fr8 committed Jun 30, 2014
1 parent 595c1fe commit 435d9dc5bf4cb0f21cd4c90bef36643feb0c2178
Showing with 4 additions and 3 deletions.
  1. +4 −3 libnetcipher/src/info/guardianproject/onionkit/trust/
@@ -20,6 +20,7 @@
import android.util.Log;
import ch.boye.httpclientandroidlib.HttpHost;
import ch.boye.httpclientandroidlib.conn.ClientConnectionOperator;
import ch.boye.httpclientandroidlib.conn.params.ConnRoutePNames;
import ch.boye.httpclientandroidlib.conn.scheme.PlainSocketFactory;
import ch.boye.httpclientandroidlib.conn.scheme.Scheme;
import ch.boye.httpclientandroidlib.conn.scheme.SchemeRegistry;
@@ -152,9 +153,9 @@ public void useProxy(boolean enableTor, String type, String host, int port)
this.proxyType = type;

HttpHost proxyHost = new HttpHost(host, port);
getParams().setParameter(type, proxyHost);

HttpHost proxyHost = new HttpHost(host, port, type);
getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxyHost);
if (type.equalsIgnoreCase("socks"))
this.proxyHost = proxyHost;

0 comments on commit 435d9dc

Please sign in to comment.
You can’t perform that action at this time.