如何使用 python 启动 ngrok 并复制公共链接只是执行 python 脚本?
我尝试使用子进程,但我只启动了“ngrok http 80”命令,我想复制公共链接。
使用
pyngrok
pip install pyngrok
from pyngrok import ngrok # Open a HTTP tunnel on the default port 80 # <NgrokTunnel: "http://<public_sub>.ngrok.io" -> "http://localhost:80"> http_tunnel = ngrok.connect()