in my case for no route host github comment : https://github.com/Genymobile/scrcpy/issues/1341#issuecomment-2556546043
I’ve been a developer for over six years and have solved similar issues using the solutions mentioned above.
However, I faced the same problem again today and spent three hours troubleshooting.
Then I remembered that I had set Cloudflare/DNS to 1.1.1.1 to bypass a blocked website two days ago. After removing those DNS settings (on macOS) by going to Wi-Fi -> details -> DNS -> and deleting the custom settings, I tried the solutions again—and it worked like a charm! lol.