一 What is ngrok
ngrok is a reverse proxy that creates a secure tunnel from a public endpoint to a locally running web service. ngrok captures and analyzes all traffic over the tunnel for later inspection and replay.
ngrok is a reverse proxy that can establish a secure tunnel from the public network to a local web service. ngrok captures and analyzes all passing data for later inspection and replay.
2. Using ngrok1. Visit the ngrok official website
First visit the ngrok official website https://ngrok.com/ to register an account. After registration, you can get your own account key for later use. Binding operation.
Authtoken |
82GkmZCUpRT1Z4uMLCBZ9_6MqWSeGVuXGU9zeBvFrzv |
2. Click the download link to download ngrok.
According to the operating system , select different versions of ngrok. After the download is successful, place the downloaded file in the specified location. The downloaded file contains ngrok.exe. For example, place ngrok.exe in the d:/example folder and enter the following command.
1 cd d:/example2 3 ngrok authtoken 82GkmZCUpRT1Z4uMLCBZ9_6MqWSeGVuXGU9zeBvFrzv4 5 ngrok http 8080
Note:
Line 1: This command switches to the ngrok installation directory.
Line 3: When using ngrok for the first time, you must first save the secret key obtained from the ngrok official website (authtoken) into the configuration file (ngrok.yml). By default, it is saved to C:Users under the current username/.ngrok2/ngrok.yml.
Line 5: This command represents ngrok listening to all local web applications on port 8080. And generate a network address that can be accessed by the external network. As shown in the figure below
3 Access the generated proxy address
http://bcc20fd4.ngrok.io
or
https://bcc20fd4.ngrok.io