Guest User

Untitled

a guest
Jan 17th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Socket sock = new Socket();
  2. InetSocketAddress remoteProxyAddress = new InetSocketAddress(proxy ip, proxy port);
  3. sock.connect(remoteProxyAddress, connTimeout);
  4.  
  5. InputStream in = sock.getInputStream();
  6. OutputStream out = sock.getOutputStream();
  7.  
  8. out.write(0x04);
  9. out.write(0x01);
  10. out.write((endpoint.getPort() >> 8) & 0xff);
  11. out.write((endpoint.getPort() >> 0) & 0xff);
  12. out.write(endpoint.getAddress().getAddress());
  13. out.write(0x0);
  14. out.flush();
Add Comment
Please, Sign In to add comment