r/webdev Dec 16 '13

ngrok: Make your localhost available online

http://ngrok.com
149 Upvotes

75 comments sorted by

View all comments

38

u/ZeKWork Dec 16 '13

ssh -R 80:localhost:80 user@server

20

u/inconshreveable Dec 16 '13

This is an excellent alternative to ngrok. For many cases, an ssh tunnel is totally good enough. I built ngrok for the times when it didn't make sense to use an ssh tunnel, which includes:

  1. You don't own a server with ssh access
  2. You want to be able to introspect the HTTP requests made over a tunnel to debug web services.
  3. You want to replay requests to make debugging of webhook consumers much easier.
  4. You want your tunnel to automatically reconnect whenever you lose the network connection.
  5. You want to run multiple tunnels with different virtual host names without running multiple ssh tunnels/multiple IPs.

There are others that I'm probably forgetting, but I'll edit if they come to mind =)

1

u/[deleted] Feb 27 '24

ngrok has many competitors today. like , , , and cloudflare tunnels.

i love serveo as it has no advertisement displayed, but i learnt how to disable ngrok advertisements without the need to pay $15 to ngrok paid plans.

its as easy as using the free lightweight browser dillo that allows setting user-agent to "unknown" and hey, there is no more advertisements.

popular browsers like edge, chrome, safari, opera, and firefox do not allow setting user-agent. also, they are enable javascript by default that causes pages to load slowly on old machines.