手工用命令行启动 clash

201 天前
 rshun

启动脚本

@echo off 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "127.0.0.1:7890" /f >nul 2>nul
cd %userprofile%\.config\clash
powershell -WindowStyle Hidden -Command "& {C:\Tools\clash\clash-windows-amd64.exe -f config.yaml}"

关闭脚本

@echo off 
taskkill /F /IM clash-windows-amd64.exe
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f >nul 2>nul
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /d "" /f >nul 2>nul
1138 次点击
所在节点    分享发现
3 条回复
AoEiuV020JP
201 天前
改注册表设置代理这个效果不大好,有可能需要重启生效,还不如手动改,或者我是用 sysproxy.exe 修改系统代理,
rshun
201 天前
不需要重启系统,我一直都是手工启的
SenLief
201 天前
没必要吧。win 自己有启动平台的,不过我还是喜欢用 nssm 。
sudo nssm.exe start clash

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/987965

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX