NO_PROXY env var ignored by Shotgun Desktop

Hi! I notice that sg desktop is reading the environment variable https_proxy and http_proxy which is fine because we are using one, however it is not reading the no_proxy env var, to make exceptions, the problem is that we have two shotgun sites right now, a local shotgun site under a local IP, and a hosted shotgun site on the internet through a proxy, we are not able to switch from site to site, because of this limitation, ideally will be that shotgun desktop reads the no_proxy env var, so it does not use the proxy when connecting to the local site, and only for the hosted sg site.

Any ideas of how can I solve this? thanks!

3 Likes

Hi @macbeth,

Unfortunately this appears to be a bug in Toolkit. It always passes down the proxy server address to the Shotgun connection object even if the NO_PROXY environment is set appropriately.

One temporary workaround would be to launch the Shotgun Desktop normally when connecting to your hosted site. When you want to launch the Shotgun Desktop for the local site, you could do so from a .bat or .sh that unsets the HTTP_PROXY/HTTPS_PROXY environment variables so no proxies are being used.

Unfortunately I can’t think of a simpler way to solve this at the moment.

Let us know if we can be of further help,

JF

4 Likes

Thanks a lot!
What about the shotgun.yml file inside the project config?
Can I delete the global env, and set different proxy settings here per project?

What would be the correct format to set this variables inside this file? In a dictionary? Yam list?
Example below

# This file was auto generated by the Shotgun Pipeline Toolkit. # Please do not modify by hand as it may be overwritten at any point. # Created 2019-11-22 18:55:51 #

{host: ‘http://mysite.shotgunstudio.com’,
http_proxy:‘10.1.2.3:2124’,
app_store_http_proxy:‘10.1.2.3:2124’,
}

End of file.

1 Like

As I understand it, your problem isn’t at the project level, but at the site level, where one site requires proxy access and the other doesn’t. While Toolkit supports per project proxy settings (originally there was only the project level, so it made sense to support proxies there), at the site level, i.e. when you log into Shotgun Desktop, only one proxy can be specified. This is why I suggested that you use a .bat/.sh to get around this limitation.

As for the syntax of your file, you got it mostly right. The app_store_http_proxy setting is required only is you need a proxy to access the App Store but not your Shotgun site, e.g. when you are running a local instance of Shotgun. In that case, you would skip http_proxy and only set app_store_http_proxy. For a hosted site, setting http_proxy and not setting app_store_http_proxy implies that you want to use the same proxy for both your site and the Toolkit AppStore.

3 Likes