Make writing a habit together! This is the second day of my participation in the “Gold Digging Day New Plan · April More text challenge”. Click here for more details.

In some special development scenarios, such as the login of wechat applets, it is necessary to obtain the callback information of wechat applets, and the local computer development cannot obtain the callback information on the network, so the Intranet penetration tool is needed.

One internal penetration

Intranet penetrating: Also called NAT penetrating, NAT penetrating enables the packets with a specific source IP address and port number to be correctly routed to the Intranet host without being masked by the NAT device.

The ngrok tool is used as an example to describe the Intranet penetration function

Official website: www.ngrok.cc/

Ngrok is a reverse proxy that establishes a secure channel between a common endpoint and a Web server running locally. It not only provides an extranet to access the Intranet Web host safely, but also can capture all HTTP content requested for easy debugging. It even supports TCP layer port mapping. Simply speaking, it can access local services through the extranet to facilitate local code development.

(The latest version requires real name authentication)

The use of ngrok

1 Add a tunnel

1 Log in to the official website, register your account, and enter the home page

2 Tunnel Management

2.1 Enter tunnel management and purchase a free server

2.2 Setting Your Own Tunnel Information

Set protocol to HTTP, tunnel name to random, domain name to familiar and easy to remember fields, local port to the port number of the related service, and HTTP user name and password to empty

2.3 Viewing Tunnel Information

In tunnel management, you can view tunnel information configured by yourself

2 Used by ngrok clients

Procedure 1 Download the client from the official website or the tunnel management page, select a domestic folder, and open the sunny-Ngrok startup tool

2 Add the client ID, that is, the tunnel ID in the tunnel management list, copy and paste the client ID, and press Enter

The connection is slow. Wait until the Tunnel Status changes to Online