"Tell X where I am" protocol

Just wondering if libp2p has a protocol that lets Alice send a request to Bob asking that he tells Carlos how to connect to Alice. I’ve done a bit of searching, but the closest I’ve found is this suggestion by @vyzo.

One advantage of this protocol (maybe /id/tell?) would be privacy: instead of Carlos telling Bob “If anyone wants to connect to me, here’s how”, and hoping that no one nefarious asks Bob for that information, Alice is telling Bob, “Please share this information with Carlos, and only Carlos”. Another advantage is that the information sent to Carlos is up to date, rather than Carlos’s potentially stale information being sent in response to Alice’s request in the alternative protocol.

There are still potential privacy issues: Eve could try to determine whether Bob is connected to Carlos by asking Bob to send her details to Carlos; if a connection from Carlos to Eve results, then she knows there’s a Bob‒Carlos connection. On the other hand, Bob or Carlos could simply silently ignore this protocol’s messages in cases where they don’t want to reveal information of that sort.

There is no built in protocol in libp2p for allow list/direct only sharing of peer information. I’m not aware of any application level protocols at the moment that do this, but this is where I’d expect this type of logic to exist, instead of being built in to libp2p itself.

Thanks for your reply.

I’ve specified a kind of “Tell X where I am” protocol as part of circulex (see Location request and Location report — currently sections 5.1 and 5.2 — in this volatile incomplete draft, though note that the encoding specified in those sections is currently out of date). I’m considering adjusting the protocol to make use of libp2p (and multiaddresses, and maybe other related things), and I realized that one of the uses of my location requests and reports — “Tell X where I am”, where X = “me” — is already covered by libp2p’s id protocol. (Indeed, libp2p has extra relevant features, like dialback, to check that the discovered address is actually usable by others.)

This led me to wondering whether libp2p’s id and related protocols could be expanded, so that circulex wouldn’t need location requests and location reports at all, and so that other privacy-sensitive protocols might also be able to easily adopt this pattern.

But if this isn’t something that would be of wider interest, I’m happy to keep location requests and reports as part of the circulex protocol.

(Incidentally, another idea occurred to me about how libp2p could be useful in such a situation. If Alice asks Bob to set up a circuit relay for her, can she then ask Bob to make an outgoing connection to Carlos on her behalf, if she knows only Carlos’s peer id, but Bob knows how to contact Carlos? Or are circuit relays only for incoming connections, rather than outgoing ones? Even in that case, there might be a way of using them to replace circulex’s location requests and reports, maybe by specifying that circulex relays should also act as libp2p circuit relays for their primary instances.)

To answer my own question, the relay spec doesn’t seem to require Bob to be a circuit relay “for Alice” or for anyone else in particular. If he’s a circuit relay, then he’s a circuit relay, and if he knows (or can figure out) how to contact Carlos, then Alice or anyone else can ask him to set up a relayed connection to Carlos for them.