Enhance Windows 11 WSL 2 integration - automatically install root CA / doh / hosts#926
Open
ilnytskyi wants to merge 5 commits into
Open
Enhance Windows 11 WSL 2 integration - automatically install root CA / doh / hosts#926ilnytskyi wants to merge 5 commits into
ilnytskyi wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds WSL-aware behavior to warden install so that, when run inside WSL, the generated Warden root CA is also trusted by Windows (host) browsers by importing it into the Windows CurrentUser\Root certificate store.
Changes:
- Add WSL detection and a PowerShell-based Windows certificate import helper.
- Invoke the Windows root CA trust step during
warden installwhen PowerShell is available in WSL. - Document the behavior in
CHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| utils/install.sh | Adds WSL detection + PowerShell logic to import/replace the root CA in the Windows CurrentUser root store. |
| commands/install.cmd | Calls the Windows trust helper during warden install when running under WSL. |
| CHANGELOG.md | Notes the new WSL-to-Windows root CA trust behavior in UNRELEASED. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
* Add Windows DoH and Schannel-compatible cert support * Use doh hostname for Windows DoH endpoint * Auto-enable dnsmasq when DoH is enabled * Use default doh endpoint in changelog examples * Refine DNS-over-HTTPS PKI sidecar * Consolidate DNS-over-HTTPS compose services * Clarify DoH PKI validation comments * Clarify HTTP exception comment * decompose and simplify winows part * better WSL integration * improved windows bridge * typo
Contributor
Author
Contributor
Author
|
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.


Check List
Is your feature request related to a problem? Please describe.
When Warden is installed inside WSL,
warden installcurrently trusts the generated root CA only inside the Linux certificate store. Windows browsers running on the host OS still see the Warden certificates as untrusted, so users have to manually import the CA into Windows before local HTTPS works cleanly.Describe the solution you've submitted
This change detects when
warden installis running inside WSL and, whenpowershell.exeis available, imports the generated Warden root CA into the WindowsCurrentUser\Rootcertificate store. The Linux and macOS trust logic remains unchanged, and the Windows import is idempotent by certificate thumbprint so reruns do not create duplicates.Describe alternatives you've considered
The main alternative was to leave Windows CA trust as a manual post-install step documented in the docs repo. That keeps the install script simpler, but it preserves a confusing failure mode where Warden appears installed correctly inside WSL while Windows browsers still warn on every HTTPS site. Another alternative was to use
Import-Certificate, but the .NET certificate store API worked more reliably from a non-interactive WSL session.Additional context
I validated the resulting certificate trust flow from WSL on a current Windows 11 setup with Firefox, Chrome, and Edge. A matching documentation update has been prepared in the docs repo on branch
codex/wsl-windows-root-ca-docs.