0

I use browsermob-proxy-2.1.0-beta-4-bin, and when I create an instance, I can view only HTTP-based sites. Is there any way to view HTTPS-sites?

Pete
  • 51,385
  • 23
  • 99
  • 140
N. Kuznetsov
  • 45
  • 2
  • 6
  • did u found any solution to this ? I am also trying to solve this problem but unable to get https traffic through browsermob - Using latest BMP version 2.1.4 and selenium webdriver - 3.0.1.. For https connections - the browser doesn't open the url and gives this response - This site can’t be reached - The webpage at https://xxxx.com/ might be temporarily down or it may have moved permanently to a new web address.ERR_TUNNEL_CONNECTION_FAILED – user2205230 May 30 '17 at 08:57

2 Answers2

0

The 2.1.0-beta-4 build of Browsermob Proxy definitely supports https. I am using it right now integrate with automated browser testing. I am able to send https traffic through the proxy, capture said traffic with request/response handlers, and they appear in the HAR files when I dump them.

If you want a more specific answer, you will need to provide more details on what you are doing. What browser? How are you using it? Are you unable to get a web page to the browser, or just unable to capture the traffic in the proxy? Can your browser make direct connections to the https sites without the proxy? Are you getting errors to timeouts?

If you are manually configuring a browser to proxy through a stand-alone version of Browsermob Proxy and the page requests are failing, then it may be that your secure traffic is not going to the proxy, or that your browser is freaked out about the proxy playing man-in-the-middle. Or maybe there is a firewall interfering with the proxy reaching the https site.

Brian S.
  • 333
  • 1
  • 12
0

@Brian S.

I am also facing the same issue.

Let me answer the questions u asked above.. 1. I am using ChromeBrowser.

2.

proxy = new BrowserMobProxyServer();
 proxy.start(0);
 Proxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy);
 DesiredCapabilities capabilities = new DesiredCapabilities();
 capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, seleniumProxy);
  capabilities.setCapability(CapabilityType.PROXY, seleniumProxy);
  System.setProperty("webdriver.chrome.driver", "chromedriverpath");
  driver = new ChromeDriver(capabilities);
  proxy.enableHarCaptureTypes(CaptureType.REQUEST_HEADERS,     CaptureType.RESPONSE_HEADERS);
  proxy.newHar("URL");
 driver.manage().window().maximize();
 driver.get("URL");  
 driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 Robot rb = new Robot();
 rb.keyPress(KeyEvent.VK_ENTER);
  1. Yes i am unable to get the web page to the browser coz of https, if change it to http the page loads.
  2. yes my browser makes direct connections to the https sites without the proxy.
  3. yes i am getting this error for https - This site can’t be reached - The webpage at URL might be temporarily down or it may have moved permanently to a new web address.ERR_TUNNEL_CONNECTION_FAILED
user2205230
  • 161
  • 1
  • 14