Fallback To Direct Not Working
kimihiro64 opened this issue · comments
I have a client with the use case that their employees will be using a proxy at work but not at home. When they attempt to connect at home, we try to use the proxy settings in the config and we get 'Error: getaddrinfo ENOTFOUND :' because it's not available on the open internet. I'm even re-initializing the pac proxy agent before each call:
const pacOptions = {
uri: pacProxyURL,
fallbackToDirect: true,
};
const pacAgent = new PacProxyAgent(pacOptions);
Then we pass this agent to an instance of request-promise. We actually have the same issue with proxy-agent for those that aren't using a pac file. I would've figured that if the proxy cannot be found, it just tries to connect using the DIRECT proxy when passing fallbackToDirect = true, but it seems like that's not the case...
This code in this repository has been moved to the proxy-agents
monorepo, so I am closing this pull request. If you feel that this issue still exists as of the latest release, feel free to open a new issue over there.