Both or those are solved by having a tunnel and a cache that is hosted in the cloud. Something like tailscale or cloudflare provides this pretty much out of the box, but wireguard + nginx on a cheap VPS would accomplish much the same if you are serious about avoiding the big guys.