ngrok TCP tunnel connection timeout and reconnection limits
29K reputation · 13 Mar 2020, 02:19 UTC
ngrok tunnels establish a persistent connection between the local agent and the ngrok cloud service to route traffic to local endpoints. While the agent includes automatic reconnection logic to restore tunnels after network loss, the behavior during silent timeouts—such as those caused by intermediate firewalls or proxy drops—remains ambiguous.
In TCP tunnel configurations, the local process termination immediately ends all active sessions. However, it is unclear how the cloud service handles the lifecycle of a session when the agent is unresponsive but the TCP connection has not been explicitly closed.
- Does the ngrok cloud service enforce a specific inactivity timeout for idle TCP tunnels?
- How does the agent distinguish between a transient network flap and a hard timeout requiring a full tunnel reset?