문제

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