I am trying to parse and manipulate HTML using jsoup. It is working perfectly fine for HTTP URLs but it's throwing UnknownHostException if a HTTPS URL is used. Following is my code:
System.setProperty("http.proxyHost", "192.168.0.1");
System.setProperty("http.proxyPort", "8080");
Document doc = Jsoup.connect("https://www.google.com/").get();
I was rather expecting an exception related to SSL certificates but what could be the reason for UnknownHostException? Please note that the following code runs perfectly for http://www.google.com/