yisier / nps

在 0.26.10 版本的基础上修改而来的
https://ehang.io/nps/documents
GNU General Public License v3.0
1.84k stars 223 forks source link

写了一个开启关闭隧道的工具 #123

Closed mirror222 closed 6 months ago

mirror222 commented 10 months ago

主要想法是为了避免内网机器受到攻击,平时把隧道关闭,需要的时候再开启, 于是昨天花了一点点时间写了一个命令行工具用于开启关闭隧道。

https://github.com/mirror222/NPSHelper

以下是远程桌面的一个例子:


NpsHelper.exe -h <服务器IP>:8024 -k <Auth_Key> -t <隧道ID>
%windir%\system32\mstsc.exe /v:<服务器IP>:<隧道端口>
NpsHelper.exe -h <服务器IP>:8024 -k Auth_Key -t <隧道ID> -c

当远程桌面窗体关闭后会自动关闭隧道。

当然也可以用在TortoiseSVN 或者其他工具:

image