Skip to content

Instantly share code, notes, and snippets.

@paperbenni
Forked from Dalimil/ngrok_url.sh
Created April 6, 2018 14:28
Show Gist options
  • Select an option

  • Save paperbenni/d36b85f3c61c17386cb3c515306f5024 to your computer and use it in GitHub Desktop.

Select an option

Save paperbenni/d36b85f3c61c17386cb3c515306f5024 to your computer and use it in GitHub Desktop.

Revisions

  1. paperbenni revised this gist Apr 6, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ngrok_url.sh
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,4 @@
    # 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 "^http:"
    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://"
  2. @Dalimil Dalimil created this gist Mar 10, 2017.
    5 changes: 5 additions & 0 deletions ngrok_url.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    # 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 "^http:"