DEV Community

loading...

Discussion on: How to make your localhost accessible to the internet with ngrok

Collapse
jesse1981 profile image
Jesse Bryant

Sorry, I think there is still some confusion here;

Even if you uninstall ngrok, you always have a public IP address. You can google "whatsmyip" and it will show it to you, and you can use this address to go to the website being served from your machine.

Thread Thread
steventhan profile image
Steven Than

I'm aware each machine connecting to the internet has its own public IP address, but how is it relevant to this post?

When I said:

there's no public IP address on the user side here

I meant ngrok doesn't simply assign a sub domain to the machine's public IP address, it opens a tcp connection and keep it alive using a heartbeat mechanism . This is localhost tunneling in my book. By doing this, ngrok doesn't care if a machine's public IP is dynamic (which is most likely the case unless you explicitly request and pay additional fees to ISPs to obtain a static IP)

Thread Thread
jesse1981 profile image
Jesse Bryant

Ah, I see what you mean now.

Must admit, a description of localhost tunneling didn't make sense to me since the localhost was more like the endpoint (but not of course when the connection being initiated from the client), but the explanation on the link you shared of Stream Multiplexing made it clearer - neat idea.

FWIW, I personally used to use the solution if NoIP, same result, instead that application was just reporting your current IP to the service.