安装 Clash (Windows)
由于 Windows 系统原生不支持 NetBSD,所以需要通过 Windows Subsystem for Linux(WSL)来安装和运行 Clash。
步骤 1: 启用 WSL
- 打开 PowerShell 或 Command Prompt。
- 输入命令:
wsl --version确认 WSL 是否安装。 - WSL 未安装,运行以下命令安装:
dism.exe /install-WindowsFeature:Virtualization wsl --install - 选择默认选项,完成安装。
步骤 2: 安装 NetBSD
- 打开 PowerShell,输入以下命令安装 NetBSD:
powershell -c "Add-WindowsCapabilityPackage -Online -Name Rsat:NetBSD" - 安装完成后,重启 PowerShell。
步骤 3: 安装 Clash
- 在 PowerShell 中,输入以下命令安装 Clash:
pkg install -t /usr/pkg http://pkgsrc.netbsd.org/i386/64bit/All/ - 等待安装完成。
步骤 4: 启动 Clash
- 输入以下命令启动 Clash 服务:
rcctl start clash - 访问
http://localhost:105查看 Clash 界面。
安装 Clash (Mac)
步骤 1: 安装 NetBSD
- 下载并安装 NetBSD 恢复盘(支持 Mac 的版本)。
- 使用 NetBSD 启动虚拟机。
步骤 2: 安装 Clash
- 在 NetBSD 虚拟机中,输入以下命令安装 Clash:
pkg install -t /usr/pkg http://pkgsrc.netbsd.org/amd64/64bit/All/ - 等待安装完成。
步骤 3: 启动 Clash
- 输入以下命令启动 Clash 服务:
rcctl start clash - 访问
http://localhost:105查看 Clash 界面。
安装 Clash (Linux)
步骤 1: 更新包仓库
- 输入以下命令更新包仓库:
pkg update
步骤 2: 安装 Clash
- 输入以下命令安装 Clash:
pkg install -t /usr/pkg http://pkgsrc.netbsd.org/<架构>/64bit/All/<架构>可替换为i386(32位)或amd64(64位)。
步骤 3: 启动 Clash
- 输入以下命令启动 Clash 服务:
rcctl start clash - 访问
http://localhost:105查看 Clash 界面。
使用 Clash 作为 VPN 代理
- 打开
/etc/clash/clash.conf文件,配置代理设置。 - 输入以下命令启动 Clash 代理:
rcctl start clash - 在应用中手动设置代理服务器地址为
..1和端口105。
常用命令
- 启动 Clash:
rcctl start clash - 关闭 Clash:
rcctl stop clash - 重启 Clash:
rcctl restart clash
如果有其他问题,可以参考 Clash 官方文档 或社区资源。









