0

I'm looking for way to take care on updating http_proxy/https_proxy/no_proxy relevant to the Windows 7 proxy configuration.

Context: My corporate has defined PAC file with rules that switch proxy configuration depends on many factors (VPN, network, localization, etc...). Link to this PAC file is defined at Windows Internet Properties (Connections/LAN settings) so everything works fine if services using Windows System Proxy configuration. But I'm using a lot of command line tools that utilize only {http/https/no}_proxy variables so, each time when I change localization/network I have to update my system variables - this is little confusing for me.

Is it any way to do it automatically?

4
  • A PAC file is more powerful than a simple proxy setting. It selects a proxy configuration based on the destination host. You cannot convert this logic to “dump” proxy settings in a generic way.
    – Daniel B
    Dec 29, 2017 at 13:24
  • Good point, but in my case it will be enough to set proxy variable for one particular 'host' destination. Maybe there is some well described way/scripts to utilize tools like github.com/manugarg/pacparser to update enviroment variables?
    – rhkcoo
    Dec 29, 2017 at 13:31
  • Another way that I have in mind is some kind of local http proxy service that will point to the right PAC defined proxy. Some kind of the in the middle proxy.
    – rhkcoo
    Dec 29, 2017 at 13:37
  • If the PAC file you’re working with is made so that the proxy depends only on myIpAddress(), that might be feasible. Otherwise, you do indeed need a local proxy to take care of things.
    – Daniel B
    Dec 29, 2017 at 13:45

0

You must log in to answer this question.

Browse other questions tagged .