-
-
Notifications
You must be signed in to change notification settings - Fork 362
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
Minimum port is ignored if port on local is 0 #23
Comments
Steps to reproduce:
|
Hi @BxOxSxS, this is actually intended behavior. |
Yes it's not possible that way but bore could somehow choose and assign specyfic port if local gave value 0. Currently |
I don't believe this is possible, but if you have a specific technical approach to doing this then we can reopen. Closing this issue. |
Here is more technical example: I tried that first approach with for loop and it's working fine under linux but does now work on windows as someone commented on the issue. I will try to experiment with second way and report back |
Here is a means of limiting random port selection to a range via "ip_local_port_range": https://unix.stackexchange.com/questions/305308/how-to-limit-range-of-random-port-sockets EDIT:
Just change the range to your preference |
Hello,
I was trying to add option for max port however I discovered issue and wanted to discuss it before any action.
When you set minimum port on server and the client send wanted port using
-p
option the server correctly check if it's in range or not.But when the port is set to 0 (or not given) by local the check is skipped because of condition:
Port is selected by
TcpListener
from tokio which is bypassing the setting.The simplest solution that came to my mind is to generate random port on server within given range so currently MIN_PORT and 65535
What do you think?
The text was updated successfully, but these errors were encountered: