Skip to content

Support custom Windows VPN profiles and stable host COM lifetime - #7

Merged
yiguodev merged 3 commits into
mainfrom
feat/platform-host-integration
Oct 9, 2026
Merged

yiguodev merged 3 commits into
mainfrom
feat/platform-host-integration

Conversation

@yiguodev

@yiguodev yiguodev commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add optional profileName to the Windows host bridge's start, status and stop payloads. Omission still selects Vole; explicit names use strict validation and exact package-scoped matching. Bridge version 3 and the single-active-session rule remain unchanged.
  • Keep one process-lifetime MTA reference for cached WinRT factories while balancing each caller's RoInitialize / RoUninitialize. This fixes repeated calls from initially uninitialized threads and sequential worker handoffs without adding a worker queue or changing the public ABI.
  • Canonicalize Android JNI exports and Apple logging under io.github.yuandevteam.vole, and move the TunFraming import behind the relevant platform gates.
  • Update the public contracts and add namespace/COM regressions, including native Windows COM regression coverage in the release workflow.

Compatibility

Android native declarations must use the canonical namespace; no legacy export aliases are retained. Custom profile names do not migrate, rename or adopt other profiles. Host bridge calls remain non-overlapping, and STA callers are still rejected.

Validation

Previously completed locally for these commits on Windows ARM64:

  • 11 Windows host unit tests and 10 script tests.
  • UWP production Clippy, Rust formatting, Python lint/format checks and all-target test compilation with --no-run.
  • ARM64 UWP release build.
  • Four fresh-process native COM regression cases, totaling 528 calls/frees per complete run.
  • 128 serial Dart isolate calls without caller-owned COM initialization.

This is not a full Rust test-suite run or x64/device acceptance. Android JNI loading, Apple device behavior and physical-device interoperability were not tested. Configured release-workflow coverage is not reported as an executed release.

yiguo added 2 commits October 9, 2026 10:39
Add strict profileName selection to Windows VPN lifecycle requests while preserving package ownership and single-session guards.

Use the canonical Android JNI and Apple logging namespace, with updated contracts and regression coverage.
Retain one process-lifetime MTA usage reference for cached WinRT factories while balancing each caller-thread initialization. Preserve STA rejection and prevent guards from moving between threads.

Add isolated native DLL regressions for repeated calls, caller MTA release, worker handoff and STA rejection, and run them before UWP artifact upload.
Copilot AI balanced review requested due to automatic review settings October 9, 2026 06:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

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 ✅ Completed 2026-10-09T06:58:12.941626Z 273f844 New commits
🔒 Security Review ✅ Completed 2026-10-09T07:01:41.658368Z 273f844 New commits
ℹ️ 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.

@yiguodev

yiguodev commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

CI follow-up: native Windows builds and Python setup

The failed ARM64 UWP job completed compilation and packaging, then failed in the COM check. Its Python bootstrap selected an emulated x64 interpreter, which could not load the ARM64 DLL (WinError 193).

This update:

  • Replaces Python bootstrap shell scripts in both workflows with actions/setup-python@v7, selecting the latest stable Python 3. uv uses only system interpreters and cannot download Python.
  • Keeps Windows x64 and ARM64 CLI/UWP/Wintun builds on separate native runners. Python follows the runner architecture, and each UWP job checks only its own DLL.
  • Selects native ARM64 MSVC host tools through vcvarsall arm64, rather than the x64-hosted cross toolchain. Build entry points reject non-native Python and cross-architecture Windows targets.
  • Adds mocked regression coverage for interpreter/host agreement, early cross-target rejection and native MSVC selection, and updates the build/test instructions.

Local Windows ARM64 validation:

  • Fresh-target-directory UWP release build and archive; Wintun FFI and CLI release builds/archives using the same native toolchain. CLI -h, -v, and file/stdin -t checks passed.
  • All four isolated COM regressions passed against the rebuilt DLL, totaling 528 responses freed. Repeated successfully with the installed system-native Python and uv downloads disabled.
  • 13 script tests, Ruff lint/format, two workflow YAML files, 18 Bash blocks and all six Windows matrix entries checked.

No VPN connection or device acceptance was exercised. x64 was not built or executed locally; its validation belongs to the native x64 CI jobs. The final setup-python workflow still requires hosted CI results. Cargo emitted a non-fatal, existing CLI/library PDB filename-collision warning during the local CLI build.

@yiguodev
yiguodev merged commit f616f19 into main Oct 9, 2026
25 checks passed
@yiguodev
yiguodev deleted the feat/platform-host-integration branch October 9, 2026 07: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.

2 participants