ehttp icon indicating copy to clipboard operation
ehttp copied to clipboard

Hello, is there a way to proxify the requests ?

Open deft01 opened this issue 2 years ago • 2 comments

deft01 avatar Dec 31 '22 22:12 deft01

Theoretically, yes.

ehttp is a thin wrapper around ureq and web_sys::Request, and they both support proxied requests.

Try it?

emilk avatar Feb 28 '23 19:02 emilk

On the web, the requests are proxied automatically with the same configuration as the browser. On native, ureq requires the user agent to be configure with the try_proxy_from_env(true) flag.

Additionally, to support proxies with custom SSL bump certificates, you have to enable the native TLS adapter in ureq.

I have need for both of these features, would you be open to adding some way to configure it?

Possibly an easy way to do so without requiring increased API surface would be to have feature flags for using the native TLS store and reading proxy environment variables. You might even be open to using proxy environment variables by default, like reqwest does. ureq doesn't by default because it's a security risk, but that risk obviously depends on the context you're in.

zicklag avatar Oct 04 '23 00:10 zicklag