Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize Port Mapping in Intranet with ngrok

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Today, I will talk to you about how ngrok implements intranet port mapping, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

I finished the connection to https yesterday and configured the request address from the background of the smart speaker developer. Everything is ok, but debugging through the server is still troublesome. The development is completed and deployed to the server. Developer background test, failed. It's too troublesome to do it over and over again. Students who have worked on the official account of Wechat should understand this process.

When Wechat was developed at that time, it provided some local debugging functions. It seems that you need to download the QQ Browser installation plug-in. But now I can't find it. There are also some that use peanut shells for local mapping, but is there a charge? And then I found ngrok.

What problem can ngrok solve?

As described above, we must use a public network address when using Wechat public platform or other needs to configure the request address in the developer backend. If our code is developed, there will be no problem with this. But we definitely need to debug locally. If you want to use the local environment for debugging, you need to use the public network domain name to resolve to the local ip and port. This is what ngrok implements.

Ngrok generates a url accessed by the public network and maps it to our local port. Then we can happily debug the native code.

Use ngrok

First of all, it must be downloaded from the official website of ngrok.

The steps are simple and can be downloaded after logging in. The download speed is indeed very slow! Later, it took some tricks to download successfully) follow the steps after the download is complete.

After setting token, the port can be opened.

Ngrok.exe http 8443

Http 8443 port that is open locally. The generated public network domain names include http and https.

Browsers directly access the generated public network domain name for access testing.

Now the developer backend is configured with a public network access address for local debugging.

After reading the above, do you have any further understanding of how ngrok implements intranet port mapping? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report