ngrok windows10远程桌面

时间:2024-03-22 09:32:19

笔记本配置太渣,奈何不是大力士,不能把宿舍主机扛来扛去,所以只好想想能不能远程登陆宿舍主机。
花生壳,要钱又限速,于是果断选择免费开源的ngrok。


一、下载ngrok

官网:https://ngrok.com
源码:https://github.com/inconshreveable/ngrok
国内免费服务器:http://ngrok.ciqiuwl.cn

本人是从国内免费服务器下载的,解压后如下
ngrok windows10远程桌面

二、配置

打开 ngrok.cfg文件,进行配置,本人配置如下:

server_addr: “tcp.xiaomiqiu.cn:4443
trust_host_root_certs: false

tunnels:
http:
proto:
http: 8080
subdomain: wense
ssh:
remote_port: 53333
proto:
tcp: 22
mstsc:
remote_port: 55555
proto:
tcp: “127.0.0.1:3389”

其中mstsc下的remote_port为远程桌面的端口,均可根据自己具体需求配置

三、运行

进入ngrok文件目录下,执行 ngrok -config=ngrok.cfg start http ssh mstsc

结果类似下图
ngrok windows10远程桌面

  1. 访问 http://wense.ngrok.xiaomiqiu.cn ,即可打开本地服务器(前提是部署开启了Tomcat服务器)
  2. 远程登陆此主机时,输入 ngrok.xiaomiqiu.cn:55555,即可登陆此主机
    ngrok windows10远程桌面