hoverfly icon indicating copy to clipboard operation
hoverfly copied to clipboard

Hoverfly Using Upstream Proxy Cannot Open Internal Websites

Open GreenSunShen opened this issue 4 years ago • 2 comments

Description of the bug

  • When laptop is not connected with VPN

When starting the hoverfly with arg "--upstream-proxy", both internal & external websites cannot be accessed. When starting the hoverfly without proxy argument, the internal websites cannot be accessed, but external ones can.

  • When laptop is connected with VPN

When starting the hoverfly with arg "--upstream-proxy", the internal websites cannot be accessed but external ones can. When starting the hoverfly without proxy argument, the internal websites can be accessed, but external ones can not.

Internal websites -- Websites protected by the upstream proxy. External websites -- Public websites like www.google.com

Steps to reproduce the issue

  1. Connect to a company sepcific VPN if possible

  2. hoverctl start --cors --disable-tls --upstream-proxy <company_proxy> (w/ proxy) hoverctl start --cors --disable-tls (w/o proxy)

  3. hoverctl mode capture

  4. open --new -a 'Google Chrome' --args --proxy-server=localhost:8500 --user-data-dir="$HOME/Library/Application Support/Google/Chrome-Hoverfly" --no-first-run --no-default-browser-check

  5. Type in URL on browser

Observed result

Overall Results Summary Screen Shot 2021-04-06 at 2 56 12 PM

Hoverfly error messages seen (If none, say none)

Hoverfly Error!

There was an error when forwarding the request to the intended destination

Got error: Get "https://www.google.com/": dial tcp [<ip_address>]:443: connect: network is unreachable

If possible, add screenshots to help explain your problem

Screen Shot 2021-04-06 at 2 53 18 PM

Expected result

When starting the hoverfly with arg "--upstream-proxy", both internal & external websites can be accessed. When starting the hoverfly without proxy argument, the internal websites can not be accessed, but external ones can.

Additional relevant information

  1. Hoverfly version: v1.3.2
  2. Anything that might help us to diagnose the problem Mac OS Catalina

GreenSunShen avatar Apr 06 '21 22:04 GreenSunShen

It sounds like the internal site requires VPN to access directly without upstream proxy, while external site requires going through your company's proxy in the VPN. It's probably how your company network policy is setup. Could you confirm the behaviour without hoverfly?

tommysitu avatar Apr 12 '21 22:04 tommysitu

If I start Chrome without hoverfly proxy server,

  1. When connected to VPN, then I can access both internal and external websites.
  2. When not connected to VPN, then I can only access external websites.

GreenSunShen avatar Apr 15 '21 17:04 GreenSunShen