-
-
Save paperbenni/d36b85f3c61c17386cb3c515306f5024 to your computer and use it in GitHub Desktop.
Get ngrok URL from command line
This file contains hidden or 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
# ngrok should be running | |
# replace http with https at the end if needed | |
# based on: https://gist.github.com/rjz/af40158c529d7c407420fc0de490758b | |
echo $(curl -s localhost:4040/inspect/http | grep -oP 'window.common[^;]+' | sed 's/^[^\(]*("//' | sed 's/")\s*$//' | sed 's/\\"/"/g') | jq -r ".Session.Tunnels | values | map(.URL) | .[]" | grep "^tcp://" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment