Reopen: Error 522 when proxied | no problem when DNS Only

I am having the same problem in this post here: Error 522 when proxied | no problem when DNS Only

To reiterate and give more specifics:
I have an A-type DNS that points to an Amplifi router with port forwarding. Ports 80 and 443 are both forwarded to the same non-secure port, 8078, on a Windows machine. This same windows machine has a local server running that is listening to port 8078.
I can connect to this Windows server by using the IP address of the router, with both HTTP and HTTPS working; HTTPS does reject the connection as expected (ERR_SSL_PROTOCOL_ERROR). Similarly, I can connect with my Cloudflare domain name while the DNS proxy status is DNS only (again, HTTPS with expected error).
The problem comes when I try to enable a proxied DNS connection with Cloudflare, getting a 522 error. Note that I am using a “Flexible” SSL/TLS encryption mode as I need HTTPS to run my server application from the client, but I am unable to run the server with certificates.
One of the most common problems mentioned is that the server is blocking the Cloudflare IP addresses for communication. To work around this, I disabled the firewall on my router and my Windows server but still get the 522 error.

My overall goal is to connect clients to my server from outside of my local network with a secure (HTTPS) connection, ideally within the same domain as hosted by Cloudflare. Currently, I have to use ngrok to achieve similar results; however, ngrok is labeled as potentially dangerous for clients due to its security flaws. Any help or suggestions will be appreciated.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.