Trusted Proxy IP & socket issues

SYSTEM INFORMATION
OS type and version Debian Linux 12
Webmin version 2.641
Virtualmin version 8.1.0 Professional
Webserver version Apache 2.4.66
Related packages N/A

I saw in another post that Joe mentioned that “… if you’re using Webmin behind a proxy, you should upgrade and configure the trusted proxy IP, ASAP. It is a security issue to have Webmin not know exactly what proxy is allowed to talk to it. Also use SSL between the proxy and Webmin.”

I noticed after the upgrade to the 2.641 that the terminals in Virtualmin (both from the individual domains, and the main terminal at the bottom of the dashboard) have issues. When trying to use the terminal from the domain link I get “Failed loading terminal : WebSocket connection error”. Using the terminal button from the dashboard just times out.

I’m pretty sure it’s related to the trusted proxy ip, which I’ve tried to fix. I have "Yes, trust both the remote IP and SSL cert provided by proxies " checked and my IP address in the Trusted Proxy IP’s, but still can’t connect. Kindof at a loss as what to do next for troubleshooting and fixing. Can someone assist?

I don’t believe there’s anything in those changes that would break WebSockets. We spent quite a bit of time trying to insure nothing would break, even though there were quite a few changes and many things got a lot stricter.

So, you probably need to be more specific and also check for errors.

What’s the proxy? Is it configured according to our docs for that proxy (plus trusted_proxies)?

Are there any errors in the web dev tools console in your browser when you try to use the Terminal?

Are there any errors in /var/webmin/miniserv.error?

Any errors in the proxy server logs?

Are you sure the Trusted Proxy IP is the one the proxy is actually coming from? If it’s running on the same system, it’d be localhost (127.0.0.1), probably, rather than the public IP, for example.