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

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

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

Postby intlinfo » Sun Dec 20, 2020 10:08 pm

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?
intlinfo
Newbie
 
Posts: 2
Joined: Sun Dec 20, 2020 10:05 pm

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

Postby ndesktop » Mon Dec 21, 2020 3:42 am

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.
ndesktop
Master
 
Posts: 540
Joined: Thu Dec 03, 2015 10:10 am

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

Postby magreenblatt » Mon Dec 21, 2020 2:22 pm

Please don’t create a CEF issue unless you plan to do the work yourself and submit a PR.
magreenblatt
Site Admin
 
Posts: 10866
Joined: Fri May 29, 2009 6:57 pm

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

Postby intlinfo » Mon Dec 21, 2020 10:17 pm

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.
intlinfo
Newbie
 
Posts: 2
Joined: Sun Dec 20, 2020 10:05 pm


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 3 guests