-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fallback port #12
Comments
Well, with ports you can never be sure that there will be no conflict. Even if you find some wonderful list of absolutely all ports, then tomorrow a new program may appear and use your port. But you have to choose and I would recommend iana's list and pick something that isn't used. Or vice versa, choose an already used port with something that will obviously never be used on the same machine as localsend. You can also try to work on two ports at the same time, in addition to backward compatibility you will get increased reliability. |
Well the problem is the discovery part. Currently, LocalSend listens to port 53317 for UDP packages (Other devices will say "hello" to that port). From my experience and also according to some github issues, UDP may not work at all. In this case, LocalSend currently fallbacks to the classical approach and makes an HTTP request to every member of the local network. In both situations, both parties (sender and receiver) need to know what port should be used. That's why LocalSend has a default port but the user can change this port to satisfy the environment constraints. |
The current default is to use port 53317, however, there is a small probability that this port is used as "ephemeral port". (See localsend/localsend#125)
A solution for this is to add a fallback port if 53317 is already occupied.
The fallback port should be a lower-number port which will be upgraded to default in another future release.
I really liked your way of thinking @Jipok. What do you think ? Do you know of any good port?
The text was updated successfully, but these errors were encountered: