پارسی
Back to blog

Introducing ngrok, the best “introspected” internet tunnel to localhost

March 23, 2014, posted in Review.

Tags: , , , , , ,

I’m usually more of a person that spends time for writing negative reviews or complaining about something that I can’t do anything other than sharing my bad experience in order to prevent others from going through the same, but this service that I came across today deserves something good!

It’s a pretty simple thing for those that understand it or in someway have any needs for it so I won’t be getting into details and compiling an instruction manual for it as you can pretty much find all you need in a couple of lines on ngrok’s website.

What is ngrok about?

Secure internet tunnels to localhost with ngork

As a web developer myself, while I’m creating something new or wanting to update my own websites and web services, I’ll be running it on my local LAMP (or better to say XAMP in my case).  Here’s where ngrok comes in handy. When I want to:

  • Show the demo to someone over the internet
  • Share it with my team
  • Test the API or some service from another website(or someone on my team)
  • Understand what is going on in the requests and how they are being handled
  • Debugging the app
  • Repeating/replaying a specific request

Usually, I’ll have to upload it all to some live server, reconfigure everything, duplicate the database & … in order to achieve the above + I’ll have to include some additional debugging functions or use additional tools to monitor/manipulate the requests. This all takes extra time and it’s not something that we all have.

Now that I know ngrok (although I already knew 2-3 other commercial and free services such as localtunnel), I simply type in a couple of words and walla! instead of http://localhost/something or http://127.0.0.1:45000 I get http://some-sub-domain.ngrok.com and ngrok.com:someport. At the same time I can choose a custom subdomain, redirect traffic to different ports and also get a detailed view on the requests being handled and the responses + the possibility to replay a specific request in whatever order that I want. As simple as that I have opened a tunnel, my website/ service is accessible from anywhere and  I have access to some very simple yet useful debugging and monitoring tools! All that without having to upload and reconfiguring everything elsewhere.

ngrok supports https and you can also set a username and password to limit the access.

All the above services are free and the server and client software are also open source.

There are additional paid services for using subdomains of your own domains or reserving ngrok subdomains specifically for yourself. The suggested annual price for this is only $25 at the moment.

2 Comments

Tony G April 11, 2015 - 11:03 pm

You might want to do a global change from “ngork” to “ngrok” on this page. :)

Reply

Nima April 11, 2015 - 11:17 pm

One big bad repeated typo. Thanks :)

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *