tomnomnom / gron

Make JSON greppable!
MIT License
13.73k stars 325 forks source link

`gron URL` doesn't use the proxy defined in environment #89

Open bew opened 2 years ago

bew commented 2 years ago

Hello!

I need to enable a proxy to contact the global internet, using the variables http_proxy https_proxy & no_proxy (they are described in https://curl.se/docs/manual.html#environment-variables and usually used in other programs as well)

When using gron URL it currently fails with an error while resolving the DNS or trying to contact a non-existant server on our local network.

Could you add this to gron? Thank you

In the meantime I can always download the file, and then gron it, so it's not high priority for me.

akinet commented 2 years ago

Would it be also possible to add a "--proxy" option working as in curl? And "--insecure" ?

dotcs commented 2 years ago

@akinet --insecure is already implemented since version 0.5.0: https://github.com/tomnomnom/gron/blob/13561bd6339bff18ba571e62313b3f5a6db00111/main.go#L64