Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
set BAT=%~0
@if "%1"=="R" (
FOR /F "tokens=3 usebackq" %%i in (`netstat -rn ^|findstr /R "\<0\.0\.0\.0" ^|findstr 172`) do (
echo the IP is %%i
route delete 0.0.0.0 mask 0.0.0.0 %%i
route add 172.16.0.0 mask 255.240.0.0 %%i
goto exit_for
)
:exit_for
)else (
REM 管理者モードになって、デフォルトルートの設定を調整
powershell start-process %BAT% R -verb runas
REM 以下はwstunnelの設定各自書き換えること
start/min cmd /c wstunnel -t 53389:172.19.180.33:3389 ws://172.19.180.203/p/12828
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment