Skip to content

fix: bind desktop DNS and process bypass to physical egress - #5

Merged
acking-you merged 2 commits into
devfrom
codex/physical-dns-process-bypass
Oct 17, 2026
Merged

acking-you merged 2 commits into
devfrom
codex/physical-dns-process-bypass

Conversation

@acking-you

@acking-you acking-you commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Desktop process exclusions could connect directly while resolving names at the proxy exit, producing inconsistent CDN destinations. Windows adapter discovery also performed synchronous gateway ARP probing, including against the TUN portal.

Add desktop physical DNS with ordered AliDNS/Tencent DNSPod, adapter DNS and configured fallback. Reuse the interface-bound resolver for excluded processes, handle UDP-to-TCP fallback and DNS truncation, and keep Fake-IP recovery. Windows egress detection reads passive route/adapter snapshots with gateway MAC probing disabled. Platform VPN DNS modes stay separate.

Expose a loopback process matcher that excludes the embedding PID before ancestor matching. Use datagram-aware forwarding for empty/large UDP, retain associations after malformed SOCKS UDP replies, and record interface/endpoints/counts/close reason. Requires acking-you/ipstack#1; CI checks out that exact commit and now runs unit tests.

Validation (Windows, loopback/simulated devices only):

  • cargo test --manifest-path deps/tun2proxy/Cargo.toml --target-dir target — 87 passed.
  • cargo clippy --manifest-path deps/tun2proxy/Cargo.toml --target-dir target --all-targets --all-features -- -D warnings
  • cargo fmt --manifest-path deps/tun2proxy/Cargo.toml -- --check
  • Consumer FFI cargo check -p proxy-ffi --target aarch64-linux-android --locked with local Android NDK.

Reviews covered owner matching and loop prevention; DNS framing/cancellation/old Fake-IP state; then empty/large UDP and observability. The same loopback HTTP/SOCKS/UDP regression fell from about 25 s to 0.43 s after disabling Windows ARP probing. This is a local measurement, not an in-game benchmark.

No proxy wire-format change; existing DNS enum values retain their numeric values. README describes the new opt-in physical mode. No running TUN, routes, system DNS or existing configuration was modified during validation.

Standalone CI uses the consumer's nightly-2026-01-26 toolchain and a committed Cargo.lock with libc 0.2.189. The legacy public-network test matrix now captures its parameters correctly and skips missing proxy credentials or an unavailable IPv6 route explicitly. The twelve combinations were checked offline without starting a TUN. Consumer integration: acking-you/proxy-everything#27.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-17T17:54:28.463626Z b18a809 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@acking-you
acking-you merged commit 3b16fd6 into dev Oct 17, 2026
17 checks passed
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