As long as google algo is using the bots for user-agent and declaring their IPs publicly when crawling the pages, it technically should work,
Just make sure you're cloacking the page with a backend function/method, avoid using js,
But, you might easily get caught by quality raters