国际ngrok.com 国内ngrok.cc
工具简介:
Secure tunnels to localhost
”I want to expose a local server behind a NAT or firewall to the internet.”
把NAT/防火墙之后的内网服务器暴露给互联网【端口转发】
本教程使用国内的:
注册完就有自己的授权码your_authentication_code
1.下载ngrok
国内https://ngrok.cc
国外https://ngrok.com/
2.解压
unzip /path/to/ngrok.zip
3.本机使用
(国内)
#查看帮助
./sunny
#启动2条隧道
./sunny clientid c7fb2defb4081919,3e23d14f040b2b12
启动成功则显示
Sunny-Ngrok 官 网 www.ngrok.cc (Ctrl+C 退 出 )
隧 道 状 态 在 线
版 本 2.1/2.1
转 发 tcp://free.ngrok.cc:14728 -> 127.0.0.1:9797
Web界 面 127.0.0.1:4040
# Conn 0
Avg Conn Time 0.00ms
国外ngrok的操作(未实践)
#查看帮助
./ngrok
#保存授权码【保存到硬盘,以后不需要再输入授权码】
./ngrok authtoken 259f8abc92c413a8
#启动2条隧道
## 内网机器做HTTP请求记录器
在内网机器执行即可 会把内网机器的80端口web服务 放到外网端口 如xx.ngrok.cc:12223
ngrok.exe http 80
网友评论