linux
- register & login ngrok account
https://ngrok.com/
- Install ngrok via Apt with the following command
curl -sSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \
&& echo "deb https://ngrok-agent.s3.amazonaws.com bookworm main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list \
&& sudo apt update \
&& sudo apt install ngrok
- Run the following command to add your authtoken to the default ngrok.yml configuration file.
ngrok config add-authtoken <xxx>
<xxx>在官网查看
- deploy your app online
ngrok http 80
写的是你要穿透的ip
ngrok http 8080
- check response message
Session Status online
Account YYT-0901 (Plan: Free)
Version 3.35.0
Region Asia Pacific (ap)
Latency 23ms
Web Interface http://127.0.0.1:4040
Forwarding https://unpurposing-aiko-undiscernably.ngrok-free.dev -> http://172.29.
Connections ttl opn rt1 rt5 p50 p90
4 0 0.00 0.00 30.23 65.39
https://unpurposing-aiko-undiscernably.ngrok-free.dev就是外网可以访问的地址
Top comments (0)