Created
October 23, 2021 00:35
-
-
Save maxfire2008/1ffbfa83702098f0a2b2b494447e7e1f to your computer and use it in GitHub Desktop.
ngrok get url
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prints ngrok.io tunnel name and port for miencarft to stdout | |
import os | |
import requests | |
os.system("pgrep -x ngrok > /dev/null && echo > /dev/null || ngrok tcp 25565 > /dev/null &") | |
print(json.loads(requests.get("http://127.0.0.1:4040/api/tunnels").content)["tunnels"][0]["public_url"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment