ngrok - 一个免费内网穿透api工具

官网: https://dashboard.ngrok.com/get-started/setup/linux

curl -s 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 buster main" \
	| sudo tee /etc/apt/sources.list.d/ngrok.list \
	&& sudo apt update \
	&& sudo apt install ngrok

ngrok config add-authtoken {authtoken}
> Authtoken saved to configuration file: {home}/.config/ngrok/ngrok.yml

# 发布应用
ngrok http http://localhost:8080

输出:

ngrok (Ctrl+C to quit) Try our new Traffic Inspector: https://ngrok.com/r/ti
Session Status online
Account ian (Plan: Free)
Version 3.13.0
Region Asia Pacific (ap)
Web Interface http://127.0.0.1:4040
Forwarding https://ccf7-138-59-113-191.ngrok-free.app -> http://localhost:8011
Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00

访问 https://ccf7-138-59-113-191.ngrok-free.app 就可以用啦.