Nathan of Guardian:
> 
> 
> On Thu, Sep 22, 2016, at 03:52 PM, Hans-Christoph Steiner wrote:
>> I didn't find a solid reference yet, but this test for me confirms that
>> at least in terms of HttpURLConnection on android-22, SOCKS proxies do
>> not work:
>>
>>  URL url = new URL("https://facebookcorewwwi.onion";);
>>  Proxy proxy = new Proxy(Proxy.Type.SOCKS,
>>    new InetSocketAddress("127.0.0.1", 9050));
>>  HttpURLConnection connection = (HttpURLConnection)
>> url.openConnection(proxy);
>>  connection.setConnectTimeout(0); // blocking connect with TCP timeout
>>  connection.setReadTimeout(20000);
>>  connection.getContent();
>>  assertEquals(200, connection.getResponseCode());
> 
> Did you try with a non .onion address? There might be some funny name
> resolution stuff happening before the network connection is attempted.

Yes, it will connect to regular domain names, even after changing the
SOCKS port number to some random value.  So its totally skipping the
SOCKS configuration.  For example:

 URL url = new URL("https://guardianproject.info";);
 Proxy proxy = new Proxy(Proxy.Type.SOCKS,
   new InetSocketAddress("127.0.0.1", 28734));
 HttpURLConnection connection = (HttpURLConnection)
 url.openConnection(proxy);
 connection.setConnectTimeout(0); // blocking connect with TCP timeout
 connection.setReadTimeout(20000);
 connection.getContent();
 assertEquals(200, connection.getResponseCode());

.hc

-- 
PGP fingerprint: EE66 20C7 136B 0D2C 456C  0A4D E9E2 8DEA 00AA 5556
https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE9E28DEA00AA5556
_______________________________________________
List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
To unsubscribe, email:  guardian-dev-unsubscr...@lists.mayfirst.org

Reply via email to