collectd-librato
collectd-librato copied to clipboard
add Proxy configuration directive
This change adds a new proxy configuration directive to collectd-librato so that it can run on machines with no direct internet access. The proxy needs to be specified in
Proxy 10.1.1.1:3128
Looks like this will attempt communications through both https and http access to the proxy? Wondering if scheme should be part of the config directive?
@nextmat Like this?
Proxy https://10.1.1.1:3128
As far as I understand, the protocol selector is used to choose a proxy according to the protocol of the URL that is being requested. For all practical purposes, this will be https, but maybe someone sets up a very convoluted setup, specifying a http url for the 'api' configuration and a proxy that only speaks https and an outgoing https translator.
In fact, it already seems possible to use the syntax that you've proposed, and urllib2 falls back to http if no protocol is specified in the proxy spec.
@mheffner Yep, that was what I was asking.
@hanshuebner It has been my experience that orgs do strange things with proxies sometimes, often using an http
or https
connection to the proxy always regardless of the scheme of the outbound request. Just wanted to make sure this supports that case if we're adding proxy support.