iOS connection to HA via forward proxy broken?

I am just beginning to play with HA so I may be missing something obvious.
I’ve just added a squid proxy to my home network and I have found that accessing HA from an iOS device - either the Companion app or a web browsers - does not work. It gets stuck on the page indicating “Unable to connect to Home Assistant. Retrying in 60 seconds”
I can access through the proxy from other computers - it’s just iOS that seems to have an issue.
I have also observed while connected via another device, if I delete the Mobile App integration from HA and then open the app on the phone, the integration is recreated while the app gets stuck on the error screen.

In the squid logs, I see this when using iOS:

[12/Nov/2024:21:53:42 +0000] "GET ws://192.168.1.200:8123/api/websocket HTTP/1.1" 501 4637 "-" NONE_NONE:HIER_NONE "Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/130.0.6723.90 Mobile/15E148 Safari/604.1"

I do not see this when accessing from another device.
However, on the other device I do see a websocket connection but it appears to get stuck in a pending state but this doesn’t appear to affect functionality.

I have added the use_x_forwarded_for and trusted_proxy settings to the http config but it’s not clear if these are required for forward proxy.

What am I missing?

I realised a way around this is to use a PAC file to bypass proxy for local networks but still curious as to why this behaves this way.

I am not familiar with squid proxy, so not sure if or how, but custom header settings for web socket connection are needed in the configuration. If you don’t already have that in your proxy config, it may be the reason.