一键安装包,在上一篇里面已经说了。
教程地址:
http://www.sunnyos.com/article-show-66.html
安装完成以后,用命令
sh ./ngrok.sh
然后,就是客户端,客户端在一键包里也集成了,直接编译一个客户端
主要是客户端的使用:
可以参考教程:
http://www.sunnyos.com/article-show-61.html
主要步骤是,下载编译的客户端到本地,建立一个本地配置文件
文件内容包含:
server_addr: "server.ngrok.cc:4443"
tunnels:
sunny:
subdomain: "sunnyos"
auth: "sunny:admin1993"
proto:
http: 192.168.1.108:80
sunny1:
subdomain: "sunnyos1"
proto:
http: 192.168.1.104:80
ssh:
remote_port: 50000
proto:
tcp: 192.168.1.120:22
test:
hostname: "test.sunnyos.com"
proto:
http: 80
test1:
hostname: "sunny.com"
proto:
http: 192.168.1.104:80
test2:
hostname: "www.sunny.com"
proto:
http: 192.168.1.104:80
最后启动的时候,可以使用
Ngrok --help
来看命令。
我本地用了一个
ngrok -config=./ngrok.cfg start ben
这里要助理,cfg里不支持tab空格,要用空格,有点坑。