522 when turning on proxy, successful connection when using DNS only

I have a domain with A records pointing to my home server for a web game. When I use DNS only mode, I can connect as expected. Once I turn on proxying, I get a 522. Any ideas? For reference, while I do generally want proxy on for protection, I also would like to implement zero trust in front of the site for Discord verification. My zero trust app is functioning just fine when I apply it to another domain I have set up, so I know that's not the issue.
9 Replies
Garicas λ
Garicas λ7mo ago
How does your web game works? Does it uses websockets? Which port does it listen to?
pupdad
pupdad7mo ago
It's a club penguin private server, it just serves up a page on 443
Garicas λ
Garicas λ7mo ago
Looks like it could be using websockets. Try enabling websockets on your cloudflare configs
pupdad
pupdad7mo ago
I do have websockets on, however i'm using solero's wand system for it which I don't believe uses websockets
Garicas λ
Garicas λ7mo ago
Try checking what ports are the clients using when connecting to your service without proxying
pupdad
pupdad7mo ago
443 for the main web page that i'm trying to proxy, and then 9875 for the game server (direct ip connection, no proxy) and 6112 for the login (also should be ip direct)
Garicas λ
Garicas λ7mo ago
So the clients aren't using the same DNS name for each port connection? If they try to use your A record with proxy activated, they probably will hit cloudflare servers and get rejected the ones with ports 9875 and 6112
pupdad
pupdad7mo ago
Yeah no those aren't the issue, I'm getting a 522 on the web page at 443
Garicas λ
Garicas λ7mo ago
Do you have any logs about any errors or connections to your server?