Proxy server in the app?

I want the capacitor app webview to serve my development server, https://myapp.com

But service workers are not allowed domains other than localhost without paying $99 and giving apple my passport etc.

How can I make the capacitor app load the webview on http://localhost while running a proxy server on the iPhone’s localhost that just proxies all requests to https://myapp.com? This way, service workers would work