Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //...
- String run(String url) throws IOException {
- // randomly select a proxy from the list
- Random random = new Random();
- int index = random.nextInt(proxyList.size());
- ProxyInfo proxyInfo = proxyList.get(index);
- // Create a proxy object with the selected proxy details
- Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyInfo.host, proxyInfo.port));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement