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 native-certs feature flag #3

Merged
merged 3 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Build with features
run: cargo build --features native-certs --verbose
- name: Run tests
run: cargo test --verbose
fmt:
Expand Down
84 changes: 84 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ keywords = ["crates", "cargo", "registry", "proxy", "cache"]
categories = ["development-tools", "caching", "web-programming::http-server"]
readme = "README.md"

[features]
native-certs = [ "ureq/native-certs" ]

[dependencies]
tiny_http = "0.12"
httpdate = "1.0"
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,13 @@ Environment:
CRATES_IO_PROXY_CACHE_TTL same as --cache-ttl option
```

Advanced configuration
----------------------

By default, `crates-io-proxy` uses embedded TLS trusted root certificates.
It is possible to configure it to use the system certificate store
at the build time by setting the `native-certs` feature flag.

Configuring this behavior at the run time is not supported yet.

[crates.io index]: https://github.com/rust-lang/crates.io-index
Loading