之前需要设置好云主机frp端口转发
frp.bat内容:5秒检查一次,如果fprc进程没有就去启动
set srvname="frpc.exe"
@echo off
echo Monitoring %srvname%
:again
tasklist -v | findstr %srvname% > NUL
if ErrorLevel 1 (
mshta vbscript:createobject("wscript.shell").run("cmd /c C:\Users\[my username]\frp\frpc.bat",0)(window.close)&&exit
)
choice /t 5 /d y -n >NUL
goto again
frpc.bat:
C:\Users\[my username]\frp\frpc.exe -c C:\Users\[my username]\frp\Frpc.ini &