Is it possible to use browser's internet connection for other application?

I'm in environment where browser is the only application that may access internet connection. Meanwhile, I need to run maven projects which needs internet access to download the required JARs.

I was thinking about creating Proxy Server in Chrome extensions or other browser. But, I hope I can find another easier way.

有帮助吗?

解决方案 2

Yes it is possible.

Recently I created a http_proxy server in Java which start 3 socket servers:

  • Http server to receive user request, and
  • WebSocket server to allow Chromium extension to create connection to the http_proxy server.
  • Http Server to receive response body from Chromium.

So, there will be 3 socket connections:

  • To receive http user request and send back the content, and
  • To send the URL requested to Chromium browser
  • When response received by browser (via Xhr), it will do HTTP POST to http_proxy server to send the content.

That's all!

其他提示

Sounds like Selenium WebDriver is what you need. You could try to redirect the download to browser or try to programmatically simulate browser.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top