@rupert elm hardcoding domain would not be a problem. That domain would just got resolved to your IP. But then the certificate for https would be a problem because you can’t have valid one for that url. There would be way around that by installing certs but at that point main complications would be still with installing certs probably making simplifications insignificant.
Anyway I’m happy to say I made it work with mitmproxy as described relatively easily.