Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Socket sock = new Socket();
- InetSocketAddress remoteProxyAddress = new InetSocketAddress(proxy ip, proxy port);
- sock.connect(remoteProxyAddress, connTimeout);
- InputStream in = sock.getInputStream();
- OutputStream out = sock.getOutputStream();
- out.write(0x04);
- out.write(0x01);
- out.write((endpoint.getPort() >> 8) & 0xff);
- out.write((endpoint.getPort() >> 0) & 0xff);
- out.write(endpoint.getAddress().getAddress());
- out.write(0x0);
- out.flush();
Add Comment
Please, Sign In to add comment