Reputation: 23
How to use Jsoup
via socks port?. I've not found anything in the documentation.
Jsoup changelog:
Release 1.9.1 [2016-Apr-16]
Added support for HTTP and SOCKS request proxies, specifiable per connection.
Upvotes: 2
Views: 712
Reputation: 2941
Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("1.2.3.4", 8080));
Document doc = Jsoup.connect("url").proxy(proxy).get();
Upvotes: 0