The idea that ngrok and similar services are using is the following… — andreyka26_se — TG.ME

andreyka26_seYou know this meme, when vibecoder tells someone: "I have created an app check it here localhost:8000/home"? Let grandad Andrii tell you how we did it in the past 😂. Back in 2018 I was on bootcamp and we (backend) need to expose endpoints for frontend to…
The idea that ngrok and similar services are using is the following:

Since nothing can reach 127.0.0.1 on your computer, routers wouldn't even route that, and ngrok server with assigned IP still will not be able to do so -> let's reverse it.

Let's create TCP connection from the local machine to the ngrok server and just not close it. Ngrok server receives incoming socket connection which can be used to send data BACK to local machine. But ofc, your app shouldn't know the details of how to open such connection -> therefore there is ngrok agent that does that (the one you run and configure on your pc)

Remember, ngrok server has ip and domain name -> so it is reachable. Now your frontend friend can send req to ngrok server with id of your app. Ngrok server looks up app id and resolves the connection of the agent which is used to forward frontend friend request. Agent, as it is locally set up on your machine, forwards it to your localhost.

#network
❤5
October 13, 2026 261 2