Tool address: github.com/Yi-love/dns…

NPM install dns-proxy-server -g

I think this should be a very practical tool. During development, we need to configure IP to access the domain name of the test environment.

Use the computer development test is fine, directly use Switch hosts! Change the domain name IP address to access the domain name website of a specific IP address.

So how do you make it as easy as possible to access the test environment on your mobile phone?

How can a mobile phone access a specific IP domain name on the Intranet?

To access the domain name of the test environment, all we need to do is to establish a proxy service, and then the mobile phone can access the domain name of the test environment through the proxy service.

Common proxy methods:

  1. Request broker
  2. DNS agent

Request broker

Nothing more than acting as a middleman, accessing the test environment domain name on behalf of the phone, and then sending the request results back to the phone. If the proxy is HTTP request fine, encounter HTTPS request proxy can not be so effective. Fiddler can configure certificate proxy HTTPS requests, but the results are not satisfactory and the failure rate is high.

DNS agent

A SMALL DNS proxy is a DNS resolution service, and a large DNS proxy is a domain name system.

The DNS proxy only tells the phone which IP is currently accessing the domain name. DNS proxy access will not participate in the direct request proxy for the phone and test environment domain name.

So the big difference between request proxy and DNS proxy is that the request proxy participates in the request and DNS does not.

Why is A DNS proxy needed

There are a lot of embedded pages in the app (all HTTPS requests). If you use the request proxy, you may not be able to log in to the app. DNS is more suitable.

However, the DNS proxy cannot see the request data. Therefore, the DNS cannot capture packets.

Use the dns-proxy-server service

Dns-proxy-server is written natively using Node.js. Very convenient to use. It is very suitable for the front end to preview embedded pages in the mobile app.

Test environment, development machine and mobile phone should be kept in the same LAN.

Installation:

npm install dns-proxy-server -g

Use:

dnsproxy[ ip[ port]]

Example: DNSProxy 172.28.24.1

MAC users need to use sudo dnsproxy [IP [port]]. Because DNS is bound to machine 53 port.

With the Switch hosts! Cool crooked !!!! .

Looking forward to

As mentioned above, this is a small DNS proxy, which can be used as a DNS domain name service.

Welcome to star: github.com/Yi-love/dns…