when I set HTTP proxy in config.ini some error happen
I just setting HTTP proxy, but when open shotgun python console debug it,
print(shotgun.config.proxy_handler.proxies) return {'https':'http://123.234.345.456:8888'}
I think if I set value in config.ini
http_proxy=123.234.345.456:8888
should return {'http':'http://123.234.345.456:8888'}
if I set value in config.ini
https_proxy=123.234.345.456:8888
should return {'https':'http://123.234.345.456:8888'}
# Empty by default. # # default_site=https://your-site-here.shotgunstudio.com # If specified, the Shotgun Desktop will use these proxy settings to connect to # the Shotgun site and the Toolkit App Store. The proxy string should be of the # forms 123.123.123.123, 123.123.123.123:8888 or # username:pass@123.123.123.123:8888. # Empty by default. # # http_proxy=123.234.345.456:8888 # If specified, the Shotgun API Desktop will use these proxy settings to connect # to the Toolkit App Store. The proxy string format is the same as http_proxy. # If the setting is present in the file but not set, then no proxy will be used # to connect to the Toolkit App Store, regardless of the value of the http_proxy # setting. # Empty by default. # # app_store_http_proxy=123.234.345.456:8888
I need it be {‘http’:‘http://192.168.1.28:3128 ’} ,How can i do it? or it’s a bug?
link:
raise ValueError("Invalid http_proxy address '%s'. Valid " "format is '123.456.789.012' or '123.456.789.012:3456'" ". If no port is specified, a default of %d will be " "used." % (http_proxy, self.config.proxy_port)) # now populate self.config.proxy_handler if self.config.proxy_user and self.config.proxy_pass: auth_string = "%s:%s@" % (self.config.proxy_user, self.config.proxy_pass) else: auth_string = "" proxy_addr = "http://%s%s:%d" % (auth_string, self.config.proxy_server, self.config.proxy_port) self.config.proxy_handler = urllib.request.ProxyHandler({self.config.scheme: proxy_addr}) if ensure_ascii: self._json_loads = self._json_loads_ascii self.client_caps = ClientCapabilities() # this relies on self.client_caps being set first self.reset_user_agent() self._server_caps = None