Closed hslatman closed 11 months ago
Hey, thanks for the contribution. Unfortunately I use WSL2 instead of native Windows and I have no interest in maintaining native Windows support, so I'm going to close this. If more people start asking for this I may consider re-opening.
This PR adds support for running
localias
on native Windows. The Windows hosts file is determined relative from theSystemRoot
environment variable. Changes to the hosts file are written in a similar manner as the WSL implementation.@peterldowns I'm curious if you would like this to (re)use the PowerShell scripts, for both installing the root cert, as well as writing the actual hosts file, so that it works similar to the WSL implementation. If so, I might move the scripts around a bit, so that they can be used by both packages.
Haven't tested all functionalities yet, but the basics seem to work. ~The admin socket may need some scrutiny, as using
localias.exe run
and then usingctrl-c
to quit, leaves the socket in place.~ Probably just needs some cleanup at the end of therun
loop (and/or force some cleanup if not already running, similar to how a new daemon is not started if it's already running).