Is there a way to set or unset the proxy for Pycharm via the command line?

Using a Github repo via https, while at my office, I need to set the proxy because it authenticates my username and/or token via our company proxy.  When at home though, I need to unset the proxy for this to work.  Is there a way to enable or disable the proxy on application start, rather than having to open the settings and navigate to the proxy settings and clicking either “No Proxy” or “Auto-Detect Proxy Settings” each time.

For example something like this would be cool:  
%application_path%\Pycharm64.exe --proxy="NoProxy"
%application_path%\Pycharm64.exe --proxy="AutoDetect"
or
%application_path%\Pycharm64.exe --proxy=""
%application_path%\Pycharm64.exe --proxy="my.proxyserver.com:myport"

If there was some kind of ability as this, then I could write a wrapper script that checked my IPv4 address and based off the result, set or unset the proxy prior to starting Pycharm.

I know I can update the git portion of this issue via git config commands such as those below, but don't know how to accommodate my Pycharm changes in a similar manner.

To set my proxies:
git config --global http.proxy my.proxy.com:port
git config --global https.proxy my.proxy.com:port

To unset my proxies:
git config --global --unset http.proxy
git config --global --unset https.proxy

0

Please sign in to leave a comment.