jmoalves / levain

Something to help you make your software grow
MIT License
8 stars 5 forks source link

action: setProxy - url actions (extract, checkUrl and so on) does not work behind a corporate firewall #114

Closed jmoalves closed 3 years ago

jmoalves commented 3 years ago

We need a new action to inform the proxy URL for levain use. We could define the "HTTP_PROXY" and "HTTPS_PROXY" variables, but this approach does not work for the running levain.

Deno respects these environment variables in the fetch function. However, if we define them in a child process (even using the setx directive at Windows), the running Deno does not read them.

A better approach would be to use a new action setProxy. This action could set the environment variable as well.

Suggested syntax:

setProxy [--setEnv] [--setEnvPermanent] url

jmoalves commented 3 years ago

I think this action is impossible (or at least innocuous). The fetch function does not have an option for proxy url.

https://doc.deno.land/builtin/stable#fetch

jmoalves commented 3 years ago

This action is impossible to implement using Deno 1.8.1.

To circumvent this issue, the user can define the variables outside levain. HTTP_PROXY HTTPS_PROXY NO_PROXY