When developing the program, it is necessary to send the data sent to ABC.com to the local to facilitate testing.
The simplest method is to modify the abc.com directly in the program and modify it to the desired address.
However, when committing the code, it is easy to submit the debug address to the server.
or embedded device is not convenient to modify the address.
So think of it from the DNS above.
1. Run dnsagent on the PC to enable the DNS proxy feature.
2. Modify the router configuration, use a custom DNS address, point to the machine running DNS server.
Connect the device that needs to be debugged to the modified router so that the router assigns the custom DNS to the device via DHCP.
The device then queries the DNS server for the domain name, modifies dnsagent's rules.cfg to specify the domain name that needs to be debugged as a custom address.
Use dnsagent to intercept specific domain names