@OP I created something that could likely be used for this kind of purpose. Find "YourFriendlyDNS" release thread in this hacking and homebrew section!
@jjbredesen A dns server just returns IPs for domains though so it can't return the html... I think your idea has to have a webserver in the middle of there (or does it?).
Where it might be more something like this:
1. Browser asks YourFriendlyDNS server for the ip of facebook
2. DNS server returns the IP of a local special webserver you are running (ex. you're running it on port 80 of ip 10.0.0.5 on your local network, same the switch is connected to)
3. The special webserver retrieves the html and content of the website you actually want and returns it AS IF it's actually located there (at the local webserver at 10.0.0.5 in this example)
4. When you navigate to other pages from that page, that special webserver also retreives that html and content and returns it as well, so it can keep going)
It should also insert html for a url field at the top of every 'proxied' page it shows you in case you want to go somewhere else and properly handle getting that html and content as well and inserting the url field again.
Or can it just be more simply:
1. Browser asks YourFriendlyDNS server for the ip of facebook
2. DNS server returns IP of youtube instead
Ideas are flowing here people! How can we do this in a way that's awesome? Let's figure this out
To test this with YourFriendlyDNS instead of just doing a regular whitelist or blacklist add, add the domain that's allowed to be visited with a custom mapped IP (this is where that IP field comes in) of the domain you actually want to go to... (For example: Hostname to add to list: facebook (include the actual accepted domain or with wildcards on both sides like *facebook* [I can't post urls/links yet]) IP: (Leave blank unless mapping custom IPs) -> THE IP of for example youtube or the place you actually want to go)
If that doesn't work, then remove that entry and do the same except instead of custom mapping the IP of youtube to facebook instead use the IP of your special local webserver that has been developed to get the html and content you want and return it
The first one seems like it might not work, the second option has some major potential I think! But does a webserver that does that already exist or does it have to be developed?