Skip to content

Instantly share code, notes, and snippets.

@UnSstrennen
Created August 1, 2020 11:53
Show Gist options
  • Save UnSstrennen/7b367710dd0fc7c1a4b152daa804194e to your computer and use it in GitHub Desktop.
Save UnSstrennen/7b367710dd0fc7c1a4b152daa804194e to your computer and use it in GitHub Desktop.
Returns ngrok hostname in format like "ddc8d0860915.ngrok.io"
# based on https://gist.github.com/rjz/af40158c529d7c407420fc0de490758b#gistcomment-2372805
# replace http:// to https:// in start of a command is you need that
echo -n 'http://' && curl --silent --show-error http://127.0.0.1:4040/api/tunnels | sed -nE 's/.*public_url":"https:..([^"]*).*/\1/p'
# http://ddc8d0860915.ngrok.io
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment