Skip to content
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

feat(identify): add hide_listen_addrs config option #5507

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Jul 19, 2024

Description

Implements #4010, which was closed. It was closed because it appeared that the Identify specification doesn't dictate this feature. But, in the discussion on the specs repo (libp2p/specs#597) it is mentioned that this might very well be an implementation detail.

This PR introduces a hide_listen_addrs flag that will prevent our listen addresses to be included, effectively only sharing our external addresses.

Notes & open questions

An alternative implementation would be to allow us to filter the addresses we are sending out, by providing a closure I imagine.

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Copy link
Member

@dariusc93 dariusc93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :). Left one remark

protocols/identify/CHANGELOG.md Outdated Show resolved Hide resolved
@dariusc93 dariusc93 requested a review from jxs August 28, 2024 11:57
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jxs jxs added the send-it label Sep 5, 2024
@mergify mergify bot merged commit 3837e33 into libp2p:master Sep 5, 2024
71 of 72 checks passed
@b-zee b-zee deleted the feat-identify-hide-listen-addrs branch September 5, 2024 20:41
TimTinkers pushed a commit to unattended-backpack/rust-libp2p that referenced this pull request Sep 14, 2024
## Description

Implements libp2p#4010, which was closed. It was closed because it appeared
that the Identify specification doesn't dictate this feature. But, in
the discussion on the specs repo
(libp2p/specs#597) it is mentioned that this
might very well be an implementation detail.

This PR introduces a `hide_listen_addrs` flag that will prevent our
listen addresses to be included, effectively only sharing our external
addresses.

<!--
Please write a summary of your changes and why you made them.
This section will appear as the commit message after merging.
Please craft it accordingly.
For a quick primer on good commit messages, check out this blog post:
https://cbea.ms/git-commit/

Please include any relevant issues in here, for example:

Related https://github.com/libp2p/rust-libp2p/issues/ABCD.
Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ.
-->

## Notes & open questions

An alternative implementation would be to allow us to filter the
addresses we are sending out, by providing a closure I imagine.

<!--
Any notes, remarks or open questions you have to make about the PR which
don't need to go into the final commit message.
-->

## Change checklist

<!-- Please add a Changelog entry in the appropriate crates and bump the
crate versions if needed. See
<https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>-->

- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] A changelog entry has been made in the appropriate crates

---------

Co-authored-by: Darius Clark <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants