Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

AutoNAT only adds AutoNAT service peers on *new* connection #28

Closed
paul-freeman opened this issue Nov 3, 2019 · 3 comments
Closed

AutoNAT only adds AutoNAT service peers on *new* connection #28

paul-freeman opened this issue Nov 3, 2019 · 3 comments

Comments

@paul-freeman
Copy link

The AutoNAT service contains a mapping of ID to AddrInfo, but this mapping is only updated when the host reports a new connection.

The issue is that the host's existing connections are not checked for AutoNAT support.

My specific issue arose when I was trying to have my relay hosts also provide AutoNAT service. Because I was bootstrapping my relay hosts into the local peer's DHT, the peer already had connections to them by the time the AutoNAT service was initialized. This meant that the list of AutoNAT peers never included the relay hosts and, thus, NAT status could not be determined.

It would seem that, at a minimum, it would be good to allow the AutoNAT to be bootstrapped with its own list of peers (this list of bootstrap peers would probably need to be provided to EnableAutoRelay). Although ideally, it would be better for the AutoNAT service to query existing connections from the host when it starts.

@vyzo
Copy link
Contributor

vyzo commented Nov 3, 2019

We are in the process of adding a static list of relay peers that can be used instead of discovery in libp2p/go-libp2p#705.
We also want to add passive discovery whereby relays can also be discovered by connecting to them, as reported by the circuit subsystem.

@vyzo
Copy link
Contributor

vyzo commented Nov 3, 2019

Also of note, we would happily accept a patch that makes autonat check existing connections for service support.

@jacobheun jacobheun added this to the Working Kademlia milestone Jan 24, 2020
willscott added a commit that referenced this issue Mar 11, 2020
* Single goroutine managing autonat-relevent events.
* Watching incoming connections and local interface changes as signals.
* Emit a single 'rechabilitychanged' persistent event

fix #40 
fix #36 
fix #35
fix #34 
fix #11
obsolete #28
obsolete #9 

Co-authored-by: Aarsh Shah <[email protected]>
Co-authored-by: Adin Schmahmann <[email protected]>
@willscott
Copy link
Contributor

autonat no longer maintains a this peer cache, and will aim to only piggyback on existing connections

willscott pushed a commit that referenced this issue Mar 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants