Skip to content

fix: restore system proxy support, correct rust-version, add delivery tests - #40

Merged
cristipufu merged 1 commit into
mainfrom
fix/system-proxy-msrv-tests
Oct 16, 2026
Merged

cristipufu merged 1 commit into
mainfrom
fix/system-proxy-msrv-tests

Conversation

@cristipufu

@cristipufu cristipufu commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Summary

  • System proxy support is back. Add feature flags for TLS selection #34 turned off reqwest's default features so apps can pick a TLS backend. That also turned off system-proxy, http2 and charset, so since 1.1.0 the plugin has ignored the macOS and Windows proxy settings. Those three are now listed explicitly next to json. Only the TLS default stays off, so default-tls / rustls-tls / native-tls work exactly as Add feature flags for TLS selection #34 intended.
  • rust-version is now 1.85.0. It said 1.81.0, but reqwest 0.13.4 and rand 0.10 need 1.85.
  • Tests for event delivery, run in CI with a new cargo test step (CI only ran cargo check before):
    • events go out in batches of 25
    • after a 5xx or a refused connection, events are kept for the next flush
    • after a 4xx, events are dropped
    • the event payload has the expected format
    • polling flushes on its own
    • an invalid App Key turns tracking off
  • CI fails if OpenSSL comes back: if a default or rustls-tls build for Linux or Android has openssl-sys or native-tls in its dependency tree.
  • Docs: README sections on delivery and proxies, and on the TLS backend features. Matching notes in llms.txt, whose MSRV line also said 1.70.

#34's goal still holds

TLS and proxy crates in the dependency tree (cargo tree -e normal --target <t>). Before → after:

Target default / rustls-tls native-tls
aarch64-linux-android rustls → h2 rustls native-tls openssl-sys → h2 native-tls openssl-sys
x86_64-unknown-linux-gnu rustls → h2 rustls native-tls openssl-sys → h2 native-tls openssl-sys
aarch64-apple-darwin rustls → h2 rustls system-configuration native-tls → h2 native-tls system-configuration
x86_64-pc-windows-msvc rustls → h2 rustls windows-registry native-tls → h2 native-tls windows-registry

OpenSSL still only appears with native-tls on Linux and Android. The proxy crates are only pulled in on macOS and Windows.

Test plan

  • cargo test on stable: 8 passed
  • Broke each retry rule on purpose (requeue 4xx instead of 5xx, drop on network errors, batches of 30): the matching tests fail
  • cargo test on Rust 1.85 (with CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS=fallback): builds and passes
  • cargo check with --no-default-features --features rustls-tls and with --features native-tls
  • OpenSSL guard run locally: passes as is, and fails when pointed at native-tls

Note for #38

src/test_server.rs is #38's test server without the error endpoint url field, plus server_on(listener, statuses). The network-failure test needs it to serve on a port the first flush found closed. When #38 rebases, keep its url field and add server_on. CHANGELOG.md ([Unreleased]) and the [dev-dependencies] section of Cargo.toml will also need small manual merges; a dry-run merge shows everything else merges cleanly.

🤖 Generated with Claude Code

… tests

- Turn reqwest's `charset`, `http2` and `system-proxy` features back on.
  Turning off reqwest's default features for the TLS flags (#34) also
  dropped these, so the plugin ignored the macOS and Windows proxy
  settings. TLS is still chosen with default-tls / rustls-tls /
  native-tls, and rustls builds still don't pull in OpenSSL.
- Set rust-version to 1.85.0: reqwest 0.13 and rand 0.10 need it.
- Add tests for event delivery (batches of 25, 5xx and network failures
  kept for the next flush, 4xx dropped, event format, polling) and App
  Key validation, and run `cargo test` in CI.
- CI fails if a default or rustls-tls build for Linux or Android pulls
  in OpenSSL.
- Document delivery, proxies and the TLS backend features in the README
  and llms.txt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cristipufu
cristipufu merged commit b8e7e2d into main Oct 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant