内网穿透工具(将内网与外网连接)

<aside>

➡️ngrok

ngrok | API Gateway, IoT Device Gateway, Secure Tunnels for Containers, Apps & APIs

</aside>

1/ 安装chocolatey

以管理员身份打开Windows PowerShell。

复制并粘贴以下命令到PowerShell中:

PowerShellCopySet-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('<https://community.chocolatey.org/install.ps1>'))

按Enter键执行命令。

等待安装完成。安装成功后,您会看到一条确认消息。

关闭并重新打开PowerShell以使更改生效。

安装完成后,您可以在PowerShell中输入"choco"或"choco -?"来验证安装是否成功。

2/ 安装ngrok

choco install ngrok

3/ 配置ngrok密钥

ngrok config add-authtoken <your_token>

4/ 部署应用到网上

ngrok http <your_app_port>

20240908-665-chrome.png

20240908-659-powershell.png

20240908-660-powershell.png

20240908-666-powershell.png