Skip to content

Commit c9ac5bc

Browse files
therealalephclaude
andcommitted
fix(test): refuse Test Relay in full mode rather than silently apps_script (fix #160)
Issue #160 (deniz_us): Test Relay returned a Google-datacenter IP even when mode=full and the user's tunnel-node was clearly working in the browser. The reason: test_cmd::run unconditionally calls fronter.relay() which is the apps_script-mode path; it doesn't go through the tunnel mux at all. Result was a worst-of-both-worlds silent fallback — looked like a successful Test, but the IP it returned was nothing to do with the user's actual data plane. Same shape of fix as the existing google_only branch: detect Mode::Full and return a clear error explaining that Test isn't wired for full mode, plus how to verify the tunnel-node manually (whatismyipaddress.com via 127.0.0.1:8085) — at least until a real full-mode test using the tunnel mux gets implemented. Following up #160 to track the real fix as an enhancement. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f4eb166 commit c9ac5bc

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

src/test_cmd.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,28 @@ pub async fn run(config: &Config) -> bool {
2828
tracing::error!("{}", msg);
2929
return false;
3030
}
31+
if matches!(config.mode_kind(), Ok(Mode::Full)) {
32+
// Issue #160: Test Relay used to silently fall through to the
33+
// apps_script path here, which made it look like the user's
34+
// tunnel-node was being used when it wasn't. The probed IP came
35+
// back as the Apps Script datacenter — confusing because it
36+
// disagreed with what whatismyipaddress.com showed in the
37+
// browser (which DOES go through the tunnel). Rather than fake
38+
// a passing test, refuse the same way we do for google_only and
39+
// tell the user how to actually verify Full mode.
40+
let msg = "`mhrv-rs test` is wired only for the apps_script relay \
41+
path. In full mode the data plane is the pipelined \
42+
tunnel mux talking to your tunnel-node — Test Relay \
43+
would bypass that and probe Apps Script directly, \
44+
which is misleading. To verify full mode end-to-end, \
45+
start the proxy and load https://whatismyipaddress.com \
46+
in your browser via 127.0.0.1:8085 (HTTP) or :8086 \
47+
(SOCKS5) — the IP shown should be your tunnel-node's \
48+
VPS IP. Tracking a real Full-mode test in #160.";
49+
println!("{}", msg);
50+
tracing::error!("{}", msg);
51+
return false;
52+
}
3153
let fronter = match DomainFronter::new(config) {
3254
Ok(f) => f,
3355
Err(e) => {

0 commit comments

Comments
 (0)