-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Min port is not respected for randomly assigned ports #70
Comments
You're right, it's not respected for randomly selected ports. I'll look at merging #28 later when I have time. |
I also need that feature. Because I can only open some ports on my server. Thanks to your great work. Bore is fantastic. |
In case this is still something you need, you can consider compiling from this branch until the corresponding PR is merged. It's as simple as |
The min port number is applied when the client tries to request a specific port, but not when the port is randomly assigned (when client sends port 0).
To reproduce the error:
The randomly assigned port is below the configured minimum.
Looking at the codebase,
TcpListener
doesn't seem to have any interface for specifying a minimum port for randomly assigned ports. A solution would likely have to randomly pick ports within the server and not leave it to the OS by setting it to 0.The text was updated successfully, but these errors were encountered: