mario
mario

Reputation: 23

Jsoup with socks port

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

Answers (1)

Krystian G
Krystian G

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

Related Questions