3 ms·
Dear god why? People using ports (even on ::1) is super annoying when it collides with development. Hunting down the offender is not always straightforward and
by withinboredom 3y ago
Dear god why? People using ports (even on ::1) is super annoying when it collides with development. Hunting down the offender is not always straightforward and introduces a new failure mode for you (when I’m already using that port for something else). Also, it opens the door for literally any other software (or xss attacks) to connect and issue api calls you may not expect.
Just create a native app. Use something like C# MAUI or whatever language you’re familiar with. Your users will thank you for a smooth experience.
- jimmyspice 3y agowhat's wrong with using a dynamically allocated port?
- withinboredom 3y agoHow do you have a dynamic port assignment and know how to connect to it without publishing it somewhere? As far as I know, that is impossible.
- galaxyLogic 3y agoThe app will open the browser on the URL it responds to, including the port it found to be available.
- galaxyLogic 3y agoThere's a set of ports allocated for http by the standards. The app will choose to use the first one available, starting with 80. If all such ports are in use then tell the user sorry all ports are already in use. Please stop some apps already running on your PC which may be using these ports.
- withinboredom 3y agoSo you have to run your app as root on Linux and windows firewall is going to have a field day? I don’t know what happens on a Mac, but I assume it will also require root to use low ports. Why not use port numbers dedicated to this kind of thing (1024 – 65535) or better yet, just use pipes and avoid opening a network server at all.