Android Orbot malformed reply from SOCKS server

假装没事ソ 提交于 2019-12-04 21:59:15

I solved this using

compile "org.igniterealtime.smack:smack-android-extensions:4.1.4"
compile "org.igniterealtime.smack:smack-tcp:4.1.4"

and then connecting using this code:

final Random rndForTorCircuits = new Random();
String user = rndForTorCircuits.nextInt(100000) + "";
String pass = rndForTorCircuits.nextInt(100000) + "";
ProxyInfo proxyInfo = new ProxyInfo(ProxyInfo.ProxyType.SOCKS5, "127.0.0.1", 9050, user, pass);
socket = proxyInfo.getSocketFactory().createSocket(addr.getHostName(), addr.getPort());

by using this you get socket that is already connected to proxy.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!