Windows Service for automatically fixing WSL2 network connectivity issues.
Reference: microsoft/WSL#11600, microsoft/WSL#12399, microsoft/WSL#12303
Maintains WSL2 network by acquiring Npcap device handles (no actual data processing)
- Requires NPcap installed
- With .NET runtime → Run
.\scripts\install.ps1
- Without .NET runtime → Run
.\scripts\no_compile_install.ps1
(pre-built x86_64 version)
- Do not execute scripts from within the scripts directory
- All operations require PowerShell with Administrator privileges
- Do not run the install*.ps1 script without development environment, as it will delete the pre-built files. Use the no_compile_install.ps1 script instead
Script | Function |
---|---|
install.ps1 | Standard installation (.NET required) |
no_compile_install.ps1 | Pre-compiled installation |
uninstall.ps1 | Uninstall service |
install_en.ps1 | English version installer |
uninstall_en.ps1 | English version uninstaller |
Windows 服务程序,用于自动修复 WSL2 网络连接问题。
参考:microsoft/WSL#11600, microsoft/WSL#12399, microsoft/WSL#12303
通过获取 Npcap 设备句柄信息来维持 WSL2 网络连接(无实际数据操作)
- 需要预先安装 NPcap
- 已安装 .NET 运行时环境 → 运行
.\scripts\install.ps1
- 无 .NET 运行时环境 → 运行
.\scripts\no_compile_install.ps1
(使用预编译x86_64版本)
- 请勿进入 scripts 目录内执行脚本
- 所有操作需在管理员权限的 PowerShell 中完成
- 不要在没有开发环境的情况下运行 install.ps1 脚本,会导致pre-built文件被删除 请使用 no_compile_install.ps1 脚本
脚本文件 | 功能 |
---|---|
install.ps1 | 标准安装(需.NET环境) |
no_compile_install.ps1 | 免编译安装(预编译版) |
uninstall.ps1 | 卸载服务 |
install_en.ps1 | 英文版安装脚本 |
uninstall_en.ps1 | 英文版卸载脚本 |