fix calculation of reachability status

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-10-17 11:23:03 +02:00
parent b947a8f6db
commit 1b9e62144f
13 changed files with 488 additions and 447 deletions

View File

@@ -288,6 +288,7 @@ func (p *Peer) Marshal() *coreproto.Peer {
ReceiveBytes: p.ReceiveBytes, ReceiveBytes: p.ReceiveBytes,
AllowedIps: allowedIPs, AllowedIps: allowedIPs,
ProtocolVersion: uint32(p.ProtocolVersion), ProtocolVersion: uint32(p.ProtocolVersion),
Reachability: p.Reachability(),
} }
if p.Endpoint != nil { if p.Endpoint != nil {
@@ -312,3 +313,23 @@ func (p *Peer) Marshal() *coreproto.Peer {
return q return q
} }
func (p *Peer) Reachability() coreproto.ReachabilityType {
if p.Endpoint == nil {
return coreproto.ReachabilityType_REACHABILITY_TYPE_NONE
} else {
now := time.Now()
lastActivity := p.LastReceiveTime
if p.LastTransmitTime.After(lastActivity) {
lastActivity = p.LastTransmitTime
}
if p.LastHandshakeTime.After(now.Add(-2 * time.Minute)) {
return coreproto.ReachabilityType_REACHABILITY_TYPE_DIRECT
} else if lastActivity.After(p.LastHandshakeTime) {
return coreproto.ReachabilityType_REACHABILITY_TYPE_NONE
} else {
return coreproto.ReachabilityType_REACHABILITY_TYPE_UNKNOWN
}
}
}

View File

@@ -21,6 +21,7 @@ import (
icex "github.com/stv0g/cunicu/pkg/ice" icex "github.com/stv0g/cunicu/pkg/ice"
proto "github.com/stv0g/cunicu/pkg/proto" proto "github.com/stv0g/cunicu/pkg/proto"
coreproto "github.com/stv0g/cunicu/pkg/proto/core"
epdiscproto "github.com/stv0g/cunicu/pkg/proto/feature/epdisc" epdiscproto "github.com/stv0g/cunicu/pkg/proto/feature/epdisc"
) )
@@ -377,9 +378,8 @@ func (p *Peer) Marshal() *epdiscproto.Peer {
cs := p.ConnectionState() cs := p.ConnectionState()
q := &epdiscproto.Peer{ q := &epdiscproto.Peer{
State: epdiscproto.NewConnectionState(cs), State: epdiscproto.NewConnectionState(cs),
Restarts: uint32(p.restarts), Restarts: uint32(p.restarts),
Reachability: p.Reachability(),
} }
if p.proxy != nil { if p.proxy != nil {
@@ -418,32 +418,37 @@ func (p *Peer) Marshal() *epdiscproto.Peer {
return q return q
} }
func (p *Peer) Reachability() protoepdisc.Reachability { func (p *Peer) Reachability() coreproto.ReachabilityType {
switch p.ConnectionState() { cs := p.connectionState.Load()
switch cs {
case icex.ConnectionStateConnecting,
icex.ConnectionStateCreating,
icex.ConnectionStateIdle,
ice.ConnectionStateChecking,
ice.ConnectionStateNew:
return coreproto.ReachabilityType_REACHABILITY_TYPE_UNKNOWN
case ice.ConnectionStateClosed,
ice.ConnectionStateDisconnected,
ice.ConnectionStateFailed:
return coreproto.ReachabilityType_REACHABILITY_TYPE_NONE
case ice.ConnectionStateConnected: case ice.ConnectionStateConnected:
cp, err := p.agent.GetSelectedCandidatePair() cp, err := p.agent.GetSelectedCandidatePair()
if err != nil { if err != nil || cp == nil {
return protoepdisc.Reachability_NO_REACHABILITY return coreproto.ReachabilityType_REACHABILITY_TYPE_NONE
} }
switch cp.Remote.Type() { lc, rc := cp.Local, cp.Remote
case ice.CandidateTypeHost: if lc.Type() == ice.CandidateTypeRelay && rc.Type() == ice.CandidateTypeRelay {
fallthrough return coreproto.ReachabilityType_REACHABILITY_TYPE_RELAYED_BIDIR
case ice.CandidateTypeServerReflexive: } else if lc.Type() == ice.CandidateTypeRelay || rc.Type() == ice.CandidateTypeRelay {
if cp.Remote.NetworkType().IsTCP() { return coreproto.ReachabilityType_REACHABILITY_TYPE_RELAYED
return protoepdisc.Reachability_DIRECT_TCP } else {
} return coreproto.ReachabilityType_REACHABILITY_TYPE_DIRECT
return protoepdisc.Reachability_DIRECT_UDP
case ice.CandidateTypeRelay:
if cp.Remote.NetworkType().IsTCP() {
return protoepdisc.Reachability_RELAY_TCP
}
return protoepdisc.Reachability_RELAY_UDP
} }
default:
return coreproto.ReachabilityType_REACHABILITY_TYPE_NONE
} }
return protoepdisc.Reachability_NO_REACHABILITY
} }

View File

@@ -67,6 +67,12 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
} }
} }
if p.Reachability != ReachabilityType_REACHABILITY_TYPE_UNSPECIFIED {
if _, err := t.FprintKV(wri, "reachability", p.Reachability); err != nil {
return err
}
}
if p.LastHandshakeTimestamp != nil { if p.LastHandshakeTimestamp != nil {
if _, err := t.FprintKV(wri, "latest handshake", util.Ago(p.LastHandshakeTimestamp.Time())); err != nil { if _, err := t.FprintKV(wri, "latest handshake", util.Ago(p.LastHandshakeTimestamp.Time())); err != nil {
return err return err

View File

@@ -22,6 +22,67 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
) )
type ReachabilityType int32
const (
ReachabilityType_REACHABILITY_TYPE_UNSPECIFIED ReachabilityType = 0
ReachabilityType_REACHABILITY_TYPE_UNKNOWN ReachabilityType = 1
ReachabilityType_REACHABILITY_TYPE_NONE ReachabilityType = 2
ReachabilityType_REACHABILITY_TYPE_DIRECT ReachabilityType = 3
ReachabilityType_REACHABILITY_TYPE_RELAYED ReachabilityType = 4
ReachabilityType_REACHABILITY_TYPE_RELAYED_BIDIR ReachabilityType = 5
ReachabilityType_REACHABILITY_TYPE_ROUTED ReachabilityType = 6
)
// Enum value maps for ReachabilityType.
var (
ReachabilityType_name = map[int32]string{
0: "REACHABILITY_TYPE_UNSPECIFIED",
1: "REACHABILITY_TYPE_UNKNOWN",
2: "REACHABILITY_TYPE_NONE",
3: "REACHABILITY_TYPE_DIRECT",
4: "REACHABILITY_TYPE_RELAYED",
5: "REACHABILITY_TYPE_RELAYED_BIDIR",
6: "REACHABILITY_TYPE_ROUTED",
}
ReachabilityType_value = map[string]int32{
"REACHABILITY_TYPE_UNSPECIFIED": 0,
"REACHABILITY_TYPE_UNKNOWN": 1,
"REACHABILITY_TYPE_NONE": 2,
"REACHABILITY_TYPE_DIRECT": 3,
"REACHABILITY_TYPE_RELAYED": 4,
"REACHABILITY_TYPE_RELAYED_BIDIR": 5,
"REACHABILITY_TYPE_ROUTED": 6,
}
)
func (x ReachabilityType) Enum() *ReachabilityType {
p := new(ReachabilityType)
*p = x
return p
}
func (x ReachabilityType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReachabilityType) Descriptor() protoreflect.EnumDescriptor {
return file_core_peer_proto_enumTypes[0].Descriptor()
}
func (ReachabilityType) Type() protoreflect.EnumType {
return &file_core_peer_proto_enumTypes[0]
}
func (x ReachabilityType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReachabilityType.Descriptor instead.
func (ReachabilityType) EnumDescriptor() ([]byte, []int) {
return file_core_peer_proto_rawDescGZIP(), []int{0}
}
type Peer struct { type Peer struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -44,8 +105,9 @@ type Peer struct {
// WireGuard endpoint address // WireGuard endpoint address
Endpoint string `protobuf:"bytes,11,opt,name=endpoint,proto3" json:"endpoint,omitempty"` Endpoint string `protobuf:"bytes,11,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
// WireGuard protocol version // WireGuard protocol version
ProtocolVersion uint32 `protobuf:"varint,12,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` ProtocolVersion uint32 `protobuf:"varint,12,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
Ice *epdisc.Peer `protobuf:"bytes,13,opt,name=ice,proto3" json:"ice,omitempty"` Ice *epdisc.Peer `protobuf:"bytes,13,opt,name=ice,proto3" json:"ice,omitempty"`
Reachability ReachabilityType `protobuf:"varint,14,opt,name=reachability,proto3,enum=cunicu.core.ReachabilityType" json:"reachability,omitempty"`
} }
func (x *Peer) Reset() { func (x *Peer) Reset() {
@@ -171,6 +233,13 @@ func (x *Peer) GetIce() *epdisc.Peer {
return nil return nil
} }
func (x *Peer) GetReachability() ReachabilityType {
if x != nil {
return x.Reachability
}
return ReachabilityType_REACHABILITY_TYPE_UNSPECIFIED
}
var File_core_peer_proto protoreflect.FileDescriptor var File_core_peer_proto protoreflect.FileDescriptor
var file_core_peer_proto_rawDesc = []byte{ var file_core_peer_proto_rawDesc = []byte{
@@ -178,7 +247,7 @@ var file_core_peer_proto_rawDesc = []byte{
0x6f, 0x12, 0x0b, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x0c, 0x6f, 0x12, 0x0b, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x1a, 0x0c,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x66, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x66, 0x65,
0x61, 0x74, 0x75, 0x72, 0x65, 0x2f, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2f, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xde, 0x04, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x74, 0x6f, 0x22, 0xa1, 0x05, 0x0a, 0x04, 0x50, 0x65, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x23,
@@ -216,10 +285,29 @@ var file_core_peer_proto_rawDesc = []byte{
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x03, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x03,
0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x69, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x63, 0x75, 0x6e, 0x69,
0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x03, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x03,
0x69, 0x63, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c,
0x6d, 0x2f, 0x73, 0x74, 0x76, 0x30, 0x67, 0x2f, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2f, 0x70, 0x69, 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x63, 0x75, 0x6e, 0x69,
0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x63, 0x75, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69,
0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61,
0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2a, 0xf0, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x61, 0x63, 0x68,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x52,
0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1d,
0x0a, 0x19, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54,
0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a,
0x16, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59,
0x50, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x52, 0x45, 0x41,
0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44,
0x49, 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x1d, 0x0a, 0x19, 0x52, 0x45, 0x41, 0x43, 0x48,
0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4c,
0x41, 0x59, 0x45, 0x44, 0x10, 0x04, 0x12, 0x23, 0x0a, 0x1f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41,
0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41,
0x59, 0x45, 0x44, 0x5f, 0x42, 0x49, 0x44, 0x49, 0x52, 0x10, 0x05, 0x12, 0x1c, 0x0a, 0x18, 0x52,
0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x44, 0x10, 0x06, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74,
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x76, 0x30, 0x67, 0x2f, 0x63, 0x75,
0x6e, 0x69, 0x63, 0x75, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -234,22 +322,25 @@ func file_core_peer_proto_rawDescGZIP() []byte {
return file_core_peer_proto_rawDescData return file_core_peer_proto_rawDescData
} }
var file_core_peer_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_core_peer_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_core_peer_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_core_peer_proto_goTypes = []interface{}{ var file_core_peer_proto_goTypes = []interface{}{
(*Peer)(nil), // 0: cunicu.core.Peer (ReachabilityType)(0), // 0: cunicu.core.ReachabilityType
(*proto.Timestamp)(nil), // 1: cunicu.Timestamp (*Peer)(nil), // 1: cunicu.core.Peer
(*epdisc.Peer)(nil), // 2: cunicu.epdisc.Peer (*proto.Timestamp)(nil), // 2: cunicu.Timestamp
(*epdisc.Peer)(nil), // 3: cunicu.epdisc.Peer
} }
var file_core_peer_proto_depIdxs = []int32{ var file_core_peer_proto_depIdxs = []int32{
1, // 0: cunicu.core.Peer.last_handshake_timestamp:type_name -> cunicu.Timestamp 2, // 0: cunicu.core.Peer.last_handshake_timestamp:type_name -> cunicu.Timestamp
1, // 1: cunicu.core.Peer.last_receive_timestamp:type_name -> cunicu.Timestamp 2, // 1: cunicu.core.Peer.last_receive_timestamp:type_name -> cunicu.Timestamp
1, // 2: cunicu.core.Peer.last_transmit_timestamp:type_name -> cunicu.Timestamp 2, // 2: cunicu.core.Peer.last_transmit_timestamp:type_name -> cunicu.Timestamp
2, // 3: cunicu.core.Peer.ice:type_name -> cunicu.epdisc.Peer 3, // 3: cunicu.core.Peer.ice:type_name -> cunicu.epdisc.Peer
4, // [4:4] is the sub-list for method output_type 0, // 4: cunicu.core.Peer.reachability:type_name -> cunicu.core.ReachabilityType
4, // [4:4] is the sub-list for method input_type 5, // [5:5] is the sub-list for method output_type
4, // [4:4] is the sub-list for extension type_name 5, // [5:5] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension extendee 5, // [5:5] is the sub-list for extension type_name
0, // [0:4] is the sub-list for field type_name 5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
} }
func init() { file_core_peer_proto_init() } func init() { file_core_peer_proto_init() }
@@ -276,13 +367,14 @@ func file_core_peer_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_core_peer_proto_rawDesc, RawDescriptor: file_core_peer_proto_rawDesc,
NumEnums: 0, NumEnums: 1,
NumMessages: 1, NumMessages: 1,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },
GoTypes: file_core_peer_proto_goTypes, GoTypes: file_core_peer_proto_goTypes,
DependencyIndexes: file_core_peer_proto_depIdxs, DependencyIndexes: file_core_peer_proto_depIdxs,
EnumInfos: file_core_peer_proto_enumTypes,
MessageInfos: file_core_peer_proto_msgTypes, MessageInfos: file_core_peer_proto_msgTypes,
}.Build() }.Build()
File_core_peer_proto = out.File File_core_peer_proto = out.File

View File

@@ -10,7 +10,7 @@ import (
"golang.org/x/exp/slices" "golang.org/x/exp/slices"
"github.com/stv0g/cunicu/pkg/util" "github.com/stv0g/cunicu/pkg/util"
"github.com/stv0g/cunicu/pkg/util/terminal" t "github.com/stv0g/cunicu/pkg/util/terminal"
icex "github.com/stv0g/cunicu/pkg/ice" icex "github.com/stv0g/cunicu/pkg/ice"
) )
@@ -39,12 +39,12 @@ func NewCredentials() Credentials {
func (i *Interface) Dump(wr io.Writer, verbosity int) error { func (i *Interface) Dump(wr io.Writer, verbosity int) error {
if verbosity > 4 { if verbosity > 4 {
if _, err := terminal.FprintKV(wr, "nat type", i.NatType); err != nil { if _, err := t.FprintKV(wr, "nat type", i.NatType); err != nil {
return err return err
} }
if i.NatType == NATType_NAT_NFTABLES { if i.NatType == NATType_NAT_NFTABLES {
if _, err := terminal.FprintKV(wr, "mux ports", fmt.Sprintf("%d, %d", i.MuxPort, i.MuxSrflxPort)); err != nil { if _, err := t.FprintKV(wr, "mux ports", fmt.Sprintf("%d, %d", i.MuxPort, i.MuxSrflxPort)); err != nil {
return err return err
} }
} }
@@ -56,32 +56,27 @@ func (i *Interface) Dump(wr io.Writer, verbosity int) error {
func (p *Peer) Dump(wr io.Writer, verbosity int) error { func (p *Peer) Dump(wr io.Writer, verbosity int) error {
var v string var v string
if _, err := terminal.FprintKV(wr, "state", terminal.Mods(p.State.String(), terminal.Bold, p.State.Color())); err != nil { if _, err := t.FprintKV(wr, "state", t.Mods(p.State.String(), t.Bold, p.State.Color())); err != nil {
return err
}
if _, err := terminal.FprintKV(wr, "reachability", p.Reachability); err != nil {
return err return err
} }
if p.SelectedCandidatePair != nil { if p.SelectedCandidatePair != nil {
if _, err := terminal.FprintKV(wr, "candidate pair", p.SelectedCandidatePair.ToString()); err != nil { if _, err := t.FprintKV(wr, "candidate pair", p.SelectedCandidatePair.ToString()); err != nil {
return err return err
} }
} }
if verbosity > 4 { if verbosity > 4 {
if _, err := t.FprintKV(wr, "proxy type", p.ProxyType); err != nil {
if _, err := terminal.FprintKV(wr, "proxy type", p.ProxyType); err != nil {
return err return err
} }
if _, err := terminal.FprintKV(wr, "latest state change", util.Ago(p.LastStateChangeTimestamp.Time())); err != nil { if _, err := t.FprintKV(wr, "latest state change", util.Ago(p.LastStateChangeTimestamp.Time())); err != nil {
return err return err
} }
if p.Restarts > 0 { if p.Restarts > 0 {
if _, err := terminal.FprintKV(wr, "restarts", p.Restarts); err != nil { if _, err := t.FprintKV(wr, "restarts", p.Restarts); err != nil {
return err return err
} }
} }
@@ -98,17 +93,17 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
} }
} }
if _, err := terminal.FprintKV(wr, "\ncandidates"); err != nil { if _, err := t.FprintKV(wr, "\ncandidates"); err != nil {
return err return err
} }
wr := terminal.NewIndenter(wr, " ") wr := t.NewIndenter(wr, " ")
wri := terminal.NewIndenter(wr, " ") wri := t.NewIndenter(wr, " ")
if len(p.LocalCandidateStats) > 0 { if len(p.LocalCandidateStats) > 0 {
slices.SortFunc(p.LocalCandidateStats, func(a, b *CandidateStats) bool { return a.Priority < b.Priority }) slices.SortFunc(p.LocalCandidateStats, func(a, b *CandidateStats) bool { return a.Priority < b.Priority })
if _, err := terminal.FprintKV(wr, "local"); err != nil { if _, err := t.FprintKV(wr, "local"); err != nil {
return err return err
} }
@@ -116,9 +111,9 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
cmap[cs.Id] = i cmap[cs.Id] = i
v = fmt.Sprintf("l%d", i) v = fmt.Sprintf("l%d", i)
if isNominated := cs.Id == cpsNom.LocalCandidateId; isNominated { if isNominated := cs.Id == cpsNom.LocalCandidateId; isNominated {
v = terminal.Mods(v, terminal.FgRed) v = t.Mods(v, t.FgRed)
} }
if _, err := terminal.FprintKV(wri, v, cs.ToString()); err != nil { if _, err := t.FprintKV(wri, v, cs.ToString()); err != nil {
return err return err
} }
} }
@@ -127,7 +122,7 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
if len(p.RemoteCandidateStats) > 0 { if len(p.RemoteCandidateStats) > 0 {
slices.SortFunc(p.RemoteCandidateStats, func(a, b *CandidateStats) bool { return a.Priority < b.Priority }) slices.SortFunc(p.RemoteCandidateStats, func(a, b *CandidateStats) bool { return a.Priority < b.Priority })
if _, err := terminal.FprintKV(wr, "\nremote"); err != nil { if _, err := t.FprintKV(wr, "\nremote"); err != nil {
return err return err
} }
@@ -135,16 +130,16 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
cmap[cs.Id] = i cmap[cs.Id] = i
v = fmt.Sprintf("r%d", i) v = fmt.Sprintf("r%d", i)
if isNominated := cs.Id == cpsNom.RemoteCandidateId; isNominated { if isNominated := cs.Id == cpsNom.RemoteCandidateId; isNominated {
v = terminal.Mods(v, terminal.FgRed) v = t.Mods(v, t.FgRed)
} }
if _, err := terminal.FprintKV(wri, v, cs.ToString()); err != nil { if _, err := t.FprintKV(wri, v, cs.ToString()); err != nil {
return err return err
} }
} }
} }
if len(p.CandidatePairStats) > 0 && verbosity > 6 { if len(p.CandidatePairStats) > 0 && verbosity > 6 {
if _, err := terminal.FprintKV(wr, "\npairs"); err != nil { if _, err := t.FprintKV(wr, "\npairs"); err != nil {
return err return err
} }
@@ -158,14 +153,14 @@ func (p *Peer) Dump(wr io.Writer, verbosity int) error {
v = fmt.Sprintf("p%d", i) v = fmt.Sprintf("p%d", i)
if cps.Nominated { if cps.Nominated {
v = terminal.Mods(v, terminal.FgRed) v = t.Mods(v, t.FgRed)
} }
if cps.Nominated { if cps.Nominated {
flags = append(flags, "nominated") flags = append(flags, "nominated")
} }
if _, err := terminal.FprintKV(wri, v, fmt.Sprintf("l%d <-> r%d, %s", if _, err := t.FprintKV(wri, v, fmt.Sprintf("l%d <-> r%d, %s",
lci, rci, lci, rci,
strings.Join(flags, ", "), strings.Join(flags, ", "),
)); err != nil { )); err != nil {
@@ -242,30 +237,23 @@ func (s *ConnectionState) ConnectionState() icex.ConnectionState {
func (s *ConnectionState) Color() string { func (s *ConnectionState) Color() string {
switch *s { switch *s {
case ConnectionState_CHECKING: case ConnectionState_CHECKING:
return terminal.FgYellow return t.FgYellow
case ConnectionState_CONNECTED: case ConnectionState_CONNECTED:
return terminal.FgGreen return t.FgGreen
case ConnectionState_FAILED: case ConnectionState_FAILED,
fallthrough ConnectionState_DISCONNECTED:
case ConnectionState_DISCONNECTED: return t.FgRed
return terminal.FgRed case ConnectionState_NEW,
case ConnectionState_NEW: ConnectionState_COMPLETED,
fallthrough ConnectionState_CLOSED,
case ConnectionState_COMPLETED: ConnectionState_CREATING,
fallthrough ConnectionState_CLOSING,
case ConnectionState_CLOSED: ConnectionState_CONNECTING,
fallthrough ConnectionState_IDLE:
case ConnectionState_CREATING: return t.FgWhite
fallthrough
case ConnectionState_CLOSING:
fallthrough
case ConnectionState_CONNECTING:
fallthrough
case ConnectionState_IDLE:
return terminal.FgWhite
} }
return terminal.FgDefault return t.FgDefault
} }
func (s *ConnectionState) MarshalText() ([]byte, error) { func (s *ConnectionState) MarshalText() ([]byte, error) {

View File

@@ -96,64 +96,6 @@ func (ConnectionState) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_proto_rawDescGZIP(), []int{0} return file_feature_epdisc_proto_rawDescGZIP(), []int{0}
} }
type Reachability int32
const (
Reachability_NO_REACHABILITY Reachability = 0
Reachability_DIRECT_UDP Reachability = 1
Reachability_DIRECT_TCP Reachability = 2
Reachability_RELAY_UDP Reachability = 3
Reachability_RELAY_TCP Reachability = 4
Reachability_ROUTED Reachability = 5
)
// Enum value maps for Reachability.
var (
Reachability_name = map[int32]string{
0: "NO_REACHABILITY",
1: "DIRECT_UDP",
2: "DIRECT_TCP",
3: "RELAY_UDP",
4: "RELAY_TCP",
5: "ROUTED",
}
Reachability_value = map[string]int32{
"NO_REACHABILITY": 0,
"DIRECT_UDP": 1,
"DIRECT_TCP": 2,
"RELAY_UDP": 3,
"RELAY_TCP": 4,
"ROUTED": 5,
}
)
func (x Reachability) Enum() *Reachability {
p := new(Reachability)
*p = x
return p
}
func (x Reachability) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Reachability) Descriptor() protoreflect.EnumDescriptor {
return file_feature_epdisc_proto_enumTypes[1].Descriptor()
}
func (Reachability) Type() protoreflect.EnumType {
return &file_feature_epdisc_proto_enumTypes[1]
}
func (x Reachability) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Reachability.Descriptor instead.
func (Reachability) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_proto_rawDescGZIP(), []int{1}
}
type NATType int32 type NATType int32
const ( const (
@@ -184,11 +126,11 @@ func (x NATType) String() string {
} }
func (NATType) Descriptor() protoreflect.EnumDescriptor { func (NATType) Descriptor() protoreflect.EnumDescriptor {
return file_feature_epdisc_proto_enumTypes[2].Descriptor() return file_feature_epdisc_proto_enumTypes[1].Descriptor()
} }
func (NATType) Type() protoreflect.EnumType { func (NATType) Type() protoreflect.EnumType {
return &file_feature_epdisc_proto_enumTypes[2] return &file_feature_epdisc_proto_enumTypes[1]
} }
func (x NATType) Number() protoreflect.EnumNumber { func (x NATType) Number() protoreflect.EnumNumber {
@@ -197,7 +139,7 @@ func (x NATType) Number() protoreflect.EnumNumber {
// Deprecated: Use NATType.Descriptor instead. // Deprecated: Use NATType.Descriptor instead.
func (NATType) EnumDescriptor() ([]byte, []int) { func (NATType) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_proto_rawDescGZIP(), []int{2} return file_feature_epdisc_proto_rawDescGZIP(), []int{1}
} }
type ProxyType int32 type ProxyType int32
@@ -236,11 +178,11 @@ func (x ProxyType) String() string {
} }
func (ProxyType) Descriptor() protoreflect.EnumDescriptor { func (ProxyType) Descriptor() protoreflect.EnumDescriptor {
return file_feature_epdisc_proto_enumTypes[3].Descriptor() return file_feature_epdisc_proto_enumTypes[2].Descriptor()
} }
func (ProxyType) Type() protoreflect.EnumType { func (ProxyType) Type() protoreflect.EnumType {
return &file_feature_epdisc_proto_enumTypes[3] return &file_feature_epdisc_proto_enumTypes[2]
} }
func (x ProxyType) Number() protoreflect.EnumNumber { func (x ProxyType) Number() protoreflect.EnumNumber {
@@ -249,7 +191,7 @@ func (x ProxyType) Number() protoreflect.EnumNumber {
// Deprecated: Use ProxyType.Descriptor instead. // Deprecated: Use ProxyType.Descriptor instead.
func (ProxyType) EnumDescriptor() ([]byte, []int) { func (ProxyType) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_proto_rawDescGZIP(), []int{3} return file_feature_epdisc_proto_rawDescGZIP(), []int{2}
} }
type Credentials struct { type Credentials struct {
@@ -394,7 +336,6 @@ type Peer struct {
CandidatePairStats []*CandidatePairStats `protobuf:"bytes,8,rep,name=candidate_pair_stats,json=candidatePairStats,proto3" json:"candidate_pair_stats,omitempty"` CandidatePairStats []*CandidatePairStats `protobuf:"bytes,8,rep,name=candidate_pair_stats,json=candidatePairStats,proto3" json:"candidate_pair_stats,omitempty"`
LastStateChangeTimestamp *proto.Timestamp `protobuf:"bytes,9,opt,name=last_state_change_timestamp,json=lastStateChangeTimestamp,proto3" json:"last_state_change_timestamp,omitempty"` LastStateChangeTimestamp *proto.Timestamp `protobuf:"bytes,9,opt,name=last_state_change_timestamp,json=lastStateChangeTimestamp,proto3" json:"last_state_change_timestamp,omitempty"`
Restarts uint32 `protobuf:"varint,10,opt,name=restarts,proto3" json:"restarts,omitempty"` Restarts uint32 `protobuf:"varint,10,opt,name=restarts,proto3" json:"restarts,omitempty"`
Reachability Reachability `protobuf:"varint,11,opt,name=reachability,proto3,enum=cunicu.epdisc.Reachability" json:"reachability,omitempty"`
} }
func (x *Peer) Reset() { func (x *Peer) Reset() {
@@ -485,13 +426,6 @@ func (x *Peer) GetRestarts() uint32 {
return 0 return 0
} }
func (x *Peer) GetReachability() Reachability {
if x != nil {
return x.Reachability
}
return Reachability_NO_REACHABILITY
}
var File_feature_epdisc_proto protoreflect.FileDescriptor var File_feature_epdisc_proto protoreflect.FileDescriptor
var file_feature_epdisc_proto_rawDesc = []byte{ var file_feature_epdisc_proto_rawDesc = []byte{
@@ -513,7 +447,7 @@ var file_feature_epdisc_proto_rawDesc = []byte{
0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x75, 0x78, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6d, 0x75, 0x78,
0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x75, 0x78, 0x5f, 0x73, 0x72, 0x66, 0x6c, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x75, 0x78, 0x5f, 0x73, 0x72, 0x66, 0x6c,
0x78, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x75, 0x78, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x75,
0x78, 0x53, 0x72, 0x66, 0x6c, 0x78, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xf7, 0x04, 0x0a, 0x04, 0x50, 0x78, 0x53, 0x72, 0x66, 0x6c, 0x78, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xb6, 0x04, 0x0a, 0x04, 0x50,
0x65, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75,
0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x79, 0x70, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x79, 0x70,
@@ -549,28 +483,17 @@ var file_feature_epdisc_proto_rawDesc = []byte{
0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x61,
0x72, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x73, 0x74, 0x61,
0x72, 0x74, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x72, 0x74, 0x73, 0x2a, 0xa5, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
0x69, 0x74, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x00,
0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d,
0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x0a,
0x6c, 0x69, 0x74, 0x79, 0x2a, 0xa5, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06,
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x4e, 0x45, 0x57, 0x10, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53, 0x43,
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c,
0x0d, 0x0a, 0x09, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0d, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54, 0x49,
0x0a, 0x09, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x4e, 0x47, 0x10, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x65, 0x12, 0x0e,
0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x49, 0x53, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x66, 0x12, 0x0b,
0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x0a, 0x07, 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x67, 0x2a, 0x29, 0x0a, 0x07, 0x4e,
0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x45, 0x41, 0x54,
0x49, 0x4e, 0x47, 0x10, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x44, 0x4c, 0x45, 0x10, 0x65, 0x12,
0x0e, 0x0a, 0x0a, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x66, 0x12,
0x0b, 0x0a, 0x07, 0x43, 0x4c, 0x4f, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x67, 0x2a, 0x6d, 0x0a, 0x0c,
0x52, 0x65, 0x61, 0x63, 0x68, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x13, 0x0a, 0x0f,
0x4e, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x48, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x10,
0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x55, 0x44, 0x50, 0x10,
0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x54, 0x43, 0x50, 0x10,
0x02, 0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x55, 0x44, 0x50, 0x10, 0x03,
0x12, 0x0d, 0x0a, 0x09, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x04, 0x12,
0x0a, 0x0a, 0x06, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x44, 0x10, 0x05, 0x2a, 0x29, 0x0a, 0x07, 0x4e,
0x41, 0x54, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x4f, 0x41, 0x54, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x4f,
0x4e, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x46, 0x54, 0x41, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4e, 0x41, 0x54, 0x5f, 0x4e, 0x46, 0x54, 0x41,
0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54, 0x42, 0x4c, 0x45, 0x53, 0x10, 0x01, 0x2a, 0x49, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x54,
@@ -596,36 +519,34 @@ func file_feature_epdisc_proto_rawDescGZIP() []byte {
return file_feature_epdisc_proto_rawDescData return file_feature_epdisc_proto_rawDescData
} }
var file_feature_epdisc_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_feature_epdisc_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_feature_epdisc_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_feature_epdisc_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_feature_epdisc_proto_goTypes = []interface{}{ var file_feature_epdisc_proto_goTypes = []interface{}{
(ConnectionState)(0), // 0: cunicu.epdisc.ConnectionState (ConnectionState)(0), // 0: cunicu.epdisc.ConnectionState
(Reachability)(0), // 1: cunicu.epdisc.Reachability (NATType)(0), // 1: cunicu.epdisc.NATType
(NATType)(0), // 2: cunicu.epdisc.NATType (ProxyType)(0), // 2: cunicu.epdisc.ProxyType
(ProxyType)(0), // 3: cunicu.epdisc.ProxyType (*Credentials)(nil), // 3: cunicu.epdisc.Credentials
(*Credentials)(nil), // 4: cunicu.epdisc.Credentials (*Interface)(nil), // 4: cunicu.epdisc.Interface
(*Interface)(nil), // 5: cunicu.epdisc.Interface (*Peer)(nil), // 5: cunicu.epdisc.Peer
(*Peer)(nil), // 6: cunicu.epdisc.Peer (*CandidatePair)(nil), // 6: cunicu.epdisc.CandidatePair
(*CandidatePair)(nil), // 7: cunicu.epdisc.CandidatePair (*CandidateStats)(nil), // 7: cunicu.epdisc.CandidateStats
(*CandidateStats)(nil), // 8: cunicu.epdisc.CandidateStats (*CandidatePairStats)(nil), // 8: cunicu.epdisc.CandidatePairStats
(*CandidatePairStats)(nil), // 9: cunicu.epdisc.CandidatePairStats (*proto.Timestamp)(nil), // 9: cunicu.Timestamp
(*proto.Timestamp)(nil), // 10: cunicu.Timestamp
} }
var file_feature_epdisc_proto_depIdxs = []int32{ var file_feature_epdisc_proto_depIdxs = []int32{
2, // 0: cunicu.epdisc.Interface.nat_type:type_name -> cunicu.epdisc.NATType 1, // 0: cunicu.epdisc.Interface.nat_type:type_name -> cunicu.epdisc.NATType
3, // 1: cunicu.epdisc.Peer.proxy_type:type_name -> cunicu.epdisc.ProxyType 2, // 1: cunicu.epdisc.Peer.proxy_type:type_name -> cunicu.epdisc.ProxyType
0, // 2: cunicu.epdisc.Peer.state:type_name -> cunicu.epdisc.ConnectionState 0, // 2: cunicu.epdisc.Peer.state:type_name -> cunicu.epdisc.ConnectionState
7, // 3: cunicu.epdisc.Peer.selected_candidate_pair:type_name -> cunicu.epdisc.CandidatePair 6, // 3: cunicu.epdisc.Peer.selected_candidate_pair:type_name -> cunicu.epdisc.CandidatePair
8, // 4: cunicu.epdisc.Peer.local_candidate_stats:type_name -> cunicu.epdisc.CandidateStats 7, // 4: cunicu.epdisc.Peer.local_candidate_stats:type_name -> cunicu.epdisc.CandidateStats
8, // 5: cunicu.epdisc.Peer.remote_candidate_stats:type_name -> cunicu.epdisc.CandidateStats 7, // 5: cunicu.epdisc.Peer.remote_candidate_stats:type_name -> cunicu.epdisc.CandidateStats
9, // 6: cunicu.epdisc.Peer.candidate_pair_stats:type_name -> cunicu.epdisc.CandidatePairStats 8, // 6: cunicu.epdisc.Peer.candidate_pair_stats:type_name -> cunicu.epdisc.CandidatePairStats
10, // 7: cunicu.epdisc.Peer.last_state_change_timestamp:type_name -> cunicu.Timestamp 9, // 7: cunicu.epdisc.Peer.last_state_change_timestamp:type_name -> cunicu.Timestamp
1, // 8: cunicu.epdisc.Peer.reachability:type_name -> cunicu.epdisc.Reachability 8, // [8:8] is the sub-list for method output_type
9, // [9:9] is the sub-list for method output_type 8, // [8:8] is the sub-list for method input_type
9, // [9:9] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee
9, // [9:9] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name
0, // [0:9] is the sub-list for field type_name
} }
func init() { file_feature_epdisc_proto_init() } func init() { file_feature_epdisc_proto_init() }
@@ -677,7 +598,7 @@ func file_feature_epdisc_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_feature_epdisc_proto_rawDesc, RawDescriptor: file_feature_epdisc_proto_rawDesc,
NumEnums: 4, NumEnums: 3,
NumMessages: 3, NumMessages: 3,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,

View File

@@ -187,7 +187,7 @@ func (c *Candidate) ToString() string {
} }
var nt string var nt string
if c.Type == CandidateType_CANDIDATE_TYPE_RELAY && c.RelayProtocol != Protocol_UNKNOWN_PROTOCOL { if c.Type == CandidateType_CANDIDATE_TYPE_RELAY && c.RelayProtocol != RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED {
nt = fmt.Sprintf("%s->%s", nt = fmt.Sprintf("%s->%s",
c.RelayProtocol.ToString(), c.RelayProtocol.ToString(),
ice.NetworkType(c.NetworkType), ice.NetworkType(c.NetworkType),
@@ -209,7 +209,7 @@ func (cs *CandidateStats) ToString() string {
} }
var nt string var nt string
if cs.CandidateType == CandidateType_CANDIDATE_TYPE_RELAY && cs.RelayProtocol != Protocol_UNKNOWN_PROTOCOL { if cs.CandidateType == CandidateType_CANDIDATE_TYPE_RELAY && cs.RelayProtocol != RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED {
nt = fmt.Sprintf("%s->%s", nt = fmt.Sprintf("%s->%s",
cs.RelayProtocol.ToString(), cs.RelayProtocol.ToString(),
ice.NetworkType(cs.NetworkType), ice.NetworkType(cs.NetworkType),

View File

@@ -251,58 +251,58 @@ func (TCPType) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_candidate_proto_rawDescGZIP(), []int{3} return file_feature_epdisc_candidate_proto_rawDescGZIP(), []int{3}
} }
type Protocol int32 type RelayProtocol int32
const ( const (
Protocol_UNKNOWN_PROTOCOL Protocol = 0 RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED RelayProtocol = 0
Protocol_UDP Protocol = 1 RelayProtocol_RELAY_PROTOCOL_UDP RelayProtocol = 1
Protocol_TCP Protocol = 2 RelayProtocol_RELAY_PROTOCOL_TCP RelayProtocol = 2
Protocol_TLS Protocol = 3 RelayProtocol_RELAY_PROTOCOL_TLS RelayProtocol = 3
Protocol_DTLS Protocol = 4 RelayProtocol_RELAY_PROTOCOL_DTLS RelayProtocol = 4
) )
// Enum value maps for Protocol. // Enum value maps for RelayProtocol.
var ( var (
Protocol_name = map[int32]string{ RelayProtocol_name = map[int32]string{
0: "UNKNOWN_PROTOCOL", 0: "RELAY_PROTOCOL_UNSPECIFIED",
1: "UDP", 1: "RELAY_PROTOCOL_UDP",
2: "TCP", 2: "RELAY_PROTOCOL_TCP",
3: "TLS", 3: "RELAY_PROTOCOL_TLS",
4: "DTLS", 4: "RELAY_PROTOCOL_DTLS",
} }
Protocol_value = map[string]int32{ RelayProtocol_value = map[string]int32{
"UNKNOWN_PROTOCOL": 0, "RELAY_PROTOCOL_UNSPECIFIED": 0,
"UDP": 1, "RELAY_PROTOCOL_UDP": 1,
"TCP": 2, "RELAY_PROTOCOL_TCP": 2,
"TLS": 3, "RELAY_PROTOCOL_TLS": 3,
"DTLS": 4, "RELAY_PROTOCOL_DTLS": 4,
} }
) )
func (x Protocol) Enum() *Protocol { func (x RelayProtocol) Enum() *RelayProtocol {
p := new(Protocol) p := new(RelayProtocol)
*p = x *p = x
return p return p
} }
func (x Protocol) String() string { func (x RelayProtocol) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
} }
func (Protocol) Descriptor() protoreflect.EnumDescriptor { func (RelayProtocol) Descriptor() protoreflect.EnumDescriptor {
return file_feature_epdisc_candidate_proto_enumTypes[4].Descriptor() return file_feature_epdisc_candidate_proto_enumTypes[4].Descriptor()
} }
func (Protocol) Type() protoreflect.EnumType { func (RelayProtocol) Type() protoreflect.EnumType {
return &file_feature_epdisc_candidate_proto_enumTypes[4] return &file_feature_epdisc_candidate_proto_enumTypes[4]
} }
func (x Protocol) Number() protoreflect.EnumNumber { func (x RelayProtocol) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x) return protoreflect.EnumNumber(x)
} }
// Deprecated: Use Protocol.Descriptor instead. // Deprecated: Use RelayProtocol.Descriptor instead.
func (Protocol) EnumDescriptor() ([]byte, []int) { func (RelayProtocol) EnumDescriptor() ([]byte, []int) {
return file_feature_epdisc_candidate_proto_rawDescGZIP(), []int{4} return file_feature_epdisc_candidate_proto_rawDescGZIP(), []int{4}
} }
@@ -443,7 +443,7 @@ type Candidate struct {
// The related address conveys transport addresses related to the candidate, useful for diagnostics and other purposes. // The related address conveys transport addresses related to the candidate, useful for diagnostics and other purposes.
RelatedAddress *RelatedAddress `protobuf:"bytes,9,opt,name=related_address,json=relatedAddress,proto3" json:"related_address,omitempty"` RelatedAddress *RelatedAddress `protobuf:"bytes,9,opt,name=related_address,json=relatedAddress,proto3" json:"related_address,omitempty"`
// The protocol used between the endpoint and the relay server. // The protocol used between the endpoint and the relay server.
RelayProtocol Protocol `protobuf:"varint,10,opt,name=relay_protocol,json=relayProtocol,proto3,enum=cunicu.epdisc.Protocol" json:"relay_protocol,omitempty"` RelayProtocol RelayProtocol `protobuf:"varint,10,opt,name=relay_protocol,json=relayProtocol,proto3,enum=cunicu.epdisc.RelayProtocol" json:"relay_protocol,omitempty"`
} }
func (x *Candidate) Reset() { func (x *Candidate) Reset() {
@@ -541,11 +541,11 @@ func (x *Candidate) GetRelatedAddress() *RelatedAddress {
return nil return nil
} }
func (x *Candidate) GetRelayProtocol() Protocol { func (x *Candidate) GetRelayProtocol() RelayProtocol {
if x != nil { if x != nil {
return x.RelayProtocol return x.RelayProtocol
} }
return Protocol_UNKNOWN_PROTOCOL return RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED
} }
// CandidatePairStats contains ICE candidate pair statistics // CandidatePairStats contains ICE candidate pair statistics
@@ -904,7 +904,7 @@ type CandidateStats struct {
// RelayProtocol is the protocol used by the endpoint to communicate with the // RelayProtocol is the protocol used by the endpoint to communicate with the
// TURN server. This is only present for local candidates. Valid values for // TURN server. This is only present for local candidates. Valid values for
// the TURN URL protocol is one of udp, tcp, or tls. // the TURN URL protocol is one of udp, tcp, or tls.
RelayProtocol Protocol `protobuf:"varint,9,opt,name=relay_protocol,json=relayProtocol,proto3,enum=cunicu.epdisc.Protocol" json:"relay_protocol,omitempty"` RelayProtocol RelayProtocol `protobuf:"varint,9,opt,name=relay_protocol,json=relayProtocol,proto3,enum=cunicu.epdisc.RelayProtocol" json:"relay_protocol,omitempty"`
// Deleted is true if the candidate has been deleted/freed. For host candidates, // Deleted is true if the candidate has been deleted/freed. For host candidates,
// this means that any network resources (typically a socket) associated with the // this means that any network resources (typically a socket) associated with the
// candidate have been released. For TURN candidates, this means the TURN allocation // candidate have been released. For TURN candidates, this means the TURN allocation
@@ -1002,11 +1002,11 @@ func (x *CandidateStats) GetUrl() string {
return "" return ""
} }
func (x *CandidateStats) GetRelayProtocol() Protocol { func (x *CandidateStats) GetRelayProtocol() RelayProtocol {
if x != nil { if x != nil {
return x.RelayProtocol return x.RelayProtocol
} }
return Protocol_UNKNOWN_PROTOCOL return RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED
} }
func (x *CandidateStats) GetDeleted() bool { func (x *CandidateStats) GetDeleted() bool {
@@ -1034,7 +1034,7 @@ var file_feature_epdisc_candidate_proto_rawDesc = []byte{
0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74,
0x22, 0xbf, 0x03, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30, 0x22, 0xc4, 0x03, 0x0a, 0x09, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x30,
0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63,
0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43, 0x61, 0x6e,
0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65,
@@ -1058,176 +1058,181 @@ var file_feature_epdisc_candidate_proto_rawDesc = []byte{
0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64,
0x69, 0x73, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x69, 0x73, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x12, 0x3e, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x73, 0x73, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x75, 0x6e, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x75, 0x6e,
0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79,
0x63, 0x6f, 0x6c, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50,
0x6f, 0x6c, 0x22, 0xd5, 0x0b, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x22, 0xd5, 0x0b, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x64,
0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12,
0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61,
0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a,
0x13, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74,
0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f,
0x74, 0x65, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a,
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63,
0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43, 0x61, 0x6e,
0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52,
0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61,
0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f,
0x73, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x65,
0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28,
0x0d, 0x52, 0x0f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74,
0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e,
0x74, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73,
0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x1a, 0x6c, 0x61, 0x73, 0x74,
0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63,
0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x6f, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x54,
0x63, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x56, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64,
0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x72, 0x65, 0x6d, 0x6f, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
0x74, 0x65, 0x5f, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x61, 0x6e,
0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x37, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75,
0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74,
0x65, 0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05,
0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x64, 0x12,
0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18,
0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65,
0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x5f, 0x72, 0x65,
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x70, 0x61,
0x63, 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x1d, 0x0a,
0x0a, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28,
0x04, 0x52, 0x09, 0x62, 0x79, 0x74, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e,
0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x09,
0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x64, 0x12, 0x4e, 0x0a, 0x1a, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75,
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x6c, 0x61, 0x73, 0x74,
0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x12, 0x56, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x70, 0x61, 0x63, 0x6b,
0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75,
0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1b,
0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76,
0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, 0x17, 0x66,
0x69, 0x72, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63,
0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
0x15, 0x66, 0x69, 0x72, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x16, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x14, 0x6c, 0x61, 0x73, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12,
0x49, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x61, 0x6d, 0x70, 0x52, 0x1b, 0x6c, 0x61, 0x73, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x52,
0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x74, 0x69, 0x12, 0x49, 0x0a, 0x17, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0c, 0x20, 0x01, 0x28,
0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x5f, 0x74, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x15, 0x66, 0x69, 0x72, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x63, 0x75, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x47, 0x0a, 0x16, 0x6c,
0x72, 0x72, 0x65, 0x6e, 0x54, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x54, 0x69, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75,
0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x69, 0x74, 0x72, 0x61, 0x74, 0x65, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x14,
0x18, 0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73,
0x65, 0x4f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x69, 0x74, 0x72, 0x61, 0x74, 0x65, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x49, 0x0a, 0x17, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73,
0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x69, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x12, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54,
0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x15, 0x6c, 0x61, 0x73, 0x74, 0x52, 0x65,
0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x69, 0x74, 0x72, 0x61, 0x74, 0x65, 0x12, 0x41, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12,
0x0a, 0x1d, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x30, 0x0a, 0x14, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72,
0x72, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x69, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x12, 0x74,
0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1a, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x42, 0x72, 0x6f, 0x74, 0x61, 0x6c, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x54, 0x69, 0x6d,
0x65, 0x61, 0x6b, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x5f, 0x74, 0x72, 0x6f, 0x75,
0x74, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x6e, 0x64, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28,
0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x72, 0x65, 0x01, 0x52, 0x14, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x54, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x74,
0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x23, 0x72, 0x69, 0x70, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x76, 0x61, 0x69, 0x6c,
0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x69,
0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x61, 0x76, 0x61,
0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x42, 0x69,
0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x74, 0x72, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62,
0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x69, 0x74, 0x72,
0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x5f, 0x61, 0x74, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x01, 0x52, 0x18, 0x61, 0x76, 0x61, 0x69, 0x6c,
0x73, 0x65, 0x6e, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x42, 0x69, 0x74, 0x72,
0x6f, 0x6e, 0x73, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x18, 0x72, 0x65, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x1d, 0x63, 0x69, 0x72, 0x63, 0x75, 0x69, 0x74, 0x5f, 0x62,
0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x63,
0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x72, 0x65, 0x74, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1a, 0x63, 0x69, 0x72, 0x63,
0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x63, 0x65, 0x75, 0x69, 0x74, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x65, 0x72, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65,
0x69, 0x76, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x19, 0x20, 0x01, 0x74, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x14, 0x20, 0x01, 0x28,
0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x04, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69,
0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x76, 0x65, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f,
0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x15, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, 0x71, 0x75,
0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x70,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x4d, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x16,
0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x52,
0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f,
0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x6e, 0x73, 0x65, 0x73, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x17, 0x20, 0x01, 0x28, 0x04, 0x52,
0x70, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x39,
0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x81, 0x03, 0x0a, 0x0e, 0x43, 0x0a, 0x18, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x73, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x18, 0x20, 0x01, 0x28, 0x04,
0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x52, 0x17, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x72, 0x65, 0x74,
0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x72, 0x61, 0x6e, 0x73, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x73, 0x65, 0x6e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x72, 0x65, 0x74, 0x72, 0x61, 0x6e, 0x73,
0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73,
0x64, 0x69, 0x73, 0x63, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x13, 0x63, 0x6f, 0x6e,
0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74,
0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x12, 0x4d, 0x0a, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x69,
0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x1b, 0x20,
0x74, 0x12, 0x43, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54, 0x69, 0x6d,
0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x17, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x74, 0x45,
0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22,
0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x86, 0x03, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61,
0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x54,
0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x03, 0x75, 0x72, 0x6c, 0x12, 0x3e, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x61, 0x6d, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x63, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0c, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x74,
0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x75, 0x6e, 0x69,
0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79,
0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x2a, 0xc6, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
0x01, 0x0a, 0x12, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x69, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05,
0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x43, 0x0a, 0x0e, 0x63, 0x61, 0x6e, 0x64, 0x69, 0x64,
0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x2e, 0x43,
0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0d, 0x63, 0x61,
0x41, 0x54, 0x45, 0x5f, 0x57, 0x41, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70,
0x1f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70,
0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x4e, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x08,
0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x43, 0x0a, 0x0e, 0x72, 0x65, 0x6c,
0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x61, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28,
0x44, 0x10, 0x03, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x0e, 0x32, 0x1c, 0x2e, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2e, 0x65, 0x70, 0x64, 0x69, 0x73,
0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52,
0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xaa, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x64, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x18,
0x69, 0x64, 0x61, 0x74, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x4e, 0x0a, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52,
0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x2a, 0xc6, 0x01, 0x0a, 0x12, 0x43, 0x61, 0x6e,
0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x4e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x69, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12,
0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x24, 0x0a, 0x20, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49,
0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x46, 0x4c, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41,
0x45, 0x58, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x41,
0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x52, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x43, 0x41, 0x4e, 0x44, 0x49,
0x45, 0x46, 0x4c, 0x45, 0x58, 0x49, 0x56, 0x45, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f,
0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x49, 0x4e, 0x50, 0x52, 0x4f, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b,
0x41, 0x59, 0x10, 0x04, 0x2a, 0x87, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x53,
0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x18, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x03, 0x12, 0x22, 0x0a,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x1e, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x5f,
0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10,
0x50, 0x45, 0x5f, 0x55, 0x44, 0x50, 0x34, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x04, 0x2a, 0xaa, 0x01, 0x0a, 0x0d, 0x43, 0x61, 0x6e, 0x64, 0x69, 0x64, 0x61, 0x74, 0x65, 0x54,
0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50, 0x36, 0x10, 0x02, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45,
0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45,
0x5f, 0x54, 0x43, 0x50, 0x34, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f,
0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x36, 0x10, 0x04, 0x2a, 0x6e,
0x0a, 0x07, 0x54, 0x43, 0x50, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x43, 0x50,
0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x43, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45,
0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x43, 0x50, 0x5f, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x1e, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53,
0x0a, 0x1a, 0x54, 0x43, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4d, 0x55, 0x4c, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x46, 0x4c, 0x45, 0x58, 0x49, 0x56, 0x45, 0x10,
0x54, 0x41, 0x4e, 0x45, 0x4f, 0x55, 0x53, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x03, 0x2a, 0x45, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54,
0x0a, 0x08, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x10, 0x55, 0x4e, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x46, 0x4c, 0x45, 0x58, 0x49,
0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x10, 0x00, 0x56, 0x45, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54,
0x12, 0x07, 0x0a, 0x03, 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x10, 0x04, 0x2a, 0x87,
0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x01, 0x0a, 0x0b, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
0x54, 0x4c, 0x53, 0x10, 0x04, 0x42, 0x32, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x0a, 0x18, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x76, 0x30, 0x67, 0x2f, 0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11,
0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50,
0x72, 0x65, 0x2f, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x34, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54,
0x33, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x44, 0x50, 0x36, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45,
0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x43, 0x50, 0x34, 0x10,
0x03, 0x12, 0x15, 0x0a, 0x11, 0x4e, 0x45, 0x54, 0x57, 0x4f, 0x52, 0x4b, 0x5f, 0x54, 0x59, 0x50,
0x45, 0x5f, 0x54, 0x43, 0x50, 0x36, 0x10, 0x04, 0x2a, 0x6e, 0x0a, 0x07, 0x54, 0x43, 0x50, 0x54,
0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x43, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f,
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a,
0x0f, 0x54, 0x43, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45,
0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x43, 0x50, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50,
0x41, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x43, 0x50, 0x5f,
0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4d, 0x55, 0x4c, 0x54, 0x41, 0x4e, 0x45, 0x4f, 0x55,
0x53, 0x5f, 0x4f, 0x50, 0x45, 0x4e, 0x10, 0x03, 0x2a, 0x90, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6c,
0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45,
0x4c, 0x41, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53,
0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45,
0x4c, 0x41, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x44, 0x50,
0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54,
0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x45,
0x4c, 0x41, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x54, 0x4c, 0x53,
0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x54,
0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x44, 0x54, 0x4c, 0x53, 0x10, 0x04, 0x42, 0x32, 0x5a, 0x30, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x76, 0x30, 0x67, 0x2f,
0x63, 0x75, 0x6e, 0x69, 0x63, 0x75, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2f, 0x65, 0x70, 0x64, 0x69, 0x73, 0x63, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@@ -1249,7 +1254,7 @@ var file_feature_epdisc_candidate_proto_goTypes = []interface{}{
(CandidateType)(0), // 1: cunicu.epdisc.CandidateType (CandidateType)(0), // 1: cunicu.epdisc.CandidateType
(NetworkType)(0), // 2: cunicu.epdisc.NetworkType (NetworkType)(0), // 2: cunicu.epdisc.NetworkType
(TCPType)(0), // 3: cunicu.epdisc.TCPType (TCPType)(0), // 3: cunicu.epdisc.TCPType
(Protocol)(0), // 4: cunicu.epdisc.Protocol (RelayProtocol)(0), // 4: cunicu.epdisc.RelayProtocol
(*CandidatePair)(nil), // 5: cunicu.epdisc.CandidatePair (*CandidatePair)(nil), // 5: cunicu.epdisc.CandidatePair
(*RelatedAddress)(nil), // 6: cunicu.epdisc.RelatedAddress (*RelatedAddress)(nil), // 6: cunicu.epdisc.RelatedAddress
(*Candidate)(nil), // 7: cunicu.epdisc.Candidate (*Candidate)(nil), // 7: cunicu.epdisc.Candidate
@@ -1264,7 +1269,7 @@ var file_feature_epdisc_candidate_proto_depIdxs = []int32{
2, // 3: cunicu.epdisc.Candidate.network_type:type_name -> cunicu.epdisc.NetworkType 2, // 3: cunicu.epdisc.Candidate.network_type:type_name -> cunicu.epdisc.NetworkType
3, // 4: cunicu.epdisc.Candidate.tcp_type:type_name -> cunicu.epdisc.TCPType 3, // 4: cunicu.epdisc.Candidate.tcp_type:type_name -> cunicu.epdisc.TCPType
6, // 5: cunicu.epdisc.Candidate.related_address:type_name -> cunicu.epdisc.RelatedAddress 6, // 5: cunicu.epdisc.Candidate.related_address:type_name -> cunicu.epdisc.RelatedAddress
4, // 6: cunicu.epdisc.Candidate.relay_protocol:type_name -> cunicu.epdisc.Protocol 4, // 6: cunicu.epdisc.Candidate.relay_protocol:type_name -> cunicu.epdisc.RelayProtocol
10, // 7: cunicu.epdisc.CandidatePairStats.timestamp:type_name -> cunicu.Timestamp 10, // 7: cunicu.epdisc.CandidatePairStats.timestamp:type_name -> cunicu.Timestamp
0, // 8: cunicu.epdisc.CandidatePairStats.state:type_name -> cunicu.epdisc.CandidatePairState 0, // 8: cunicu.epdisc.CandidatePairStats.state:type_name -> cunicu.epdisc.CandidatePairState
10, // 9: cunicu.epdisc.CandidatePairStats.last_packet_sent_timestamp:type_name -> cunicu.Timestamp 10, // 9: cunicu.epdisc.CandidatePairStats.last_packet_sent_timestamp:type_name -> cunicu.Timestamp
@@ -1276,7 +1281,7 @@ var file_feature_epdisc_candidate_proto_depIdxs = []int32{
10, // 15: cunicu.epdisc.CandidateStats.timestamp:type_name -> cunicu.Timestamp 10, // 15: cunicu.epdisc.CandidateStats.timestamp:type_name -> cunicu.Timestamp
2, // 16: cunicu.epdisc.CandidateStats.network_type:type_name -> cunicu.epdisc.NetworkType 2, // 16: cunicu.epdisc.CandidateStats.network_type:type_name -> cunicu.epdisc.NetworkType
1, // 17: cunicu.epdisc.CandidateStats.candidate_type:type_name -> cunicu.epdisc.CandidateType 1, // 17: cunicu.epdisc.CandidateStats.candidate_type:type_name -> cunicu.epdisc.CandidateType
4, // 18: cunicu.epdisc.CandidateStats.relay_protocol:type_name -> cunicu.epdisc.Protocol 4, // 18: cunicu.epdisc.CandidateStats.relay_protocol:type_name -> cunicu.epdisc.RelayProtocol
19, // [19:19] is the sub-list for method output_type 19, // [19:19] is the sub-list for method output_type
19, // [19:19] is the sub-list for method input_type 19, // [19:19] is the sub-list for method input_type
19, // [19:19] is the sub-list for extension type_name 19, // [19:19] is the sub-list for extension type_name

View File

@@ -1,29 +1,29 @@
package epdisc package epdisc
func NewProtocol(rp string) Protocol { func NewProtocol(rp string) RelayProtocol {
switch rp { switch rp {
case "udp", "UDP": case "udp", "UDP":
return Protocol_UDP return RelayProtocol_RELAY_PROTOCOL_UDP
case "tcp": case "tcp":
return Protocol_TCP return RelayProtocol_RELAY_PROTOCOL_TCP
case "dtls": case "dtls":
return Protocol_DTLS return RelayProtocol_RELAY_PROTOCOL_DTLS
case "tls": case "tls":
return Protocol_TLS return RelayProtocol_RELAY_PROTOCOL_TLS
} }
return Protocol_UNKNOWN_PROTOCOL return RelayProtocol_RELAY_PROTOCOL_UNSPECIFIED
} }
func (p Protocol) ToString() string { func (p RelayProtocol) ToString() string {
switch p { switch p {
case Protocol_UDP: case RelayProtocol_RELAY_PROTOCOL_UDP:
return "udp" return "udp"
case Protocol_TCP: case RelayProtocol_RELAY_PROTOCOL_TCP:
return "tcp" return "tcp"
case Protocol_DTLS: case RelayProtocol_RELAY_PROTOCOL_DTLS:
return "dtls" return "dtls"
case Protocol_TLS: case RelayProtocol_RELAY_PROTOCOL_TLS:
return "tls" return "tls"
} }

View File

@@ -141,6 +141,7 @@ func (s *DaemonServer) GetStatus(ctx context.Context, p *rpcproto.GetStatusParam
if epi != nil { if epi != nil {
if epp, ok := epi.Peers[cp]; ok { if epp, ok := epi.Peers[cp]; ok {
qp.Ice = epp.Marshal() qp.Ice = epp.Marshal()
qp.Reachability = epp.Reachability()
} }
} }

View File

@@ -6,6 +6,16 @@ option go_package = "github.com/stv0g/cunicu/pkg/proto/core";
import "common.proto"; import "common.proto";
import "feature/epdisc.proto"; import "feature/epdisc.proto";
enum ReachabilityType {
REACHABILITY_TYPE_UNSPECIFIED = 0;
REACHABILITY_TYPE_UNKNOWN = 1;
REACHABILITY_TYPE_NONE = 2;
REACHABILITY_TYPE_DIRECT = 3;
REACHABILITY_TYPE_RELAYED = 4;
REACHABILITY_TYPE_RELAYED_BIDIR = 5;
REACHABILITY_TYPE_ROUTED = 6;
}
message Peer { message Peer {
string name = 1; string name = 1;
@@ -34,4 +44,6 @@ message Peer {
uint32 protocol_version = 12; uint32 protocol_version = 12;
epdisc.Peer ice = 13; epdisc.Peer ice = 13;
ReachabilityType reachability = 14;
} }

View File

@@ -23,15 +23,6 @@ enum ConnectionState {
CLOSING = 103; // ConnectionStateClosing ICE agent is now closing CLOSING = 103; // ConnectionStateClosing ICE agent is now closing
} }
enum Reachability {
NO_REACHABILITY = 0;
DIRECT_UDP = 1;
DIRECT_TCP = 2;
RELAY_UDP = 3;
RELAY_TCP = 4;
ROUTED = 5;
}
enum NATType { enum NATType {
NAT_NONE = 0; NAT_NONE = 0;
NAT_NFTABLES = 1; NAT_NFTABLES = 1;
@@ -74,5 +65,4 @@ message Peer {
Timestamp last_state_change_timestamp = 9; Timestamp last_state_change_timestamp = 9;
uint32 restarts = 10; uint32 restarts = 10;
Reachability reachability = 11;
} }

View File

@@ -53,12 +53,12 @@ enum TCPType {
TCP_TYPE_SIMULTANEOUS_OPEN = 3; TCP_TYPE_SIMULTANEOUS_OPEN = 3;
} }
enum Protocol { enum RelayProtocol {
UNKNOWN_PROTOCOL = 0; RELAY_PROTOCOL_UNSPECIFIED = 0;
UDP = 1; RELAY_PROTOCOL_UDP = 1;
TCP = 2; RELAY_PROTOCOL_TCP = 2;
TLS = 3; RELAY_PROTOCOL_TLS = 3;
DTLS = 4; RELAY_PROTOCOL_DTLS = 4;
} }
message CandidatePair { message CandidatePair {
@@ -102,7 +102,7 @@ message Candidate {
RelatedAddress related_address = 9; RelatedAddress related_address = 9;
// The protocol used between the endpoint and the relay server. // The protocol used between the endpoint and the relay server.
Protocol relay_protocol = 10; RelayProtocol relay_protocol = 10;
} }
// CandidatePairStats contains ICE candidate pair statistics // CandidatePairStats contains ICE candidate pair statistics
@@ -266,7 +266,7 @@ message CandidateStats {
// RelayProtocol is the protocol used by the endpoint to communicate with the // RelayProtocol is the protocol used by the endpoint to communicate with the
// TURN server. This is only present for local candidates. Valid values for // TURN server. This is only present for local candidates. Valid values for
// the TURN URL protocol is one of udp, tcp, or tls. // the TURN URL protocol is one of udp, tcp, or tls.
Protocol relay_protocol = 9; RelayProtocol relay_protocol = 9;
// Deleted is true if the candidate has been deleted/freed. For host candidates, // Deleted is true if the candidate has been deleted/freed. For host candidates,
// this means that any network resources (typically a socket) associated with the // this means that any network resources (typically a socket) associated with the