Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic support for *_proxy #33

Open
jerome-jutteau opened this issue Oct 11, 2023 · 1 comment
Open

Automatic support for *_proxy #33

jerome-jutteau opened this issue Oct 11, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@jerome-jutteau
Copy link
Contributor

jerome-jutteau commented Oct 11, 2023

Hi,

Several tools would need to have support for proxy. The easiest way to globally add this support is to add it to SDKs.

When talking about proxy support, we are talking more precisely about those env variables:

  • http_proxy / HTTP_PROXY
  • https_proxy / HTTPS_PROXY
  • no_proxy / NO_PROXY

(notes about no_proxy)

Rust sdk uses reqwest which seems to have native proxy support enabled by default:

System proxies are enabled by default
System proxies look in environment variables to set HTTP or HTTPS proxies.

For some reason, those proxy variables seems not to be used as is in osc-cost (see #97).

SDK examples seems to suffer the same problem as well.

@jerome-jutteau jerome-jutteau added the enhancement New feature or request label Oct 11, 2023
@jerome-jutteau
Copy link
Contributor Author

jerome-jutteau commented Oct 11, 2023

Seems like the Rust SDK generator uses reqwest 0.9.24 which does not support system proxy by default but can be enabled using use_sys_proxy. Doc adds:

** NOTE** System proxies will be used in the next breaking change.

Two options:

  • Upgrade generator: may cause breaking change and some security issues are spoted
  • Stick on this reqwest version but patch SDK post-generation to include use_sys_proxy() in request builder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant