v2偶尔在开机后会报错
FATAL[0000] start service: start clash api: external controller listen error: listen tcp 127.0.0.1:10814: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
去issue里搜了一下,说是因为wsl,hyper-v虚拟机会自动分配端口,v2的端口被占用了。
管理员权限打开cmd/powershell,这个命令重置端口分配并重启即可释放
netsh winsock reset
还可以设置系统动态端口的范围,指定系统的动态端口是从50000 开始 数量为 10000 个
netsh int ipv4 set dynamicport tcp start=50000 num=10000
netsh int ipv4 set dynamicport udp start=50000 num=10000
netsh int ipv6 set dynamicport tcp start=50000 num=10000
netsh int ipv6 set dynamicport udp start=50000 num=10000
之后便可以正常使用了