I’m developing an android app and I’m about to change my system from a php communication to a socket communication. So on my local network this was working perfectly fine but not on Cloudflare. I’ve tried different http ports now. On my local network and with my IP adress I can choose whatever port I want it works but if I’m redirecting the connection over Cloudflare I’m always getting an ‘400 Bad Request’. The only thing I do is replacing my IP with my domain “fawatcher.de” in the config file. Does anybody knows what to do?
This is what I get from Cloudflare:
I/System.out: HTTP/1.1 400 Bad RequestServer: CloudflareDate: Sat, 08 Jun 2019 00:32:23 GMTContent-Type: text/htmlContent-Length: 171Connection: closeCF-RAY: -400 Bad Request
Sorry I meant *serversocket
You mean a code example?
final ServerSocket serverSocket;
int port = 2052;
serverSocket = new ServerSocket(port);
Thread t1 = new Thread(new NetworkService(pool,serverSocket));
Over this socket I send comma seperated data that’s build up like "1,[email protected],svsvsseveeseshhshrjrhh,1,0,1"
For those that are confronted with the same issue:
You can add a subdomain on your coundflare account (e.g. “socket.domainname.com”) and guide it arround Cloudflare. It’s not the best way to to solve this problem, but the easiest.