Hi all,
I'm trying to run a simple Flask server on my Windows machine and expose it to the public internet using Serveo. I'm on a restricted network (College Public WiFi), so I can't use traditional port forwarding.
I set up a basic Flask app (binding to 0.0.0.0 on port 5000). Local access on my Windows machine works perfectly. For example, accessing http://localhost:5000 returns my expected "Hello" message.
I then open a new terminal and run:
ssh -R 80:localhost:5000 serveo.net
This command returns a URL like:
https://randomnumbersandletters.serveo.net
My terminal even logs an incoming HTTP request from an external IP when trying to access it from my phone.
When I try to access the Serveo URL from my phone, I get an HTTP 502 error ("Bad Gateway"). The error seems to indicate that Serveo isnβt receiving a proper response from my Flask backend.
I've verified that the Flask server is running correctly by using curl http://localhost:5000 on my Windows machine. I've ensured my Flask app is bound to 0.0.0.0 so that it listens on all interfaces. I've confirmed that local access works fine. I've checked that the SSH tunnel is established and logging incoming requests.
What could be causing this HTTP 502 error when accessing via Serveo?
Thanks in advance for your help.