Page 1 of 1

Hello everyone, I have a question about domain name A record

PostPosted: Sun Dec 20, 2020 10:08 pm
by intlinfo
I want to implement some functions.

For example, the IP address we get by visiting www.google.com is: 1.1.1.1
I want to modify to www.google.com 2.2.2.2

How to achieve this effect.

The current solution is to modify the Hosts file record.

How can we achieve it through the CEF program?

Re: Hello everyone, I have a question about domain name A re

PostPosted: Mon Dec 21, 2020 3:42 am
by ndesktop
I think the starting point should be Chromium class HostResolverManager and ServeFromHosts, and perhaps SetDnsConfigOverrides methods (although I am not 100% sure on how DnsConfigOverrides works on the latter - there is no hosts member to override/control directly in that class).
Also, I am not aware of DNS to be exposed in CEF (the only reference of dns is in AlloyContentBrowserClient::WillCreateURLLoaderFactory's disable_secure_dns parameter).

Most likely you need a non-trivial patch of CEF to expose DNS classes over new CEF classes. Either you can do it yourself, open a CEF improvement issue and someone will pick it up and implement it, or you might find someone to do it for you.

Re: Hello everyone, I have a question about domain name A re

PostPosted: Mon Dec 21, 2020 2:22 pm
by magreenblatt
Please don’t create a CEF issue unless you plan to do the work yourself and submit a PR.

Re: Hello everyone, I have a question about domain name A re

PostPosted: Mon Dec 21, 2020 10:17 pm
by intlinfo
ndesktop wrote:I think the starting point should be Chromium class HostResolverManager and ServeFromHosts, and perhaps SetDnsConfigOverrides methods (although I am not 100% sure on how DnsConfigOverrides works on the latter - there is no hosts member to override/control directly in that class).
Also, I am not aware of DNS to be exposed in CEF (the only reference of dns is in AlloyContentBrowserClient::WillCreateURLLoaderFactory's disable_secure_dns parameter).

Most likely you need a non-trivial patch of CEF to expose DNS classes over new CEF classes. Either you can do it yourself, open a CEF improvement issue and someone will pick it up and implement it, or you might find someone to do it for you.



Thank you very much.