Skip to content

fix: allow loopback relay in proxy config test - #146

Merged
Itsusinn merged 2 commits into
mainfrom
fix/proxy-config-test-loopback
Aug 4, 2026
Merged

fix: allow loopback relay in proxy config test#146
Itsusinn merged 2 commits into
mainfrom
fix/proxy-config-test-loopback

Conversation

@Itsusinn

@Itsusinn Itsusinn commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the CI failure in the proxy_config integration test (test_client_proxy_configuration) that has broken every test-running job since commit 0cdb82a ("tests: return error", run 806+), including the linked run 810.

Root cause

The test starts a tuic-server without overriding experimental. ExperimentalConfig defaults to drop_loopback = true / drop_private = true (crates/tuic-server/src/config.rs), and TuicRouter::do_route rejects loopback/private targets before consulting the ACL (crates/tuic-server/src/wind_adapter.rs). So the server always refused to connect to the 127.0.0.1 echo server, the SOCKS5 relay chain never succeeded, and the check was silently soft-logged ("may be expected") until 0cdb82a turned it into a hard assert!.

All other integration tests (quiche_server_config / quinn_server_config in crates/tuic-tests/src/lib.rs) explicitly set drop_loopback: false, drop_private: false — this test was the lone outlier (its unused ExperimentalConfig import, masked by #![allow(unused_imports)], hints the override was intended).

Fix

Mirror the shared helpers: set experimental: ExperimentalConfig { drop_loopback: false, drop_private: false } on the test's server config.

Verification

  • CI history: run 805 (55016ce) ✅ → run 806 (0cdb82a) ❌; the only behavioral change is this assert.
  • Locally built and ran the test on i686-pc-windows-msvc and x86_64-pc-windows-msvc (quiche/BoringSSL included):
    • Without the fix: Bi stream error: connection rejected: loopback address rejected: 127.0.0.1:...
    • With the fix: server accepts + authenticates, TCP connect forwarded, echo server receives and echoes the data.
  • cargo +nightly fmt --all -- --check passes; diff is 7 insertions in one file.
  • Note: full E2E green is best confirmed by CI on this PR (the local host has an unrelated environment quirk in the TUIC return path that also fails the CI-passing quinn_zero_rtt/concurrency tests locally; CI at run 805 was green on all platforms).

Follow-up (not in scope)

tuic-client's relay.proxy (SOCKS5 proxy for the client's QUIC connection) is parsed in config.rs but never consumed — the client always connects directly, so this test exercises a plain relay chain rather than an actual proxied connection. Implementing the feature would be a separate change.

Assisted-by: Reasonix:deepseek-v4-flash

The SOCKS5-proxy-configuration integration test starts a TUIC server
without overriding `experimental`, so the default drop_loopback /
drop_private guards reject the 127.0.0.1 echo target before the ACL is
consulted (crates/tuic-server/src/wind_adapter.rs). The relay chain has
therefore never succeeded since the wind-based rewrite, but the failure
was only soft-logged until 0cdb82a turned it into a hard assert, which
broke CI (run 806+).

Mirror the other integration tests (quiche_server_config /
quinn_server_config) by setting drop_loopback/drop_private to false.

Assisted-by: Reasonix:deepseek-v4-flash
@Itsusinn
Itsusinn merged commit 24b65dc into main Aug 4, 2026
23 checks passed
@Itsusinn
Itsusinn deleted the fix/proxy-config-test-loopback branch August 4, 2026 12:20
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