ngrok使用

ngrok 是一个反向代理,通过在公共的端点和本地运行的 Web 服务器之间建立一个安全的通道。

1、Download ngrok

官网:https://ngrok.com

2、Unzip to install

$ unzip /path/to/ngrok.zip

3、Connect your account

$ ./ngrok authtoken <YOUR_AUTH_TOKEN>

4、Fire it up

$ ./ngrok help

$ ./ngrok http 80

5、Open the ngrok inspector

地址:http://localhost:4040 

启动成功,可以使用终端上显示的两个公网url

Session Status                online

Account                       Tzhennan (Plan: Free)

Version                       2.2.8

Region                        United States (us)

Web Interface                 http://127.0.0.1:4040

Forwarding                    http://66d9376e.ngrok.io -> localhost:80

Forwarding                    https://66d9376e.ngrok.io -> localhost:80

Connections                   ttl     opn     rt1     rt5     p50     p90

                              0       2       0.00    0.00    0.00    0.00

HTTP Requests

-------------

猜你喜欢

转载自tzhennan.iteye.com/blog/2418374
今日推荐