Is it possible for a WebExtension to override the IP address of a server, or to modify/intercept DNS requests or override the DNS cache? I'm trying to code a WebExtension that provides browsers with the same functionality as cURL's --resolve.
Specifically, to:
- connect to a different IP than that listed in DNS
- add entries for particular
NXDOMAINthat the user wishes to resolve as if it existed - "resolve" particular entries offline
- cache or pin DNS entries in a software-defined way in preparation for a known upcoming DNS poisoning attack
In short: to simulate the effect of a hosts file, but without administrative privileges / messing with the rest of the system.