How to use Http, Socks4 and Socks5 proxies in java?

I want to clear the website, and for this I want to use Http, Socks4 and Sock5 proxies. So my questions are these:

  • Is it possible to use these proxies through Java without using any other external APIs? For example, is it possible to send a request through HttpURLConnection through these programs?

  • If this is not possible, then what other external APIs can I use?

  • I did this using the mute browser provided by HtmlUnit , but it takes time to load even simple web pages, so could you please suggest other APIs (if any) that provide mute browsers that load web pages quickly. I do not want to open web pages containing heavy AJAX or Javascript code. I just need to click the "Forms" button through a browser without a browser.

+5
source share
2 answers

Is it possible to use these proxies through Java without using any other external APIs? For example, is it possible to send a request HttpURLConnectionthrough these proxies?

, , () Proxy ProxySelector. Java 5 . Java Networking Proxies, jarnbjo .

, , HtmlUnit, - , API ( ), , -. -, AJAX Javascript. "" .

, , , HtmlUnit (, JWebUnit, WebTest) (Selenium, WebDriver - ). , , HttpUnit, JavaScript.

+3

, . .

+1

All Articles