feat: include Pre-release when checking update

This commit is contained in:
arm64v8a
2022-08-27 12:25:57 +08:00
parent b48583ae1b
commit 73306929d1
11 changed files with 284 additions and 219 deletions

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// versions: // versions:
// protoc-gen-go v1.27.1 // protoc-gen-go v1.28.0
// protoc v3.21.4 // protoc v3.21.5
// source: libcore.proto // source: libcore.proto
package gen package gen
@@ -665,6 +665,7 @@ type UpdateReq struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Action UpdateAction `protobuf:"varint,1,opt,name=action,proto3,enum=libcore.UpdateAction" json:"action,omitempty"` Action UpdateAction `protobuf:"varint,1,opt,name=action,proto3,enum=libcore.UpdateAction" json:"action,omitempty"`
CheckPreRelease bool `protobuf:"varint,2,opt,name=check_pre_release,json=checkPreRelease,proto3" json:"check_pre_release,omitempty"`
} }
func (x *UpdateReq) Reset() { func (x *UpdateReq) Reset() {
@@ -706,6 +707,13 @@ func (x *UpdateReq) GetAction() UpdateAction {
return UpdateAction_Check return UpdateAction_Check
} }
func (x *UpdateReq) GetCheckPreRelease() bool {
if x != nil {
return x.CheckPreRelease
}
return false
}
type UpdateResp struct { type UpdateResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -716,6 +724,7 @@ type UpdateResp struct {
DownloadUrl string `protobuf:"bytes,3,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"` DownloadUrl string `protobuf:"bytes,3,opt,name=download_url,json=downloadUrl,proto3" json:"download_url,omitempty"`
ReleaseUrl string `protobuf:"bytes,4,opt,name=release_url,json=releaseUrl,proto3" json:"release_url,omitempty"` ReleaseUrl string `protobuf:"bytes,4,opt,name=release_url,json=releaseUrl,proto3" json:"release_url,omitempty"`
ReleaseNote string `protobuf:"bytes,5,opt,name=release_note,json=releaseNote,proto3" json:"release_note,omitempty"` ReleaseNote string `protobuf:"bytes,5,opt,name=release_note,json=releaseNote,proto3" json:"release_note,omitempty"`
IsPreRelease bool `protobuf:"varint,6,opt,name=is_pre_release,json=isPreRelease,proto3" json:"is_pre_release,omitempty"`
} }
func (x *UpdateResp) Reset() { func (x *UpdateResp) Reset() {
@@ -785,6 +794,13 @@ func (x *UpdateResp) GetReleaseNote() string {
return "" return ""
} }
func (x *UpdateResp) GetIsPreRelease() bool {
if x != nil {
return x.IsPreRelease
}
return false
}
type ListV2RayConnectionsResp struct { type ListV2RayConnectionsResp struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -886,67 +902,72 @@ var file_libcore_proto_rawDesc = []byte{
0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x22, 0x2a, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x06, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x22, 0x2a, 0x0a, 0x0e, 0x51, 0x75, 0x65, 0x72, 0x79,
0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x74, 0x72, 0x61,
0x66, 0x66, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x61, 0x66, 0x66, 0x66, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x74, 0x72, 0x61, 0x66,
0x66, 0x69, 0x63, 0x22, 0x3a, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x66, 0x69, 0x63, 0x22, 0x66, 0x0a, 0x09, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x15, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x32, 0x15, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0xaa, 0x01, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x2a, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x70, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x6c,
0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x65, 0x61, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x63, 0x68, 0x65, 0x63,
0x72, 0x72, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x6e, 0x6b, 0x50, 0x72, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x0a,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72,
0x73, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72,
0x64, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x4e, 0x61, 0x6d,
0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x75, 0x72,
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
0x65, 0x61, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x64, 0x55, 0x72, 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x5f,
0x0b, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x22, 0x54, 0x0a, 0x18, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x6c, 0x65, 0x61,
0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65,
0x5f, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x6c,
0x65, 0x61, 0x73, 0x65, 0x4e, 0x6f, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x70,
0x72, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
0x52, 0x0c, 0x69, 0x73, 0x50, 0x72, 0x65, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0x54,
0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x18, 0x6d, 0x61,
0x74, 0x73, 0x75, 0x72, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x5f, 0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61,
0x74, 0x73, 0x75, 0x72, 0x69, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x4a, 0x73, 0x6f, 0x6e, 0x2a, 0x32, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65,
0x12, 0x0b, 0x0a, 0x07, 0x54, 0x63, 0x70, 0x50, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a,
0x07, 0x55, 0x72, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x75,
0x6c, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x10, 0x02, 0x2a, 0x27, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61,
0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63,
0x6b, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x10,
0x01, 0x32, 0x88, 0x04, 0x0a, 0x0e, 0x4c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x45, 0x78, 0x69, 0x74, 0x12, 0x11, 0x2e, 0x6c,
0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a,
0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52,
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69,
0x76, 0x65, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6c, 0x69, 0x62, 0x63,
0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00,
0x12, 0x35, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x2e, 0x6c, 0x69, 0x62, 0x63,
0x6f, 0x72, 0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f,
0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x54, 0x75,
0x6e, 0x12, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x54,
0x75, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x04, 0x53,
0x74, 0x6f, 0x70, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65,
0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x04,
0x54, 0x65, 0x73, 0x74, 0x12, 0x10, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54,
0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65,
0x2e, 0x54, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x51,
0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x69, 0x62, 0x63,
0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65,
0x71, 0x1a, 0x17, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72,
0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x14,
0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x38, 0x0a, 0x18, 0x6d, 0x61, 0x74, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45,
0x75, 0x72, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72,
0x6a, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x6d, 0x61, 0x74, 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
0x75, 0x72, 0x69, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4a, 0x73, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x12, 0x5a, 0x10,
0x6f, 0x6e, 0x2a, 0x32, 0x0a, 0x08, 0x54, 0x65, 0x73, 0x74, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x6e, 0x65, 0x6b, 0x6f, 0x72, 0x61, 0x79, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x65, 0x6e,
0x0a, 0x07, 0x54, 0x63, 0x70, 0x50, 0x69, 0x6e, 0x67, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x6c, 0x54, 0x65, 0x73, 0x74, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x75, 0x6c, 0x6c,
0x54, 0x65, 0x73, 0x74, 0x10, 0x02, 0x2a, 0x27, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x10,
0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x32,
0x88, 0x04, 0x0a, 0x0e, 0x4c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x45, 0x78, 0x69, 0x74, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62,
0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e,
0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73,
0x70, 0x22, 0x00, 0x12, 0x34, 0x0a, 0x09, 0x4b, 0x65, 0x65, 0x70, 0x41, 0x6c, 0x69, 0x76, 0x65,
0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d,
0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x12, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72,
0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x35,
0x0a, 0x05, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x16, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72,
0x65, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x1a,
0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52,
0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x54, 0x75, 0x6e, 0x12,
0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x75, 0x6e,
0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x72,
0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x04, 0x53, 0x74, 0x6f,
0x70, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x52, 0x65, 0x71, 0x1a, 0x12, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45,
0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x2d, 0x0a, 0x04, 0x54, 0x65,
0x73, 0x74, 0x12, 0x10, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x65, 0x73,
0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x54,
0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x51, 0x75, 0x65,
0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72,
0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x1a,
0x17, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53,
0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x14, 0x4c, 0x69,
0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x12, 0x11, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x45, 0x6d, 0x70,
0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6c, 0x69, 0x62, 0x63, 0x6f, 0x72, 0x65, 0x2e,
0x4c, 0x69, 0x73, 0x74, 0x56, 0x32, 0x72, 0x61, 0x79, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x12, 0x5a, 0x10, 0x6e, 0x65,
0x6b, 0x6f, 0x72, 0x61, 0x79, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@@ -81,6 +81,7 @@ enum UpdateAction {
message UpdateReq { message UpdateReq {
UpdateAction action = 1; UpdateAction action = 1;
bool check_pre_release = 2;
} }
message UpdateResp { message UpdateResp {
@@ -89,6 +90,7 @@ message UpdateResp {
string download_url = 3; string download_url = 3;
string release_url = 4; string release_url = 4;
string release_note = 5; string release_note = 5;
bool is_pre_release = 6;
} }
message ListV2rayConnectionsResp { message ListV2rayConnectionsResp {

View File

@@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions: // versions:
// - protoc-gen-go-grpc v1.2.0 // - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.4 // - protoc v3.21.5
// source: libcore.proto // source: libcore.proto
package gen package gen
@@ -25,7 +25,6 @@ type LibcoreServiceClient interface {
Exit(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error) Exit(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error)
KeepAlive(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error) KeepAlive(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*EmptyResp, error)
Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*UpdateResp, error) Update(ctx context.Context, in *UpdateReq, opts ...grpc.CallOption) (*UpdateResp, error)
//
Start(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error) Start(ctx context.Context, in *LoadConfigReq, opts ...grpc.CallOption) (*ErrorResp, error)
SetTun(ctx context.Context, in *SetTunReq, opts ...grpc.CallOption) (*ErrorResp, error) SetTun(ctx context.Context, in *SetTunReq, opts ...grpc.CallOption) (*ErrorResp, error)
Stop(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ErrorResp, error) Stop(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*ErrorResp, error)
@@ -130,7 +129,6 @@ type LibcoreServiceServer interface {
Exit(context.Context, *EmptyReq) (*EmptyResp, error) Exit(context.Context, *EmptyReq) (*EmptyResp, error)
KeepAlive(context.Context, *EmptyReq) (*EmptyResp, error) KeepAlive(context.Context, *EmptyReq) (*EmptyResp, error)
Update(context.Context, *UpdateReq) (*UpdateResp, error) Update(context.Context, *UpdateReq) (*UpdateResp, error)
//
Start(context.Context, *LoadConfigReq) (*ErrorResp, error) Start(context.Context, *LoadConfigReq) (*ErrorResp, error)
SetTun(context.Context, *SetTunReq) (*ErrorResp, error) SetTun(context.Context, *SetTunReq) (*ErrorResp, error)
Stop(context.Context, *EmptyReq) (*ErrorResp, error) Stop(context.Context, *EmptyReq) (*ErrorResp, error)

View File

@@ -98,7 +98,7 @@ func (s *server) Update(ctx context.Context, in *gen.UpdateReq) (*gen.UpdateResp
return ret, nil // No update return ret, nil // No update
} }
if strings.Contains(asset.Name, search) { if strings.Contains(asset.Name, search) {
if release.Prerelease { if release.Prerelease && !in.CheckPreRelease {
continue continue
} }
update_download_url = asset.BrowserDownloadUrl update_download_url = asset.BrowserDownloadUrl
@@ -106,6 +106,7 @@ func (s *server) Update(ctx context.Context, in *gen.UpdateReq) (*gen.UpdateResp
ret.DownloadUrl = asset.BrowserDownloadUrl ret.DownloadUrl = asset.BrowserDownloadUrl
ret.ReleaseUrl = release.HtmlUrl ret.ReleaseUrl = release.HtmlUrl
ret.ReleaseNote = release.Body ret.ReleaseNote = release.Body
ret.IsPreRelease = release.Prerelease
return ret, nil // update return ret, nil // update
} }
} }

View File

@@ -64,6 +64,8 @@ inline QMenu *CreateMenu(QWidget *parent, const QList<QString> &texts, const std
#define D_SAVE_INT(a) NekoRay::dataStore->a = ui->a->text().toInt(); #define D_SAVE_INT(a) NekoRay::dataStore->a = ui->a->text().toInt();
#define P_LOAD_COMBO(a) ui->a->setCurrentText(bean->a); #define P_LOAD_COMBO(a) ui->a->setCurrentText(bean->a);
#define P_SAVE_COMBO(a) bean->a = ui->a->currentText(); #define P_SAVE_COMBO(a) bean->a = ui->a->currentText();
#define D_LOAD_BOOL(a) ui->a->setChecked(NekoRay::dataStore->a);
#define D_SAVE_BOOL(a) NekoRay::dataStore->a = ui->a->isChecked();
#define D_LOAD_INT_ENABLE(i, e) \ #define D_LOAD_INT_ENABLE(i, e) \
if (NekoRay::dataStore->i > 0) { \ if (NekoRay::dataStore->i > 0) { \

View File

@@ -53,6 +53,7 @@ namespace NekoRay {
_add(new configItem("vpn_impl", &vpn_implementation, itemType::integer)); _add(new configItem("vpn_impl", &vpn_implementation, itemType::integer));
_add(new configItem("vpn_mtu", &vpn_mtu, itemType::integer)); _add(new configItem("vpn_mtu", &vpn_mtu, itemType::integer));
_add(new configItem("vpn_ipv6", &vpn_ipv6, itemType::boolean)); _add(new configItem("vpn_ipv6", &vpn_ipv6, itemType::boolean));
_add(new configItem("check_include_pre", &check_include_pre, itemType::boolean));
} }
void DataStore::UpdateStartedId(int id) { void DataStore::UpdateStartedId(int id) {

View File

@@ -67,6 +67,7 @@ namespace NekoRay {
QString v2ray_asset_dir = ""; QString v2ray_asset_dir = "";
int language = 0; int language = 0;
QString mw_size = ""; QString mw_size = "";
bool check_include_pre = false;
// Security // Security
bool insecure_hint = true; bool insecure_hint = true;

View File

@@ -155,6 +155,10 @@
<source>Minimize to tray icon on startup</source> <source>Minimize to tray icon on startup</source>
<translation></translation> <translation></translation>
</message> </message>
<message>
<source>Include Pre-release when checking update</source>
<translation> Pre-release</translation>
</message>
</context> </context>
<context> <context>
<name>DialogEditGroup</name> <name>DialogEditGroup</name>

View File

@@ -56,17 +56,7 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
ui->socks_ip->setText(NekoRay::dataStore->inbound_address); ui->socks_ip->setText(NekoRay::dataStore->inbound_address);
ui->log_level->setCurrentText(NekoRay::dataStore->log_level); ui->log_level->setCurrentText(NekoRay::dataStore->log_level);
ui->connection_statistics->setChecked(NekoRay::dataStore->connection_statistics);
CACHE.custom_inbound = NekoRay::dataStore->custom_inbound; CACHE.custom_inbound = NekoRay::dataStore->custom_inbound;
if (NekoRay::dataStore->traffic_loop_interval == 500) {
ui->rfsh_r->setCurrentIndex(0);
} else if (NekoRay::dataStore->traffic_loop_interval == 1000) {
ui->rfsh_r->setCurrentIndex(1);
} else {
ui->rfsh_r->setCurrentIndex(2);
}
D_LOAD_INT(inbound_socks_port) D_LOAD_INT(inbound_socks_port)
D_LOAD_INT_ENABLE(inbound_http_port, http_enable) D_LOAD_INT_ENABLE(inbound_http_port, http_enable)
D_LOAD_INT_ENABLE(mux_cool, mux_cool_enable) D_LOAD_INT_ENABLE(mux_cool, mux_cool_enable)
@@ -79,12 +69,24 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
// Style // Style
//
D_LOAD_BOOL(start_minimal)
D_LOAD_BOOL(check_include_pre)
D_LOAD_BOOL(connection_statistics)
//
if (NekoRay::dataStore->traffic_loop_interval == 500) {
ui->rfsh_r->setCurrentIndex(0);
} else if (NekoRay::dataStore->traffic_loop_interval == 1000) {
ui->rfsh_r->setCurrentIndex(1);
} else {
ui->rfsh_r->setCurrentIndex(2);
}
//
ui->language->setCurrentIndex(NekoRay::dataStore->language); ui->language->setCurrentIndex(NekoRay::dataStore->language);
connect(ui->language, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) { connect(ui->language, QOverload<int>::of(&QComboBox::currentIndexChanged), this, [=](int index) {
CACHE.needRestart = true; CACHE.needRestart = true;
}); });
ui->start_minimal->setChecked(NekoRay::dataStore->start_minimal); //
int built_in_len = ui->theme->count(); int built_in_len = ui->theme->count();
ui->theme->addItems(QStyleFactory::keys()); ui->theme->addItems(QStyleFactory::keys());
// //
@@ -112,7 +114,7 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
// Subscription // Subscription
ui->user_agent->setText(NekoRay::dataStore->user_agent); ui->user_agent->setText(NekoRay::dataStore->user_agent);
ui->sub_use_proxy->setChecked(NekoRay::dataStore->sub_use_proxy); D_LOAD_BOOL(sub_use_proxy)
// Core // Core
@@ -126,7 +128,7 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
for (const auto &s: CACHE.extraCore.keys()) { for (const auto &s: CACHE.extraCore.keys()) {
extra_core_layout->addWidget(new ExtraCoreWidget(&CACHE.extraCore, s)); extra_core_layout->addWidget(new ExtraCoreWidget(&CACHE.extraCore, s));
} }
//
connect(ui->core_v2ray_asset, &QLineEdit::textChanged, this, [=] { connect(ui->core_v2ray_asset, &QLineEdit::textChanged, this, [=] {
CACHE.needRestart = true; CACHE.needRestart = true;
}); });
@@ -166,8 +168,8 @@ DialogBasicSettings::DialogBasicSettings(QWidget *parent)
// Security // Security
ui->insecure_hint->setChecked(NekoRay::dataStore->insecure_hint); D_LOAD_BOOL(insecure_hint)
ui->skip_cert->setChecked(NekoRay::dataStore->skip_cert); D_LOAD_BOOL(skip_cert)
} }
DialogBasicSettings::~DialogBasicSettings() { DialogBasicSettings::~DialogBasicSettings() {
@@ -181,17 +183,7 @@ void DialogBasicSettings::accept() {
NekoRay::dataStore->inbound_address = ui->socks_ip->text(); NekoRay::dataStore->inbound_address = ui->socks_ip->text();
NekoRay::dataStore->log_level = ui->log_level->currentText(); NekoRay::dataStore->log_level = ui->log_level->currentText();
NekoRay::dataStore->connection_statistics = ui->connection_statistics->isChecked();
NekoRay::dataStore->custom_inbound = CACHE.custom_inbound; NekoRay::dataStore->custom_inbound = CACHE.custom_inbound;
if (ui->rfsh_r->currentIndex() == 0) {
NekoRay::dataStore->traffic_loop_interval = 500;
} else if (ui->rfsh_r->currentIndex() == 1) {
NekoRay::dataStore->traffic_loop_interval = 1000;
} else {
NekoRay::dataStore->traffic_loop_interval = 0;
}
D_SAVE_INT(inbound_socks_port) D_SAVE_INT(inbound_socks_port)
D_SAVE_INT_ENABLE(inbound_http_port, http_enable) D_SAVE_INT_ENABLE(inbound_http_port, http_enable)
D_SAVE_INT_ENABLE(mux_cool, mux_cool_enable) D_SAVE_INT_ENABLE(mux_cool, mux_cool_enable)
@@ -201,12 +193,22 @@ void DialogBasicSettings::accept() {
// Style // Style
NekoRay::dataStore->language = ui->language->currentIndex(); NekoRay::dataStore->language = ui->language->currentIndex();
NekoRay::dataStore->start_minimal = ui->start_minimal->isChecked(); D_SAVE_BOOL(start_minimal)
D_SAVE_BOOL(connection_statistics)
D_SAVE_BOOL(check_include_pre)
if (ui->rfsh_r->currentIndex() == 0) {
NekoRay::dataStore->traffic_loop_interval = 500;
} else if (ui->rfsh_r->currentIndex() == 1) {
NekoRay::dataStore->traffic_loop_interval = 1000;
} else {
NekoRay::dataStore->traffic_loop_interval = 0;
}
// Subscription // Subscription
NekoRay::dataStore->user_agent = ui->user_agent->text(); NekoRay::dataStore->user_agent = ui->user_agent->text();
NekoRay::dataStore->sub_use_proxy = ui->sub_use_proxy->isChecked(); D_SAVE_BOOL(sub_use_proxy)
// Core // Core
@@ -215,8 +217,8 @@ void DialogBasicSettings::accept() {
// Security // Security
NekoRay::dataStore->insecure_hint = ui->insecure_hint->isChecked(); D_SAVE_BOOL(insecure_hint)
NekoRay::dataStore->skip_cert = ui->skip_cert->isChecked(); D_SAVE_BOOL(skip_cert)
dialog_message(Dialog_DialogBasicSettings, "UpdateDataStore"); dialog_message(Dialog_DialogBasicSettings, "UpdateDataStore");
QDialog::accept(); QDialog::accept();

View File

@@ -221,6 +221,88 @@
</layout> </layout>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="horizontalGroupBox">
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="QCheckBox" name="check_include_pre">
<property name="text">
<string>Include Pre-release when checking update</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="horizontalWidget_1" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Style</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="1" column="0">
<widget class="QGroupBox" name="groupBox">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_15">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Language</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="language">
<item>
<property name="text">
<string>System</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">English</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">简体中文</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_12"> <layout class="QHBoxLayout" name="horizontalLayout_12">
<item> <item>
<widget class="QGroupBox" name="horizontalGroupBox_6"> <widget class="QGroupBox" name="horizontalGroupBox_6">
@@ -276,38 +358,8 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QWidget" name="horizontalWidget_1" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Style</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0"> <item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<layout class="QHBoxLayout" name="horizontalLayout_4"> <layout class="QHBoxLayout" name="horizontalLayout_4">
<item> <item>
<widget class="QLabel" name="label_8"> <widget class="QLabel" name="label_8">
@@ -347,44 +399,12 @@
</widget> </widget>
</item> </item>
</layout> </layout>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="label_15">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Language</string>
</property>
</widget> </widget>
</item> </item>
<item row="3" column="0">
<widget class="QGroupBox" name="horizontalGroupBox">
<layout class="QHBoxLayout" name="horizontalLayout_20">
<item> <item>
<widget class="QComboBox" name="language">
<item>
<property name="text">
<string>System</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">English</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">简体中文</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="start_minimal"> <widget class="QCheckBox" name="start_minimal">
<property name="text"> <property name="text">
<string>Minimize to tray icon on startup</string> <string>Minimize to tray icon on startup</string>
@@ -393,7 +413,10 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> </item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title"> <attribute name="title">
<string>Subscription</string> <string>Subscription</string>
</attribute> </attribute>
@@ -417,13 +440,19 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_3"> <widget class="QWidget" name="tab_4">
<attribute name="title"> <attribute name="title">
<string>Core</string> <string>Core</string>
</attribute> </attribute>
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item> <item>
<widget class="QGroupBox" name="groupBox_3"> <widget class="QGroupBox" name="groupBox_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title"> <property name="title">
<string notr="true">V2Ray</string> <string notr="true">V2Ray</string>
</property> </property>
@@ -505,7 +534,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_4"> <widget class="QWidget" name="tab_5">
<attribute name="title"> <attribute name="title">
<string>Security</string> <string>Security</string>
</attribute> </attribute>
@@ -549,10 +578,12 @@
<tabstop>log_level</tabstop> <tabstop>log_level</tabstop>
<tabstop>mux_cool_enable</tabstop> <tabstop>mux_cool_enable</tabstop>
<tabstop>mux_cool</tabstop> <tabstop>mux_cool</tabstop>
<tabstop>rfsh_r</tabstop> <tabstop>check_include_pre</tabstop>
<tabstop>connection_statistics</tabstop>
<tabstop>theme</tabstop> <tabstop>theme</tabstop>
<tabstop>language</tabstop> <tabstop>language</tabstop>
<tabstop>rfsh_r</tabstop>
<tabstop>connection_statistics</tabstop>
<tabstop>start_minimal</tabstop>
<tabstop>user_agent</tabstop> <tabstop>user_agent</tabstop>
<tabstop>sub_use_proxy</tabstop> <tabstop>sub_use_proxy</tabstop>
<tabstop>core_v2ray_asset</tabstop> <tabstop>core_v2ray_asset</tabstop>

View File

@@ -302,6 +302,7 @@ void MainWindow::CheckUpdate() {
bool ok; bool ok;
libcore::UpdateReq request; libcore::UpdateReq request;
request.set_action(libcore::UpdateAction::Check); request.set_action(libcore::UpdateAction::Check);
request.set_check_pre_release(NekoRay::dataStore->check_include_pre);
auto response = NekoRay::rpc::defaultClient->Update(&ok, request); auto response = NekoRay::rpc::defaultClient->Update(&ok, request);
if (!ok) return; if (!ok) return;
@@ -321,10 +322,11 @@ void MainWindow::CheckUpdate() {
} }
runOnUiThread([=] { runOnUiThread([=] {
QMessageBox box(QMessageBox::Question, QObject::tr("Update"), auto note_pre_release = response.is_pre_release() ? " (Pre-release)" : "";
QMessageBox box(QMessageBox::Question, QObject::tr("Update") + note_pre_release,
QObject::tr("Update found: %1\nRelease note:\n%2") QObject::tr("Update found: %1\nRelease note:\n%2")
.arg(response.assets_name().c_str(), response.release_note().c_str())); .arg(response.assets_name().c_str(), response.release_note().c_str()));
QAbstractButton *btn1; QAbstractButton *btn1 = nullptr;
if (!NekoRay::dataStore->flag_use_appdata) { if (!NekoRay::dataStore->flag_use_appdata) {
btn1 = box.addButton(QObject::tr("Update"), QMessageBox::AcceptRole); btn1 = box.addButton(QObject::tr("Update"), QMessageBox::AcceptRole);
} }