alexa-cookie icon indicating copy to clipboard operation
alexa-cookie copied to clipboard

Support for running behind proxy

Open cernst1980 opened this issue 4 years ago • 3 comments

I´am using ioBroker behind a proxy server due to security reasons and this module does not currently support using a proxy server which is configured via environment variable HTTPS_PROXY.

Can you please add module https-proxy-agent and use process.env.HTTP_PROXY ad proxy server.

https://www.npmjs.com/package/https-proxy-agent

cernst1980 avatar Apr 22 '21 22:04 cernst1980

Library wise I think reacting on env variables is no option. I can check if it can be provided as a config variable.

Apollon77 avatar Apr 23 '21 08:04 Apollon77

For UNIX/Linux proxy usage can be controlled by using environment variables, that's a standard way. E.g. https://access.redhat.com/documentation/en-us/openshift_container_platform/3.4/html/installation_and_configuration/install-config-http-proxies

As ioBroker does currently not support globally configuring proxies, I tried it that way and it works for most adapters, which mainly use request library. Request library considers the proxy env variables by default. https://github.com/request/request#proxies

Unfortunately, that's not the case for other libraries like https. For these libraries, https-proxy-agent is the answer.

Of course, a config variable is also a good solution, but then all other adapters (which need to connect to the internet) need to support these proxy config...

So the easiest solution is env variable, the better is a global proxy config which all adapters support.

cernst1980 avatar Apr 23 '21 11:04 cernst1980

Hm ... interesting - did't know that from request ... but in fact request is reprecated, so new kids on the block are axios and got and such ... not Ideas how they behave ;-) I need to think about and especially find time :-(

Apollon77 avatar Apr 23 '21 16:04 Apollon77