内网穿透工具ngrok的安装和使用

一、安装

1,登录ngrok的官网:https://ngrok.com/download/ 登录可能需要令牌工具,这个需要提前下载好,和现在github令牌认证一样

2,下载ngrok工具

我的是mac电脑,所以这里就描述mac电脑中的安装和使用,官网中会一步一步引导你安装。我的如下

Install ngrok via Homebrew with the following command:

brew install ngrok

Run the following command to add your authtoken to the default ngrok.yml configuration file. 我这里给authtoken用xxxxxx隐藏了

ngrok config add-authtoken xxxxxxx

Deploy your app online

Run the following in the command line. 这个端口是你自己本地服务的端口,我这里是8000 如果你的是8080 你就改成8080

ngrok http 8000

Go to your dev domain to see your app!

https://sullivan-unexhorted-gratifyingly.ngrok-free.dev

好了,这样ngrok内网穿透就配置好了;