-
Notifications
You must be signed in to change notification settings - Fork 112
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
0 port #51
Comments
I don't think 0-means-random-port works with Tor/Onion. Please correct me if I'm wrong.
Correct |
@lgierth That's why I'm thinking that the 0 port should be disallowed in TCP and UDP. And this would unify the port parsing logic in my multiaddr library. |
port 0 is a legitimate use on the listening side. Not going to remove it :) |
Are services allowed to If onion addresses is part of multiaddr, then why isn't it possible to bind to a 0 port onion address? Where in the docs does it say that onion addresses cannot have a 0 port? |
Correct
Port 0 is part of the OS's TCP/IP stack, and I guess Tor hidden services just don't provide such a functionality. One could emulate it within go-multiaddr, but that would be hard to pull off without race conditions.
I don't know -- ping @david415 @ianopolous |
Implemented in haskell |
In the test cases, 0 port is allowed for UDP, SCTP and TCP.
What's the reason for this? The 0 port is used for binding to a system allocated port, and it is also officially reserved by IANA and not be used for TCP or UDP messages.
If it this is allowed, then why does the onion test disallow a 0 port.
I'm writing a haskell version of this library, and seeing these 2 testcases means I would have to split the port logic to allow 0 for certain protocols and disallow 0 for other protocols.
In the broader case, why would 0 ever be used in a multiaddress? I would think it is intended for the binding on the server side, but never passed around as an actually addressable resource, since it doesn't make sense for the system to randomly allocate a connecting port on the client side.
The text was updated successfully, but these errors were encountered: