Ngrok内网穿透

Ngrokn内网穿透


官网介绍

点击进入官网地址

百度词条说:ngrok 是一个反向代理,通过在公共的端点和本地运行的 Web 服务器之间建立一个安全的通道。ngrok 可捕获和分析所有通道上的流量,便于后期分析和重放.

其实说白了就是一句户:将本地主机作为服务器,通过内网穿透技术让外网访问本机上面的项目和文件。

  • 官网的示例
    官网示例

操作

  • 非常简单,在window系统Win+R键然后回车打开命令行执行下面的命令。
    ngrok http 80

就是将80端口的地址映射出去。如果你想要开放其他端口比如说3000,把80改成3000即可。官网的原文如下所说:

  • 1 Expose a local web server to the internet
  • 2 ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on.
  • 3 If you don’t know what port your web server is listening on, it’s probably port 80, the default for HTTP.
  • 4 When you start ngrok, it will display a UI in your terminal with the public URL of your tunnel and other status and metrics information about connections made over your tunnel.
ngrok by @inconshreveable

Tunnel Status                 online
Version                       2.0/2.0
Web Interface                 http://127.0.0.1:4040
Forwarding                    http://92832de0.ngrok.io -> localhost:80
Forwarding                    https://92832de0.ngrok.io -> localhost:80

Connnections                  ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00

访问

浏览器直接打开 http://92832de0.ngrok.io。如果部署的项目在Tomcat或者Apache等web服务器上,打开之后在链接之后加上相应的访问地址就可以访问到项目。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值