一. ngrok
1. 注册ngrok账号
2. 然后下载对应系统的安装包或免安装版
3. 下载完打开是一个cmd窗口
4. 登录到ngrok控制台,复制这一段指令到cmd中执行,会自动生成 ngrok.yml 来绑定账号
5. 然后在cmd中输入“ngrok http 端口号”,就可以快捷连接到localhost对应端口,实现内网穿透了
6. 运行指令例子
EXAMPLES:
ngrok http 80 # secure public URL for port 80 web server
ngrok http --subdomain=baz 8080 # port 8080 available at baz.ngrok.io
ngrok http foo.dev:80 # tunnel to host:port instead of localhost
ngrok http https://localhost # expose a local https server
ngrok tcp 22 # tunnel arbitrary TCP traffic to port 22
ngrok tls --hostname=foo.com 443 # TLS traffic for foo.com to port 443
ngrok start foo bar baz # start tunnels from the configuration file