Repository navigation
fix(windows): recover Wintun restarts on legacy Windows - #8
Merged
Merged
Conversation
Wintun 0.14.1 ignores requested interface GUIDs before Windows 10. Reopening such an adapter therefore fails the fixed-GUID validation. Skipping validation alone would reuse a device still owned by the old process and expose the new session to Wintun's orphan cleanup. Use RtlGetVersion to gate requested GUIDs to Windows 10 and later. When a GUID was requested on an older system, create a fresh adapter without one. Preserve the existing reopen behavior for callers without a GUID and the fixed-GUID recovery path on modern Windows. Keep the official Wintun DLL and accept legacy network-profile number growth. Do not change adapter persistence or remove network profiles. Validated the same MSVC EasyTier binary on Windows 7 SP1 and Windows 11 with the official Wintun 0.14.1 DLL. Each OS passed five normal exits (exit code 0) and five forced-termination restart rounds, including IP assignment and five seconds of active interface/session observation. Windows 11 retained the requested GUID throughout. Windows-targeted Clippy and formatting also passed; existing library warnings remain.
KKRainbow
added a commit
to EasyTier/EasyTier
that referenced
this pull request
Oct 30, 2026
Use rust-tun v2 commit 43621f7 after EasyTier/rust-tun#8 was squash merged. Update both the manifest and lockfile from the feature-branch revision to the merged revision. The merged source tree matches tested a8ad3eb exactly. Reuse the Windows 7/11 runtime results and full-workspace Clippy results. Locked resolution of the merged dependency and formatting passed.
KKRainbow
added a commit
to EasyTier/EasyTier
that referenced
this pull request
Oct 30, 2026
* fix(windows): update tun for legacy Windows restart recovery Pin tun-easytier to a8ad3eb so legacy Windows creates a fresh Wintun adapter instead of reopening one whose requested GUID was ignored. This fixes the GUID mismatch on subsequent starts without changing network-profile numbering or the modern Windows fixed-GUID behavior. The dependency keeps the official Wintun DLL and preserves the existing reopen path for callers that do not request a GUID. Validated the resulting core on Windows 7 SP1 and Windows 11: each OS passed five Ctrl+C exits and five forced-termination startup rounds, with IP assignment and an active interface/session for five seconds. Normal exits returned zero; Windows 11 kept its fixed GUID. Cross-node data forwarding and Windows 8/8.1 were not exercised. Formatting and full-workspace Clippy with all targets, full features, and warnings denied passed against the published locked Git revision. * fix(windows): pin merged Wintun restart fix Use rust-tun v2 commit 43621f7 after EasyTier/rust-tun#8 was squash merged. Update both the manifest and lockfile from the feature-branch revision to the merged revision. The merged source tree matches tested a8ad3eb exactly. Reuse the Windows 7/11 runtime results and full-workspace Clippy results. Locked resolution of the merged dependency and formatting passed.
zzxym
pushed a commit
to zzxym/rust-tun
that referenced
this pull request
Nov 14, 2026
Wintun 0.14.1 ignores requested interface GUIDs before Windows 10. Reopening such an adapter therefore fails the fixed-GUID validation. Skipping validation alone would reuse a device still owned by the old process and expose the new session to Wintun's orphan cleanup. Use RtlGetVersion to gate requested GUIDs to Windows 10 and later. When a GUID was requested on an older system, create a fresh adapter without one. Preserve the existing reopen behavior for callers without a GUID and the fixed-GUID recovery path on modern Windows. Keep the official Wintun DLL and accept legacy network-profile number growth. Do not change adapter persistence or remove network profiles. Validated the same MSVC EasyTier binary on Windows 7 SP1 and Windows 11 with the official Wintun 0.14.1 DLL. Each OS passed five normal exits (exit code 0) and five forced-termination restart rounds, including IP assignment and five seconds of active interface/session observation. Windows 11 retained the requested GUID throughout. Windows-targeted Clippy and formatting also passed; existing library warnings remain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows 7, the first EasyTier start succeeds, but a subsequent start
can fail with
Wintun adapter <name> has a different GUID. Wintun 0.14.1does not retain the requested interface GUID on this OS, so the fixed-GUID
reopen check rejects the existing adapter.
Detect the real Windows version with
RtlGetVersionand request a fixedGUID only on Windows 10 and later. When an older system receives a GUID
request, create a fresh adapter without a requested GUID. This also avoids
reopening a device still owned by the previous process, which could later
be removed by Wintun's orphan cleanup. Callers without a GUID request
retain their existing reopen behavior. The modern Windows fixed-GUID
validation and recovery path stays unchanged.
The change uses the official Wintun DLL and accepts legacy Windows
network-profile numbering. It does not add adapter persistence or
network-profile cleanup.
Companion EasyTier PR: EasyTier/EasyTier#2780.
Validation
The same MSVC EasyTier executable was tested with the official
Wintun 0.14.1 DLL:
Each round verified TUN readiness, the expected IPv4 address, and a
connected interface with the core still running after five seconds.
No normal-exit round needed a fallback kill. Windows 11 retained the same
requested GUID throughout.
and warnings denied against this published Git revision.
Windows 8/8.1 and cross-node data forwarding were not exercised.