Skip to content

Commit ab3aeb0

Browse files
feat(ios): full-tunnel VPN app — UI parity, build fix, SNI pool
iOS NetworkExtension full-tunnel client (leaf + FakeIP -> SOCKS5 -> mhrv-rs): - Build: produce the static lib via `cargo rustc --crate-type staticlib`. `cargo build --lib` also links the cdylib, which fails on iOS (undefined ___chkstk_darwin under -nodefaultlibs), aborting the build and leaving a stale .a so device builds never picked up changes. - utun fd: getsockopt(UTUN_OPT_IFNAME) fallback when the KVC keypath returns nil (newer iOS), plus dup() so leaf owns the fd independently. - leaf log level "none" so leaf's tracing init doesn't panic against the already-installed global subscriber; panic hook logs payload + location. - UI: full-tunnel mode, multi deployment IDs, auth key show/hide, SNI pool editor with per-SNI TLS probe, auto-detect Google IP, QUIC/STUN/DoH toggles. - Config import: mhrv-rs:// (zlib) + JSON/TOML, Android-compatible. - Signing team read from a gitignored Local.xcconfig (no team ID in VCS); generated .xcodeproj and build/ are gitignored. - App icon; version from MARKETING_VERSION; iOS README incl. TestFlight steps. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 40b5386 commit ab3aeb0

21 files changed

Lines changed: 3721 additions & 26 deletions

.cargo/config.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Per-target rustflags for cross-compilation.
2+
#
3+
# iOS staticlib build (aarch64-apple-ios):
4+
# -C panic=abort — propagate abort strategy to all crates so they match the
5+
# [profile.release] panic = "abort" setting in Cargo.toml. Without this,
6+
# leaf-ffi (which has its own staticlib crate-type) links panic_unwind and
7+
# conflicts with our abort-strategy staticlib.
8+
# IPHONEOS_DEPLOYMENT_TARGET=16.0 is required so the linker doesn't default
9+
# to iOS 10 and produce version-mismatch errors with leaf's netstack-lwip C
10+
# objects (which are compiled against the current Xcode SDK).
11+
[target.aarch64-apple-ios]
12+
rustflags = []
13+
14+
[target.aarch64-apple-ios.env]
15+
IPHONEOS_DEPLOYMENT_TARGET = "16.0"
16+
17+
[target.aarch64-apple-ios-sim]
18+
rustflags = []
19+
20+
[target.aarch64-apple-ios-sim.env]
21+
IPHONEOS_DEPLOYMENT_TARGET = "16.0"
22+
23+
[target.x86_64-apple-ios]
24+
rustflags = []
25+
26+
[target.x86_64-apple-ios.env]
27+
IPHONEOS_DEPLOYMENT_TARGET = "16.0"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@
44
/config.json
55
.DS_Store
66
/SCR-*.png
7+
8+
# iOS — generated by xcodegen / Xcode, and local signing (never commit team ID)
9+
/ios/MhrvVPN.xcodeproj/
10+
/ios/build/
11+
/ios/Local.xcconfig

0 commit comments

Comments
 (0)