Repository navigation
Replace toxiproxy_rust with an in-repo Toxiproxy HTTP client - #98
Merged
makrisoft merged 1 commit intoNov 6, 2026
Conversation
toxiproxy_rust depends on reqwest 0.11, which pulls in the vulnerable h2 0.3 (RUSTSEC-2026-0258) and the unmaintained rustls-pemfile (RUSTSEC-2025-0134). toxiproxy_rust has been a dev-dependency since 0.8.1, so this change does not affect users of 0.8.1 or later. Versions 0.5.0 to 0.8.0 list it as a normal dependency; their users drop it by upgrading. tests/support/toxiproxy.rs now sends Toxiproxy API requests itself: HTTP/1.0 over std::net::TcpStream, with serde_json bodies. The fixture and proxy methods keep their names. Stream names are now &str. A non-2xx Toxiproxy response now fails the test. toxiproxy_rust ignored HTTP errors, so a test could pass without its toxic. toxiproxy_api_errors_fail_the_test covers this case. with_down sends PATCH, because Toxiproxy 2.11.0 deprecates POST for proxy updates. apply resets the fixture's own Toxiproxy process, which removes all toxics and enables the proxy.
makrisoft
force-pushed
the
ernie.am-4-replace-toxiproxy-rust-with-an-in-repo-toxi-thr_55kjsxa42f
branch
from
November 6, 2026 11:03
cd8d3c2 to
0ad0dc2
Compare
jacobsteves
approved these changes
Nov 6, 2026
mkcny
approved these changes
Nov 6, 2026
makrisoft
deleted the
ernie.am-4-replace-toxiproxy-rust-with-an-in-repo-toxi-thr_55kjsxa42f
branch
November 6, 2026 15:42
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR - What are you trying to accomplish?
Remove the
toxiproxy_rustdev-dependency. It pulls inreqwest0.11, which depends on the vulnerableh20.3 (RUSTSEC-2026-0258) and the unmaintainedrustls-pemfile(RUSTSEC-2025-0134).Details - How are you making this change? What are the effects of this change?
tests/support/toxiproxy.rsreplacestoxiproxy_rustwith a small Toxiproxy HTTP client: HTTP/1.0 overstd::net::TcpStream, withserde_jsonbodies. The fixture and proxy methods keep their names. Stream names are now&str.tests/support/toxiproxy.rsis thetoxiproxy_rusthalf of Fix cargo audit findings #96 (32dcffb) with these changes:with_downsendsPATCH, because Toxiproxy 2.11.0 deprecatesPOSTfor proxy updates.PATCH /proxies/memcached failed: Connection refused (os error 61).Proxy::listenis private.dsn()gives the address.applydoc comment says that the reset also enables the proxy.maincomment aboveToxicMemcached::new, which32dcffbremoved. The client still does blocking I/O.toxiproxy_rustignored HTTP errors, so a rejected toxic went unnoticed. For example, the slicer test passes without its toxic.toxiproxy_api_errors_fail_the_testcovers this case and fails onmain.applyresets the fixture's own Toxiproxy process. The reset removes all toxics and enables the proxy.toxiproxy_rustonly deleted the toxics.mainCargo.lockpackagescargo auditcargo tree -itoxiproxy_rust / reqwest / hyper / h2 / rustls-pemfiledid not match any packages./scripts/test-integration.shpasses with memcached 1.6.41 and Toxiproxy 2.11.0. All 12 resiliency tests pass.