From c46e47aba850bddbb007c2d3f82bde71341d70ff Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 15 Jul 2023 16:25:54 +0300 Subject: [PATCH] Clean up some protobuf things --- libgm/binary/authentication.pb.go | 30 +-- libgm/binary/messages.pb.go | 294 +++++++++++--------------- libgm/binary/raw/authentication.proto | 2 +- libgm/binary/raw/messages.proto | 56 ++--- libgm/client.go | 5 +- libgm/payload/config.go | 11 +- libgm/qr.go | 8 +- libgm/util/func.go | 10 +- 8 files changed, 176 insertions(+), 240 deletions(-) diff --git a/libgm/binary/authentication.pb.go b/libgm/binary/authentication.pb.go index 1a98122..2f5ab7a 100644 --- a/libgm/binary/authentication.pb.go +++ b/libgm/binary/authentication.pb.go @@ -487,7 +487,7 @@ func (x *CurrentDeviceData) GetBrowser() *Device { return nil } -type UrlData struct { +type URLData struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -497,8 +497,8 @@ type UrlData struct { HMACKey []byte `protobuf:"bytes,3,opt,name=HMACKey,proto3" json:"HMACKey,omitempty"` } -func (x *UrlData) Reset() { - *x = UrlData{} +func (x *URLData) Reset() { + *x = URLData{} if protoimpl.UnsafeEnabled { mi := &file_authentication_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -506,13 +506,13 @@ func (x *UrlData) Reset() { } } -func (x *UrlData) String() string { +func (x *URLData) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UrlData) ProtoMessage() {} +func (*URLData) ProtoMessage() {} -func (x *UrlData) ProtoReflect() protoreflect.Message { +func (x *URLData) ProtoReflect() protoreflect.Message { mi := &file_authentication_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -524,26 +524,26 @@ func (x *UrlData) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UrlData.ProtoReflect.Descriptor instead. -func (*UrlData) Descriptor() ([]byte, []int) { +// Deprecated: Use URLData.ProtoReflect.Descriptor instead. +func (*URLData) Descriptor() ([]byte, []int) { return file_authentication_proto_rawDescGZIP(), []int{7} } -func (x *UrlData) GetPairingKey() []byte { +func (x *URLData) GetPairingKey() []byte { if x != nil { return x.PairingKey } return nil } -func (x *UrlData) GetAESKey() []byte { +func (x *URLData) GetAESKey() []byte { if x != nil { return x.AESKey } return nil } -func (x *UrlData) GetHMACKey() []byte { +func (x *URLData) GetHMACKey() []byte { if x != nil { return x.HMACKey } @@ -789,8 +789,8 @@ var file_authentication_proto_rawDesc = []byte{ 0x72, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x07, 0x55, 0x72, - 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, + 0x65, 0x52, 0x07, 0x62, 0x72, 0x6f, 0x77, 0x73, 0x65, 0x72, 0x22, 0x5b, 0x0a, 0x07, 0x55, 0x52, + 0x4c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x45, 0x53, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x41, 0x45, 0x53, 0x4b, 0x65, 0x79, 0x12, 0x18, 0x0a, @@ -840,7 +840,7 @@ var file_authentication_proto_goTypes = []interface{}{ (*KeyData)(nil), // 4: authentication.KeyData (*WebAuthKey)(nil), // 5: authentication.WebAuthKey (*CurrentDeviceData)(nil), // 6: authentication.CurrentDeviceData - (*UrlData)(nil), // 7: authentication.UrlData + (*URLData)(nil), // 7: authentication.URLData (*TokenData)(nil), // 8: authentication.TokenData (*PairedData)(nil), // 9: authentication.PairedData (*RevokePairData)(nil), // 10: authentication.RevokePairData @@ -964,7 +964,7 @@ func file_authentication_proto_init() { } } file_authentication_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UrlData); i { + switch v := v.(*URLData); i { case 0: return &v.state case 1: diff --git a/libgm/binary/messages.pb.go b/libgm/binary/messages.pb.go index 330d6b4..40691d4 100644 --- a/libgm/binary/messages.pb.go +++ b/libgm/binary/messages.pb.go @@ -553,27 +553,17 @@ type InternalMessageData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ResponseID string `protobuf:"bytes,1,opt,name=responseID,proto3" json:"responseID,omitempty"` - BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` - StartExecute string `protobuf:"bytes,3,opt,name=startExecute,proto3" json:"startExecute,omitempty"` - // bytes unknown4 = 4; + ResponseID string `protobuf:"bytes,1,opt,name=responseID,proto3" json:"responseID,omitempty"` + BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` + StartExecute string `protobuf:"bytes,3,opt,name=startExecute,proto3" json:"startExecute,omitempty"` MessageType MessageType `protobuf:"varint,5,opt,name=messageType,proto3,enum=messages.MessageType" json:"messageType,omitempty"` FinishExecute string `protobuf:"bytes,6,opt,name=finishExecute,proto3" json:"finishExecute,omitempty"` MillisecondsTaken string `protobuf:"bytes,7,opt,name=millisecondsTaken,proto3" json:"millisecondsTaken,omitempty"` Mobile *Device `protobuf:"bytes,8,opt,name=mobile,proto3" json:"mobile,omitempty"` Browser *Device `protobuf:"bytes,9,opt,name=browser,proto3" json:"browser,omitempty"` - // bytes unknown5 = 10; - // bytes unknown6 = 11; - ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` - // bytes unknown7 = 13; - // bytes unknown8 = 14; - // bytes unknown9 = 15; - // bytes unknown10 = 16; - SignatureID string `protobuf:"bytes,17,opt,name=signatureID,proto3" json:"signatureID,omitempty"` - // bytes unknown11 = 18; - // bytes unknown12 = 19; - // bytes unknown13 = 20; - Timestamp string `protobuf:"bytes,21,opt,name=timestamp,proto3" json:"timestamp,omitempty"` + ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` + SignatureID string `protobuf:"bytes,17,opt,name=signatureID,proto3" json:"signatureID,omitempty"` + Timestamp string `protobuf:"bytes,21,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } func (x *InternalMessageData) Reset() { @@ -788,12 +778,8 @@ type SendMessage struct { Mobile *Device `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"` MessageData *SendMessageData `protobuf:"bytes,2,opt,name=messageData,proto3" json:"messageData,omitempty"` MessageAuth *SendMessageAuth `protobuf:"bytes,3,opt,name=messageAuth,proto3" json:"messageAuth,omitempty"` - // bytes unknown1 = 4; - TTL int64 `protobuf:"varint,5,opt,name=TTL,proto3" json:"TTL,omitempty"` // might be something related to config - // bytes unknown2 = 6; - // bytes unknown3 = 7; - // bytes unknown4 = 8; - EmptyArr *EmptyArr `protobuf:"bytes,9,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` + TTL int64 `protobuf:"varint,5,opt,name=TTL,proto3" json:"TTL,omitempty"` // might be something related to config + EmptyArr *EmptyArr `protobuf:"bytes,9,opt,name=emptyArr,proto3" json:"emptyArr,omitempty"` } func (x *SendMessage) Reset() { @@ -868,11 +854,7 @@ type SendMessageAuth struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - // bytes unknown1 = 2; - // bytes unknown2 = 3; - // bytes unknown3 = 4; - // bytes unknown4 = 5; + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` TachyonAuthToken []byte `protobuf:"bytes,6,opt,name=tachyonAuthToken,proto3" json:"tachyonAuthToken,omitempty"` ConfigVersion *ConfigVersion `protobuf:"bytes,7,opt,name=configVersion,proto3" json:"configVersion,omitempty"` } @@ -1013,28 +995,9 @@ type SendMessageData struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` - BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` - // bytes unknown1 = 3; - // bytes unknown2 = 4; - // bytes unknown3 = 5; - // bytes unknown4 = 6; - // bytes unknown5 = 7; - // bytes unknown6 = 8; - // bytes unknown7 = 9; - // bytes unknown8 = 10; - // bytes unknown9 = 11; - ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` - // bytes unknown10 = 13; - // bytes unknown11 = 14; - // bytes unknown12 = 15; - // bytes unknown13 = 16; - // bytes unknown14 = 17; - // bytes unknown15 = 18; - // bytes unknown16 = 19; - // bytes unknown17 = 20; - // bytes unknown18 = 21; - // bytes unknown19 = 22; + RequestID string `protobuf:"bytes,1,opt,name=requestID,proto3" json:"requestID,omitempty"` + BugleRoute BugleRoute `protobuf:"varint,2,opt,name=bugleRoute,proto3,enum=messages.BugleRoute" json:"bugleRoute,omitempty"` + ProtobufData []byte `protobuf:"bytes,12,opt,name=protobufData,proto3" json:"protobufData,omitempty"` MessageTypeData *MessageTypeData `protobuf:"bytes,23,opt,name=messageTypeData,proto3" json:"messageTypeData,omitempty"` } @@ -1432,11 +1395,11 @@ type ConfigVersion struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - V1 int32 `protobuf:"varint,3,opt,name=V1,proto3" json:"V1,omitempty"` - V2 int32 `protobuf:"varint,4,opt,name=V2,proto3" json:"V2,omitempty"` - V3 int32 `protobuf:"varint,5,opt,name=V3,proto3" json:"V3,omitempty"` - V4 int32 `protobuf:"varint,7,opt,name=V4,proto3" json:"V4,omitempty"` - V5 int32 `protobuf:"varint,9,opt,name=V5,proto3" json:"V5,omitempty"` + Year int32 `protobuf:"varint,3,opt,name=Year,proto3" json:"Year,omitempty"` + Month int32 `protobuf:"varint,4,opt,name=Month,proto3" json:"Month,omitempty"` + Day int32 `protobuf:"varint,5,opt,name=Day,proto3" json:"Day,omitempty"` + V1 int32 `protobuf:"varint,7,opt,name=V1,proto3" json:"V1,omitempty"` + V2 int32 `protobuf:"varint,9,opt,name=V2,proto3" json:"V2,omitempty"` } func (x *ConfigVersion) Reset() { @@ -1471,6 +1434,27 @@ func (*ConfigVersion) Descriptor() ([]byte, []int) { return file_messages_proto_rawDescGZIP(), []int{16} } +func (x *ConfigVersion) GetYear() int32 { + if x != nil { + return x.Year + } + return 0 +} + +func (x *ConfigVersion) GetMonth() int32 { + if x != nil { + return x.Month + } + return 0 +} + +func (x *ConfigVersion) GetDay() int32 { + if x != nil { + return x.Day + } + return 0 +} + func (x *ConfigVersion) GetV1() int32 { if x != nil { return x.V1 @@ -1485,27 +1469,6 @@ func (x *ConfigVersion) GetV2() int32 { return 0 } -func (x *ConfigVersion) GetV3() int32 { - if x != nil { - return x.V3 - } - return 0 -} - -func (x *ConfigVersion) GetV4() int32 { - if x != nil { - return x.V4 - } - return 0 -} - -func (x *ConfigVersion) GetV5() int32 { - if x != nil { - return x.V5 - } - return 0 -} - type ReceiveMessagesRequest_UnknownEmptyObject1 struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1781,96 +1744,97 @@ var file_messages_proto_rawDesc = []byte{ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x22, 0x5f, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x56, 0x31, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x56, 0x32, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x56, 0x33, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x34, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x56, 0x34, 0x12, 0x0e, 0x0a, 0x02, 0x56, 0x35, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x02, 0x56, 0x35, 0x2a, 0x43, 0x0a, 0x0a, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, - 0x65, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x55, 0x47, - 0x4c, 0x45, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x61, - 0x74, 0x61, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x61, 0x69, - 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, 0x0e, 0x2a, 0x8b, 0x09, 0x0a, 0x0a, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x49, 0x53, 0x54, - 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x01, - 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x43, 0x4f, - 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x53, 0x59, 0x4e, 0x43, - 0x10, 0xd7, 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x49, 0x53, 0x54, - 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x43, - 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x53, 0x10, 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x52, 0x5f, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x0a, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x52, 0x4f, 0x57, 0x53, - 0x45, 0x52, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, - 0x4b, 0x10, 0x0b, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, - 0x44, 0x41, 0x54, 0x45, 0x53, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x54, 0x54, 0x49, - 0x4e, 0x47, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, 0x0e, 0x0a, 0x0a, - 0x55, 0x53, 0x45, 0x52, 0x5f, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x0e, 0x12, 0x17, 0x0a, 0x13, - 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x0f, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x54, 0x5f, 0x55, 0x50, 0x44, - 0x41, 0x54, 0x45, 0x53, 0x10, 0x10, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x4b, 0x5f, 0x42, 0x52, - 0x4f, 0x57, 0x53, 0x45, 0x52, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x11, - 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, - 0x5f, 0x53, 0x45, 0x54, 0x53, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x41, 0x56, 0x45, - 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x13, 0x12, 0x20, 0x0a, 0x1c, - 0x41, 0x44, 0x44, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, - 0x54, 0x4f, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x14, 0x12, 0x19, - 0x0a, 0x15, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x15, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x54, - 0x49, 0x46, 0x59, 0x5f, 0x44, 0x49, 0x54, 0x54, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, - 0x54, 0x59, 0x10, 0x16, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4d, - 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x17, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x53, 0x54, - 0x41, 0x4c, 0x4c, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x10, - 0x18, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, - 0x41, 0x47, 0x45, 0x10, 0x19, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, - 0x54, 0x41, 0x43, 0x54, 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x10, 0x1a, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x4f, 0x57, 0x4e, 0x4c, - 0x4f, 0x41, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1b, 0x12, 0x15, 0x0a, - 0x11, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x54, 0x4f, 0x50, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, - 0x54, 0x53, 0x10, 0x1c, 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, - 0x41, 0x43, 0x54, 0x53, 0x5f, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x4e, 0x41, 0x49, 0x4c, 0x10, 0x1d, - 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, - 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x10, 0x1e, 0x12, 0x14, - 0x0a, 0x10, 0x49, 0x53, 0x5f, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, - 0x4c, 0x54, 0x10, 0x1f, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, - 0x55, 0x53, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x20, 0x12, 0x1a, - 0x0a, 0x16, 0x46, 0x41, 0x56, 0x4f, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, - 0x45, 0x52, 0x5f, 0x50, 0x41, 0x43, 0x4b, 0x53, 0x10, 0x21, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, - 0x43, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x53, 0x10, 0x22, 0x12, - 0x1a, 0x0a, 0x16, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x4e, 0x54, - 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x53, 0x10, 0x23, 0x12, 0x17, 0x0a, 0x13, 0x47, - 0x45, 0x54, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x49, 0x4d, 0x41, - 0x47, 0x45, 0x10, 0x24, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x41, 0x52, 0x54, - 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x4e, 0x41, - 0x49, 0x4c, 0x10, 0x25, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x26, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x4e, 0x44, 0x5f, - 0x52, 0x45, 0x50, 0x4c, 0x59, 0x10, 0x27, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x45, 0x54, 0x5f, 0x42, - 0x4c, 0x4f, 0x42, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x48, 0x4d, 0x45, - 0x4e, 0x54, 0x10, 0x28, 0x12, 0x2a, 0x0a, 0x26, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x56, 0x49, - 0x43, 0x45, 0x53, 0x5f, 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x4f, - 0x52, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x29, - 0x12, 0x17, 0x0a, 0x13, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, - 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x2a, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, - 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x2b, 0x12, - 0x23, 0x0a, 0x1f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, - 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, - 0x49, 0x54, 0x10, 0x2c, 0x12, 0x27, 0x0a, 0x23, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, - 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4c, 0x49, 0x45, - 0x4e, 0x54, 0x5f, 0x46, 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x2d, 0x12, 0x17, 0x0a, - 0x13, 0x55, 0x4e, 0x50, 0x41, 0x49, 0x52, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, - 0x52, 0x49, 0x4e, 0x47, 0x10, 0x2e, 0x2a, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, - 0x11, 0x0a, 0x0d, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, - 0x10, 0x02, 0x12, 0x14, 0x0a, 0x10, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, - 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, - 0x2e, 0x2f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6b, 0x22, 0x6b, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x59, 0x65, 0x61, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x59, 0x65, 0x61, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x4d, 0x6f, 0x6e, 0x74, 0x68, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x4d, 0x6f, 0x6e, 0x74, 0x68, 0x12, 0x10, 0x0a, + 0x03, 0x44, 0x61, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x44, 0x61, 0x79, 0x12, + 0x0e, 0x0a, 0x02, 0x56, 0x31, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x31, 0x12, + 0x0e, 0x0a, 0x02, 0x56, 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x56, 0x32, 0x2a, + 0x43, 0x0a, 0x0a, 0x42, 0x75, 0x67, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x17, 0x0a, + 0x13, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x52, + 0x4f, 0x55, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x10, 0x13, 0x12, 0x0d, 0x0a, 0x09, 0x50, 0x61, 0x69, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x10, 0x0e, 0x2a, 0x8b, 0x09, 0x0a, 0x0a, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, + 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x53, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, + 0x03, 0x12, 0x1c, 0x0a, 0x17, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, + 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x10, 0xd7, 0x08, 0x12, + 0x13, 0x0a, 0x0f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, + 0x45, 0x53, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x54, 0x41, 0x43, 0x54, 0x53, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x4f, 0x4e, 0x56, 0x45, + 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x53, 0x10, + 0x07, 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x4f, 0x52, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x09, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x44, 0x10, 0x0a, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, 0x52, 0x5f, 0x50, + 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x10, 0x0b, 0x12, + 0x12, 0x0a, 0x0e, 0x54, 0x59, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, + 0x53, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x53, 0x5f, + 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x53, 0x45, 0x52, + 0x5f, 0x41, 0x4c, 0x45, 0x52, 0x54, 0x10, 0x0e, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, + 0x0f, 0x12, 0x0f, 0x0a, 0x0b, 0x47, 0x45, 0x54, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x53, + 0x10, 0x10, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x43, 0x4b, 0x5f, 0x42, 0x52, 0x4f, 0x57, 0x53, 0x45, + 0x52, 0x5f, 0x50, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x43, 0x45, 0x10, 0x11, 0x12, 0x15, 0x0a, 0x11, + 0x4c, 0x49, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, + 0x53, 0x10, 0x12, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x45, 0x41, 0x56, 0x45, 0x5f, 0x52, 0x43, 0x53, + 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x13, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x44, 0x44, 0x5f, + 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x5f, 0x54, 0x4f, 0x5f, 0x52, + 0x43, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, 0x14, 0x12, 0x19, 0x0a, 0x15, 0x47, 0x45, + 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x10, 0x15, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x4f, 0x54, 0x49, 0x46, 0x59, 0x5f, + 0x44, 0x49, 0x54, 0x54, 0x4f, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x56, 0x49, 0x54, 0x59, 0x10, 0x16, + 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x45, 0x4c, 0x45, 0x54, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, + 0x47, 0x45, 0x10, 0x17, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4e, 0x53, 0x54, 0x41, 0x4c, 0x4c, 0x5f, + 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x53, 0x45, 0x54, 0x10, 0x18, 0x12, 0x12, 0x0a, + 0x0e, 0x52, 0x45, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, + 0x19, 0x12, 0x20, 0x0a, 0x1c, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, + 0x5f, 0x52, 0x43, 0x53, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, + 0x53, 0x10, 0x1a, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x4f, 0x41, 0x44, 0x5f, + 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x1b, 0x12, 0x15, 0x0a, 0x11, 0x4c, 0x49, 0x53, + 0x54, 0x5f, 0x54, 0x4f, 0x50, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, 0x10, 0x1c, + 0x12, 0x1a, 0x0a, 0x16, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x43, 0x54, 0x53, + 0x5f, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x4e, 0x41, 0x49, 0x4c, 0x10, 0x1d, 0x12, 0x1c, 0x0a, 0x18, + 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, + 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x10, 0x1e, 0x12, 0x14, 0x0a, 0x10, 0x49, 0x53, + 0x5f, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x1f, + 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x55, 0x53, 0x45, 0x52, + 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x58, 0x54, 0x10, 0x20, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, + 0x56, 0x4f, 0x52, 0x49, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x5f, 0x50, + 0x41, 0x43, 0x4b, 0x53, 0x10, 0x21, 0x12, 0x13, 0x0a, 0x0f, 0x52, 0x45, 0x43, 0x45, 0x4e, 0x54, + 0x5f, 0x53, 0x54, 0x49, 0x43, 0x4b, 0x45, 0x52, 0x53, 0x10, 0x22, 0x12, 0x1a, 0x0a, 0x16, 0x55, + 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x49, + 0x43, 0x4b, 0x45, 0x52, 0x53, 0x10, 0x23, 0x12, 0x17, 0x0a, 0x13, 0x47, 0x45, 0x54, 0x5f, 0x46, + 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x24, + 0x12, 0x1e, 0x0a, 0x1a, 0x47, 0x45, 0x54, 0x5f, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, + 0x41, 0x4e, 0x54, 0x53, 0x5f, 0x54, 0x48, 0x55, 0x4d, 0x42, 0x4e, 0x41, 0x49, 0x4c, 0x10, 0x25, + 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x41, 0x43, 0x54, 0x49, 0x4f, + 0x4e, 0x10, 0x26, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x45, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x50, 0x4c, + 0x59, 0x10, 0x27, 0x12, 0x1b, 0x0a, 0x17, 0x47, 0x45, 0x54, 0x5f, 0x42, 0x4c, 0x4f, 0x42, 0x5f, + 0x46, 0x4f, 0x52, 0x5f, 0x41, 0x54, 0x54, 0x41, 0x43, 0x48, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x28, + 0x12, 0x2a, 0x0a, 0x26, 0x47, 0x45, 0x54, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x53, 0x5f, + 0x41, 0x56, 0x41, 0x49, 0x4c, 0x41, 0x42, 0x4c, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x47, 0x41, + 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x10, 0x29, 0x12, 0x17, 0x0a, 0x13, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, + 0x49, 0x4e, 0x47, 0x10, 0x2a, 0x12, 0x14, 0x0a, 0x10, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4e, + 0x56, 0x45, 0x52, 0x53, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x2b, 0x12, 0x23, 0x0a, 0x1f, 0x43, + 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x49, + 0x4e, 0x47, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x10, 0x2c, + 0x12, 0x27, 0x0a, 0x23, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, + 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x46, + 0x49, 0x4e, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x2d, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x50, + 0x41, 0x49, 0x52, 0x5f, 0x47, 0x41, 0x49, 0x41, 0x5f, 0x50, 0x41, 0x49, 0x52, 0x49, 0x4e, 0x47, + 0x10, 0x2e, 0x2a, 0x50, 0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x4d, 0x45, 0x53, + 0x53, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x42, + 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x14, + 0x0a, 0x10, 0x42, 0x55, 0x47, 0x4c, 0x45, 0x5f, 0x41, 0x4e, 0x4e, 0x4f, 0x54, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x10, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2e, 0x2f, 0x2e, 0x2e, 0x2f, 0x62, 0x69, + 0x6e, 0x61, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/libgm/binary/raw/authentication.proto b/libgm/binary/raw/authentication.proto index 0bf16ad..3cf9f22 100644 --- a/libgm/binary/raw/authentication.proto +++ b/libgm/binary/raw/authentication.proto @@ -51,7 +51,7 @@ message CurrentDeviceData { messages.Device browser = 1; } -message UrlData { +message URLData { bytes pairingKey = 1; bytes AESKey = 2; bytes HMACKey = 3; diff --git a/libgm/binary/raw/messages.proto b/libgm/binary/raw/messages.proto index bfc2312..4cf15d7 100644 --- a/libgm/binary/raw/messages.proto +++ b/libgm/binary/raw/messages.proto @@ -31,23 +31,17 @@ message InternalMessageData { string responseID = 1; BugleRoute bugleRoute = 2; string startExecute = 3; - //bytes unknown4 = 4; + MessageType messageType = 5; string finishExecute = 6; string millisecondsTaken = 7; Device mobile = 8; Device browser = 9; - //bytes unknown5 = 10; - //bytes unknown6 = 11; + bytes protobufData = 12; - //bytes unknown7 = 13; - //bytes unknown8 = 14; - //bytes unknown9 = 15; - //bytes unknown10 = 16; + string signatureID = 17; - //bytes unknown11 = 18; - //bytes unknown12 = 19; - //bytes unknown13 = 20; + string timestamp = 21; } @@ -65,20 +59,15 @@ message SendMessage { Device mobile = 1; SendMessageData messageData = 2; SendMessageAuth messageAuth = 3; - //bytes unknown1 = 4; + int64 TTL = 5; // might be something related to config - //bytes unknown2 = 6; - //bytes unknown3 = 7; - //bytes unknown4 = 8; + EmptyArr emptyArr = 9; } message SendMessageAuth { string requestID = 1; - //bytes unknown1 = 2; - //bytes unknown2 = 3; - //bytes unknown3 = 4; - //bytes unknown4 = 5; + bytes tachyonAuthToken = 6; ConfigVersion configVersion = 7; } @@ -101,26 +90,9 @@ encodedData = { message SendMessageData { string requestID = 1; BugleRoute bugleRoute = 2; - //bytes unknown1 = 3; - //bytes unknown2 = 4; - //bytes unknown3 = 5; - //bytes unknown4 = 6; - //bytes unknown5 = 7; - //bytes unknown6 = 8; - //bytes unknown7 = 9; - //bytes unknown8 = 10; - //bytes unknown9 = 11; + bytes protobufData = 12; - //bytes unknown10 = 13; - //bytes unknown11 = 14; - //bytes unknown12 = 15; - //bytes unknown13 = 16; - //bytes unknown14 = 17; - //bytes unknown15 = 18; - //bytes unknown16 = 19; - //bytes unknown17 = 20; - //bytes unknown18 = 21; - //bytes unknown19 = 22; + MessageTypeData messageTypeData = 23; } @@ -178,11 +150,11 @@ enum EventType { */ message ConfigVersion { - int32 V1 = 3; - int32 V2 = 4; - int32 V3 = 5; - int32 V4 = 7; - int32 V5 = 9; + int32 Year = 3; + int32 Month = 4; + int32 Day = 5; + int32 V1 = 7; + int32 V2 = 9; } enum ActionType { diff --git a/libgm/client.go b/libgm/client.go index 6cdab26..22944c0 100644 --- a/libgm/client.go +++ b/libgm/client.go @@ -270,7 +270,7 @@ func (c *Client) FetchConfigVersion() { } currVersion := payload.ConfigMessage - if version.V1 != currVersion.V1 || version.V2 != currVersion.V2 || version.V3 != currVersion.V3 { + if version.Year != currVersion.Year || version.Month != currVersion.Month || version.Day != currVersion.Day { toLog := c.diffVersionFormat(currVersion, version) c.Logger.Info().Any("version", toLog).Msg("There's a new version available!") } else { @@ -279,7 +279,7 @@ func (c *Client) FetchConfigVersion() { } func (c *Client) diffVersionFormat(curr *binary.ConfigVersion, latest *binary.ConfigVersion) string { - return fmt.Sprintf("%d.%d.%d -> %d.%d.%d", curr.V1, curr.V2, curr.V3, latest.V1, latest.V2, latest.V3) + return fmt.Sprintf("%d.%d.%d -> %d.%d.%d", curr.Year, curr.Month, curr.Day, latest.Year, latest.Month, latest.Day) } func (c *Client) updateWebEncryptionKey(key []byte) { @@ -338,7 +338,6 @@ func (c *Client) RefreshAuthToken() error { } func (c *Client) refreshAuthToken() error { - jwk := c.authData.JWK requestId := util.RandomUUIDv4() timestamp := time.Now().UnixMilli() * 1000 diff --git a/libgm/payload/config.go b/libgm/payload/config.go index 116adc9..97c3c02 100644 --- a/libgm/payload/config.go +++ b/libgm/payload/config.go @@ -5,13 +5,12 @@ import ( "go.mau.fi/mautrix-gmessages/libgm/util" ) -// 202306220406 var ConfigMessage = &binary.ConfigVersion{ - V1: 2023, - V2: 7, - V3: 10, - V4: 4, - V5: 6, + Year: 2023, + Month: 7, + Day: 10, + V1: 4, + V2: 6, } var Network = "Bugle" var BrowserDetailsMessage = &binary.BrowserDetails{ diff --git a/libgm/qr.go b/libgm/qr.go index 2eafd52..1ac0819 100644 --- a/libgm/qr.go +++ b/libgm/qr.go @@ -3,20 +3,22 @@ package libgm import ( "encoding/base64" + "google.golang.org/protobuf/proto" + "go.mau.fi/mautrix-gmessages/libgm/binary" "go.mau.fi/mautrix-gmessages/libgm/util" ) func (p *Pairer) GenerateQRCodeData() (string, error) { - urlData := &binary.UrlData{ + urlData := &binary.URLData{ PairingKey: p.pairingKey, AESKey: p.client.authData.Cryptor.AESKey, HMACKey: p.client.authData.Cryptor.HMACKey, } - encodedUrlData, err := binary.EncodeProtoMessage(urlData) + encodedURLData, err := proto.Marshal(urlData) if err != nil { return "", err } - cData := base64.StdEncoding.EncodeToString(encodedUrlData) + cData := base64.StdEncoding.EncodeToString(encodedURLData) return util.QRCodeURLBase + cData, nil } diff --git a/libgm/util/func.go b/libgm/util/func.go index 667a5b2..b15f52b 100644 --- a/libgm/util/func.go +++ b/libgm/util/func.go @@ -177,11 +177,11 @@ func ParseConfigVersion(res []byte) (*binary.ConfigVersion, error) { } configMessage := &binary.ConfigVersion{ - V1: int32(first), - V2: int32(second), - V3: int32(third), - V4: 4, - V5: 6, + Year: int32(first), + Month: int32(second), + Day: int32(third), + V1: 4, + V2: 6, } return configMessage, nil }