Localhost tunneling

Sometimes when i work on a project on my laptop, I need to show my boss, workmates, client or just want to test it on my phone. I can do this by taking my development environments(my laptop) to them but what if I’m working on a desktop? Well, I can ask them to come over or ask them to join my network, what if they are thousands of miles away? Well, I can deploy it to the internet but whatt if I’m not just ready? Well, say hello to Localhost Tunneling, my bridge to the outside world!

It is simply a tunnel from an external server (open to the internet) to my local server through the artifacts that separte the two worlds such as NATs and firewalls!
Here is a pictorial representation of how it works.

Some of the most commonly used localhost tunneling tools among developers include:

This is arguably the most popular localhost tunneling tool around. It can be installed via a package manager like npm or downloaded then unzipped to your machine.

Via npm,

$ npm install -g ngrok

Upon successful installation, fire it up by running:

$ ngrok http 80

This will open another bash window with the url forwarding info. Click on the listed urls and you should be able to access your local server publicly. So now, whatever is running on http://localhost (in this case port 80) will be accesible on a uniqie ngrok link say http://92832de0.ngrok.io

Ngrok also provides other advanced features like password protection and creation of custom sub-domains that are reserved for premium users. Check them out on their website.

Not interested in installation headaches and package management? Burrow got your back! Burrow is another tunneling service that makes the whole tunneling process simpler. You simply need to sign up on their platform, confirm your email and create a tunnel. Works like a charm!

However, you are required to upgrade your membership @ $4.99/month to continue using their service for another day.

Here is another amazing local tunneling tool that has been around for a while and popular among the minecraft gamers. To install, you need to ensure that you have python installed on your machine. Then head to Pagekite downloads page to get the appropriate install for your machine.

Here is a quick start for linux users:

$ curl -O https://pagekite.net/pk/pagekite.py

Then,

python2 pagekite.py 80 yourkitename.pagekite.me

One amazing thing with Pagekite is that you can serve your static files without having a local server on your machine. Cool, right?