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

Add proxy support #32

Merged
merged 2 commits into from
Feb 14, 2023
Merged

Add proxy support #32

merged 2 commits into from
Feb 14, 2023

Conversation

dmikusa
Copy link
Owner

@dmikusa dmikusa commented Feb 14, 2023

Adds proxy support to the tool when it downloads dependencies. The ureq library proxy supports the http, socks4, socks4a, and socks5 protocols. We take the configuration through the PROXY env variable. It is intentionally different than the standard HTTP_PROXY because I do not believe the configuration works exactly the same. The ureq library supports configuration in the format <protocol>://<user>:<password>@<host>:port. The binding-tool CLI will read the PROXY env variable and pass that through to ureq.

In addition, binding-tool use rustls, and rustls-native-certs. This reads TLS certificates from the local system store, which means if you need to add or trust additional certificates you can just add them to your OS and the tool will pick them up automatically. If you do not or cannot add the certificate to the system store, you may set SSL_CERT_FILE and point it to a PEM encoded CA certs file which will be trusted instead.

Resolves #20

Signed-off-by: Daniel Mikusa [email protected]

Adds proxy support to the tool when it downloads dependencies. The ureq library proxy supports the http, socks4, socks4a, and socks5 protocols. We take the configuration through the `PROXY` env variable. It is intentionally different than the standard HTTP_PROXY because I do not believe the configuration works exactly the same. The ureq library supports configuration in the format `<protocol>://<user>:<password>@<host>:port`. The binding-tool CLI will read the `PROXY` env variable and pass that through to ureq.

In addition, binding-tool use rustls, and [rustls-native-certs](https://github.com/rustls/rustls-native-certs). This reads TLS certificates from the local system store, which means if you need to add or trust additional certificates you can just add them to your OS and the tool will pick them up automatically. If you do not or cannot add the certificate to the system store, you may set `SSL_CERT_FILE` and point it to a PEM encoded CA certs file which will be trusted instead.

Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa added the enhancement New feature or request label Feb 14, 2023
Signed-off-by: Daniel Mikusa <[email protected]>
@dmikusa dmikusa merged commit f1d95c1 into main Feb 14, 2023
@dmikusa dmikusa deleted the gh_issue_20 branch February 14, 2023 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for HTTP Proxy
1 participant