-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix: enable dctur when interface address is public #2931
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @2color
I have some questions about the issue. Let's continue the discussion there. But one quick thing:
What do you mean by dialable? By not dialable do you mean that the host will drop unsolicited incoming packets? |
Exactly. It binds to a port on an interface with a public IP, however the firewall blocks incoming connections on that port. |
I've addressed your feedback @sukunrt. |
@MarcoPolo The change looks reasonable to me. If the node does have access to its own public address there's no reason to depend on identify for address discovery for hole punching. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense. After addressing @sukunrt's comment this should be good to merge
926243d
to
317c8af
Compare
* fix: allow punching undialable host public ip fixes #2913 * chore: use interface listen addrs to enable dctur * fix: filter public addresses * chore: remove unused function * chore: formatting --------- Co-authored-by: Daniel N <2color@users.noreply.github.com>
* fix: allow punching undialable host public ip fixes #2913 * chore: use interface listen addrs to enable dctur * fix: filter public addresses * chore: remove unused function * chore: formatting --------- Co-authored-by: Daniel N <2color@users.noreply.github.com>
What's in this PR
This change attempts to fix #2913.
In essence, it enables the
dctur
protocol, when a peer has a public IP (if it's bound to an interface with a public IP) without having to wait for an identify response (which would then make the public address visible viaOwnObservedAddrs()
).Open questions
OwnObservedAddrs()
function in the identify service (which we rely on in the holepunch service) seems to not return observed addresses if they aren't dialable. Why is that?