How to use proxy ?
fukttt opened this issue · 1 comments
fukttt commented
How to use proxy ?
Hirevo commented
Hi !
Are you asking how to proxy the HTTP requests made by this library through another server ?
If so, this library allows you to freely configure your HTTP client (reqwest::Client
) before passing it over to be used by mega::Client
.
This means that you can use the proxying features of reqwest
to make this work, like so:
let http_client = reqwest::Client::builder()
.proxy(reqwest::Proxy::all("http://pro.xy")?)
.build()?;
let mega_client = mega::Client::builder()
.build(http_client)?;
// Every HTTP/S requests made by this `mega_client` shall now be proxied accordingly.
You can get more information about how proxying works within reqwest
in its dedicated docs.rs page.
Sorry for the delay of this response and I hope this helps.
Feel free to comment again if this answer doesn't solve your issue.