Tunneling service¶
A tunneling service is a tool that provides a temporary server to expose local development environments to the public internet^[400-devops-02-os-and-linux-basics-network-ngrok.md]. These services generate a public domain name that forwards traffic to a specified port on the user's local machine^[400-devops-02-os-and-linux-basics-network-ngrok.md].
A primary use case for tunneling is to test webhooks and interactive bot development, which require a public endpoint to send data back to the local host^[400-devops-02-os-and-linux-basics-network-ngrok.md].
Functionality¶
The service operates by creating a secure tunnel, often using a simple command line interface^[400-devops-02-os-and-linux-basics-network-ngrok.md]. For instance, to forward HTTP traffic from a public URL to a local server running on port 8080, a user would execute a command such as ngrok http 8080^[400-devops-02-os-and-linux-basics-network-ngrok.md].
The service typically assigns a random public domain (e.g., https://[random-id].jp.ngrok.io) and provides a web interface running on localhost (e.g., http://localhost:4040) to inspect and replay incoming requests^[400-devops-02-os-and-linux-basics-network-ngrok.md].
Usage¶
Tunneling is essential for developing applications that rely on external callbacks, such as:
- Chatbots: Development for platforms like LINE or Telegram^[400-devops-02-os-and-linux-basics-network-ngrok.md].
- Integrations: configuring [[GitHub]] webhooks^[400-devops-02-os-and-linux-basics-network-ngrok.md] or [[Slack]] bots^[400-devops-02-os-and-linux-basics-network-ngrok.md].
Many of these services are offered for free, requiring only account registration via a web interface to obtain an authentication token^[400-devops-02-os-and-linux-basics-network-ngrok.md].
Sources¶
^[400-devops-02-os-and-linux-basics-network-ngrok.md]