I have the following code in my (test) android project:
Proxy proxy = new Proxy(Proxy.Type.SOCKS, sa); HttpURLConnection conn = (HttpURLConnection) u.openConnection(proxy); Then I have implemented a SOCKS server listening on port 1080. The problem I have is that in the SOCKS4 connection request, the destination address and port is not "ip for google":80 but rather 127.0.0.1:1080, i.e. the proxy address. If I return ok, I start getting HTTP data. Am I doing something wrong or is there a bug in the SOCKS-client?