This repos constains Powershell Scripts to control (start/stop) Wsl-Vpnkit instance by a dedicated tray icon.
- dotnet-sdk 6.0.403+ on windows 11+
Download the latest release, unzip to a specific directory and start the wsl-vpnkit-tray.cmd to be able to control the sakai135/wsl-vpnkit wsl2 instance with tray icon.
The start process could take several seconds (less than 20s)...
To automaticly start the tray on windows session startup, you could use the create-startup-shortcut.bat
.
If you change the wsl-vpnkit-tray directory location, you need to rerun the previous script.
Icon | Description |
---|---|
The wsl-vpnkit instance is not detected (this is the startup status) | |
The instance is detected but not started | |
The instance is detected and started |
This script does not install wsl-vpnkit !!
Follow the Setup installation guide on sakai135 wsl-vpnkit home project:
wsl --import wsl-vpnkit $env:USERPROFILE\wsl-vpnkit wsl-vpnkit.tar.gz --version 2
The most important part is the name of the wsl instance you will create when importing the tar.gz file. This name is used by the wsl-vpnkit-tray to control the instance.
It has to be wsl-vpnkit
(as set in the $WslDistributionName
in wsl-vpnkit-tray.ps1
file of this repo).
Otherwise, edit the file and change the variable according to your wsl2 instance name.
In order to ba able to call build.ps1
tasks, we need first import InvokeBuild
powershell module as follow:
PS> Install-Module -name InvokeBuild -Scope CurrentUser
PS> Invoke-Build -File ./.build.ps1 -Configuration 'Test'
# Correct with PSScriptAnalyser
PS> Get-Help Get-ScriptAnalyzerRule -ShowWindow
- Add changes to
./CHANGELOG.md
. - Change the version in
./src/wsl-vpnkit-tray.ps1
(just change themajor.minor.build
part for variable$Version
). - Push to upstream:
git add . && git commit -m "commit message" && git push origin master
. - Run
$Version=(cmd /c powershell.exe .\src\wsl-vpnkit-tray.ps1 --version)
to retreive the version. - Create the tag with the same version
git tag {major.minor.build}
. - Push to upstream:
git push --tags origin master
.
To Sakay135 to build the wsl instance of his path, this works with Cisco Anyconnect using F2A !!!