I use git on a corporate network that requires a proxy to access github.
I have set the proxy in .gitconfig and it works fine from the network.
When I am not in the office, I connect to the corporate network via VPN. Git works fine like that too.
If i disconnect from the VPN git cannot resolve the proxy (as expected), failing with fatal: unable to access '...': Could not resolve proxy: ....
Is there a way for git to only use the proxy if it needs to?
I don't want to have to keep editing the config depending on if the VPN is active.
In Rust, the cargo command can pull from github with zero config with or without the VPN active. It would be nice if git on windows could do the same.