-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it support changing network connections #5
Comments
I just checked it, it does not support. So I started the proxy-pac-proxy with the PAC url, it worked when I was in my corporate network. Once I changed network to one that does not need a proxy, proxy-pac-proxy stopped serving connections, my browser showed "ERR_TUNNEL_CONNECTION_FAILED" error. Could this feature be added to dynamically adapt if the PAC file can't be reached anymore? |
The URL of the .pac file is passed at start time via a CLI option or through an environment variable. Once the file is retrieved and parsed, it is not checked again, nor I think it should be. Detection of network and/or configuration changes is better handled at a different level; for example, on Mac platforms an Automator script could take care of restarting proxy-pac-proxy with the proper parameters whenever a network change occurs. |
Thanks @emarock , I was hoping that once I start prox-pac-proxy, it would then run seamless regardless of network changes. Just like browsers who work with a PAC even if you change networks. |
Unfortunately PAC discovery could be quite intricate and is very platform-dependent, so it is kept out of scope for proxy-pac-proxy, but could be implemented quite easily on top of it for a scenario like yours (i.e. in a if-up.d script). On a side note, is there any specific reason why you hardcoded the URL to the PAC file rather than setting it as a env variable (or a cli option in an alias, or something like that..)? |
Actually I dont need PAC discovery. It's much more simpler: In my scenairo, one of A or B would certainly work, and if both wont work, then it means I have another problem which I can configure proxy-pac-proxy to tackle with (ie a different network with a different PAC). To answer your question, its simple to start the service from upstart deamon with a PAC url parameter than fiddling with Environment variables in service context (for me), but I guess I could also do that, it to set and unset a variable. In any case, I need to restart the service, and that is what I'm trying to avoid as it's difficult. PS1. I alreayd have a semi-working model with stopping/starting with new config using tinyproxy. |
Hi, I was wondering if proxy-pac-proxy supports changing environments.
For example, I will start proxy-pac-proxy with a PAC url, which will work while I'm at work.
But when I go home, how will it behave? In such case, does proxy-pac-proxy simply act as a forwarding proxy directly to the destination host without forwarding any traffic to an upstream proxy? (as none would be defined, since no PAC would be reachable when I'm at home).
The text was updated successfully, but these errors were encountered: