Skip to content

Conversation

@aschmahmann
Copy link
Contributor

This adds holepunching support to Rainbow, which we care about for the purposes of Rainbow being able to download data from peers behind NATs. This should've been here before but was overlooked because I thought it was in go-libp2p by default😅.

Some notes:

  • In order to do holepunching to fetch data from nodes behind NATs the rainbow node must know its public facing address
  • This means talking to other nodes and asking them for your address, or just knowing it by setting a public IP address as the listen address
  • So if not set via config it's either situational (e.g. based on if you've made some queries that involve downloading data from publicly reachable peers), or requires a shared-host DHT (which is not great for other reasons like excessive resource consumption)

Trying to get this fixed for ipfs.io / dweb.link at the moment which should have public IPs and therefore be fine (requires confirmation)

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

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

Just want to note that ListenAddrs and AnnounceAddrs are not set anywhere else in the code. ListenAddrs may useful for testing however.

@hacdias hacdias merged commit 19723fe into main Apr 8, 2024
@hacdias hacdias deleted the fix/holepunching-support branch April 8, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants