collectd-librato icon indicating copy to clipboard operation
collectd-librato copied to clipboard

add Proxy configuration directive

Open hanshuebner opened this issue 10 years ago • 4 comments

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 : syntax:

   Proxy 10.1.1.1:3128

hanshuebner avatar Apr 09 '14 18:04 hanshuebner

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 avatar Apr 09 '14 19:04 nextmat

@nextmat Like this?

Proxy https://10.1.1.1:3128

mheffner avatar Apr 09 '14 19:04 mheffner

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.

hanshuebner avatar Apr 09 '14 19:04 hanshuebner

@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.

nextmat avatar Apr 10 '14 01:04 nextmat