I built a program in Go to defeat GeoIP lock-outs for my home network.
It runs on our home router and functions as the primary DNS server. If the record name matches a regex the DNS request is forwarded over a VPN to a DNS server in the target country. Any other requests are forwarded to my ISP’s DNS. If the response is a CNAME then the A record name is cached so that follow-up requests are also forwarded over the VPN.
Before returning the IPs in the foreign DNS response /32 routes for the IPs are added to send any home network traffic for them over the VPN.
This means that any client on our home network can transparently access GeoIP locked sites. It’s worked for around 8 years with no modifications.
replies(2):