Skip to content

feat: Android UI for full tunnel mode (3/3) - #95

Closed
vahidlazio wants to merge 1 commit into
therealaleph:mainfrom
vahidlazio:feat/full-tunnel-android
Closed

vahidlazio wants to merge 1 commit into
therealaleph:mainfrom
vahidlazio:feat/full-tunnel-android

Conversation

@vahidlazio

Copy link
Copy Markdown
Contributor

Part 3 of 3: Full Tunnel Mode

Android UI surface for full tunnel mode. Depends on Rust-side Mode::Full (PR #94).

What

  • ConfigStore.kt — Mode.FULL enum, JSON serialization
  • MhrvVpnService.kt — skip credential check for Full mode (merged with upstream ورژن اندروید کرش میکنه #73 startForeground fix)
  • HomeScreen.kt — "Full tunnel (no cert)" in mode dropdown, start button + script ID fields enabled

3 files, 62 insertions

🤖 Generated with Claude Code

@therealaleph

Copy link
Copy Markdown
Owner

Depends on #94 per your PR body. Will review + merge once #94 is rebased, reviewed, and green.

Note: you'll also need to rebase #95 onto main after #94 lands — ConfigStore.kt just got a tiny change from #92 (the accounts.google.com SNI typo fix mirrored on the Android side) that might trivially conflict with your Mode.FULL enum addition.


[reply via Anthropic Claude | reviewed by @therealaleph]

Android-side changes to support Mode::Full in the UI and VPN service.

- ConfigStore.kt: Mode.FULL enum variant, toJson/fromJson serialization
- MhrvVpnService.kt: skip "incomplete config" check for Full mode
  (merged with upstream therealaleph#73 startForeground crash fix)
- HomeScreen.kt: "Full tunnel (no cert)" in mode dropdown, start button
  enabled, script ID fields shown for full mode

Depends on: Rust-side Mode::Full (separate PR).

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@vahidlazio
vahidlazio force-pushed the feat/full-tunnel-android branch from a39469a to 97f1946 Compare April 23, 2026 21:28
therealaleph pushed a commit that referenced this pull request Apr 24, 2026
Adds a new `mode: full` that tunnels ALL traffic end-to-end through Apps Script → a remote tunnel node. Browser does TLS directly with the destination. No MITM, no CA installation needed on the client device.

Ships as part of the 3-PR series: #93 (tunnel-node service + CodeFull.gs, merged) + this (Rust-side Mode::Full + batch tunnel client) + #95 (Android UI dropdown, now rolled into this PR post-rebase).

### Architecture
- Client → mhrv-rs → script.google.com (Apps Script fetch) → tunnel-node on user's VPS → real destination
- Apps Script is the transport to reach the VPS; works even when the ISP blocks direct VPS IPs
- Batch multiplexer collects data from all active sessions and ships one Apps Script request per tick

### Safety properties of this merge
- AppsScript + GoogleOnly dispatch paths are **unchanged**; Full mode is an additive branch at the top of `dispatch_tunnel`.
- `tunnel_client.rs` is a new isolated module (387 LOC).
- `tunnel_request()` is a new method on `DomainFronter`, no change to `relay()` / `relay_parallel_range()`.
- Config: additive `Mode::Full` variant + validation tests (2 new); existing validation rules untouched.
- Local build: clean compile. `cargo test --quiet`: 75 passed (73 → 75 with 2 new config tests).

### Closes
Unblocks the feature requested in #61, #69, #100, #105, #110, #111, #113, #116.

### Testing
vahidlazio has iterated on prior review feedback. End-to-end testing with a real tunnel-node deployment will follow post-merge from @Feiabyte (volunteered in #61). Post-merge CI will exercise compile + full test matrix across all targets; any regression caught there gets a fast-follow fix.
@vahidlazio

Copy link
Copy Markdown
Contributor Author

@therealaleph can we re open this? rebased on main

therealaleph pushed a commit that referenced this pull request Apr 25, 2026
Adds a new `mode: full` that tunnels ALL traffic end-to-end through Apps Script → a remote tunnel node. Browser does TLS directly with the destination. No MITM, no CA installation needed on the client device.

Ships as part of the 3-PR series: #93 (tunnel-node service + CodeFull.gs, merged) + this (Rust-side Mode::Full + batch tunnel client) + #95 (Android UI dropdown, now rolled into this PR post-rebase).

### Architecture
- Client → mhrv-rs → script.google.com (Apps Script fetch) → tunnel-node on user's VPS → real destination
- Apps Script is the transport to reach the VPS; works even when the ISP blocks direct VPS IPs
- Batch multiplexer collects data from all active sessions and ships one Apps Script request per tick

### Safety properties of this merge
- AppsScript + GoogleOnly dispatch paths are **unchanged**; Full mode is an additive branch at the top of `dispatch_tunnel`.
- `tunnel_client.rs` is a new isolated module (387 LOC).
- `tunnel_request()` is a new method on `DomainFronter`, no change to `relay()` / `relay_parallel_range()`.
- Config: additive `Mode::Full` variant + validation tests (2 new); existing validation rules untouched.
- Local build: clean compile. `cargo test --quiet`: 75 passed (73 → 75 with 2 new config tests).

### Closes
Unblocks the feature requested in #61, #69, #100, #105, #110, #111, #113, #116.

### Testing
vahidlazio has iterated on prior review feedback. End-to-end testing with a real tunnel-node deployment will follow post-merge from @Feiabyte (volunteered in #61). Post-merge CI will exercise compile + full test matrix across all targets; any regression caught there gets a fast-follow fix.
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.

2 participants