mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-14 20:01:21 +00:00
Enables two peers to coordinate a hole punch (direct connection upgrade) via a relayed connection. See https://github.com/libp2p/specs/blob/master/relay/DCUtR.md for specification.
20 lines
588 B
Protocol Buffer
20 lines
588 B
Protocol Buffer
syntax = "proto2";
|
|
|
|
package holepunch.pb;
|
|
|
|
message HolePunch {
|
|
enum Type {
|
|
CONNECT = 100;
|
|
SYNC = 300;
|
|
}
|
|
|
|
required Type type=1;
|
|
|
|
// For hole punching, we'll send some additional observed addresses to the remote peer
|
|
// that could have been filtered by the Host address factory (for example: AutoRelay removes all public addresses if peer has private reachability).
|
|
// This is a hack!
|
|
// We plan to have a better address discovery and advertisement mechanism in the future.
|
|
// See https://github.com/libp2p/go-libp2p-autonat/pull/98
|
|
repeated bytes ObsAddrs = 2;
|
|
}
|