Jelajahi Sumber

feat: xray配置模板相关接口参数

BaiLuoYan 3 bulan lalu
induk
melakukan
0cf5136fe1

+ 1 - 1
pb/client/gogameclient/go_game_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package gogameclient

+ 1 - 1
pb/client/gopmpclient/go_pmp_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package gopmpclient

+ 1 - 1
pb/client/goshortdramaclient/go_short_drama_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package goshortdramaclient

+ 1 - 1
pb/client/gosysclient/go_sys_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package gosysclient

+ 1 - 1
pb/client/gouserclient/go_user_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package gouserclient

+ 13 - 3
pb/client/govpnclient/go_vpn_client.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctl 1.8.5
+// goctl 1.9.2
 // Source: gorpc.proto
 
 package govpnclient
@@ -537,12 +537,17 @@ type (
 		VpnipBindBatchUpdate(ctx context.Context, in *VpnipBindBatchUpdateReq, opts ...grpc.CallOption) (*VpnipBindBatchUpdateResp, error)
 		// VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
 		VpnipsBindServer(ctx context.Context, in *VpnipBindBatchAddReq, opts ...grpc.CallOption) (*VpnipBindBatchAddResp, error)
-		// VpnConfigTemplatePlan Model
+		// VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
 		VpnConfigTemplatePlanAdd(ctx context.Context, in *VpnConfigTemplatePlanAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanAddResp, error)
+		// VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
 		VpnConfigTemplatePlanUpdate(ctx context.Context, in *VpnConfigTemplatePlanUpdateReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanUpdateResp, error)
+		// VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
 		VpnConfigTemplatePlanDel(ctx context.Context, in *VpnConfigTemplatePlanDelReq, opts ...grpc.CallOption) (*Empty, error)
+		// VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
 		VpnConfigTemplatePlanGet(ctx context.Context, in *VpnConfigTemplatePlanGetReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanGetResp, error)
+		// VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
 		VpnConfigTemplatePlanList(ctx context.Context, in *VpnConfigTemplatePlanListReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanListResp, error)
+		// VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
 		VpnConfigTemplatePlanDetailAdd(ctx context.Context, in *VpnConfigTemplatePlanDetailAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanDetailAddResp, error)
 		VpnConfigTemplatePlanDetailUpdate(ctx context.Context, in *VpnConfigTemplatePlanDetailUpdateReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanDetailUpdateResp, error)
 		VpnConfigTemplatePlanDetailDel(ctx context.Context, in *VpnConfigTemplatePlanDetailDelReq, opts ...grpc.CallOption) (*Empty, error)
@@ -1011,32 +1016,37 @@ func (m *defaultGoVpnClient) VpnipsBindServer(ctx context.Context, in *VpnipBind
 	return client.VpnipsBindServer(ctx, in, opts...)
 }
 
-// VpnConfigTemplatePlan Model
+// VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanAdd(ctx context.Context, in *VpnConfigTemplatePlanAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanAddResp, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanAdd(ctx, in, opts...)
 }
 
+// VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanUpdate(ctx context.Context, in *VpnConfigTemplatePlanUpdateReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanUpdateResp, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanUpdate(ctx, in, opts...)
 }
 
+// VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanDel(ctx context.Context, in *VpnConfigTemplatePlanDelReq, opts ...grpc.CallOption) (*Empty, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanDel(ctx, in, opts...)
 }
 
+// VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanGet(ctx context.Context, in *VpnConfigTemplatePlanGetReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanGetResp, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanGet(ctx, in, opts...)
 }
 
+// VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanList(ctx context.Context, in *VpnConfigTemplatePlanListReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanListResp, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanList(ctx, in, opts...)
 }
 
+// VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
 func (m *defaultGoVpnClient) VpnConfigTemplatePlanDetailAdd(ctx context.Context, in *VpnConfigTemplatePlanDetailAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanDetailAddResp, error) {
 	client := pb.NewGoVpnClientClient(m.cli.Conn())
 	return client.VpnConfigTemplatePlanDetailAdd(ctx, in, opts...)

+ 18 - 4
pb/gorpc.proto

@@ -2944,7 +2944,10 @@ message VpnConfigTemplatePlanAddResp {
   repeated VpnConfigTemplatePlanDetailVo details = 2;
 }
 
-message VpnConfigTemplatePlanUpdateReq { VpnConfigTemplatePlanVo vo = 1; }
+message VpnConfigTemplatePlanUpdateReq {
+  VpnConfigTemplatePlanVo vo = 1;
+  bool withDetails = 2;
+}
 
 message VpnConfigTemplatePlanUpdateResp {
   VpnConfigTemplatePlanVo plan = 1;
@@ -2953,7 +2956,10 @@ message VpnConfigTemplatePlanUpdateResp {
 
 message VpnConfigTemplatePlanDelReq { repeated int64 ids = 1; }
 
-message VpnConfigTemplatePlanGetReq { VpnConfigTemplatePlanVo vo = 1; }
+message VpnConfigTemplatePlanGetReq {
+  VpnConfigTemplatePlanVo vo = 1;
+  bool withDetails = 2;
+}
 
 message VpnConfigTemplatePlanGetResp {
   VpnConfigTemplatePlanVo plan = 1;
@@ -2965,6 +2971,7 @@ message VpnConfigTemplatePlanListReq {
   VpnConfigTemplatePlanVo vo = 2;
   repeated int64 excludeIds = 3;
   repeated string productCodes = 4;
+  bool withDetails = 5;
 }
 
 message VpnConfigTemplatePlanListResp {
@@ -3140,13 +3147,20 @@ service GoVpnClient {
   // VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
   rpc VpnipsBindServer(VpnipBindBatchAddReq) returns (VpnipBindBatchAddResp);
 
-  // VpnConfigTemplatePlan Model
-  // VpnConfigTemplatePlanAdd
+  // VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
+  // VpnConfigTemplatePlanAdd 添加配置模板及模板详情
   rpc VpnConfigTemplatePlanAdd(VpnConfigTemplatePlanAddReq) returns (VpnConfigTemplatePlanAddResp);
+  // VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanUpdate(VpnConfigTemplatePlanUpdateReq) returns (VpnConfigTemplatePlanUpdateResp);
+  // VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
   rpc VpnConfigTemplatePlanDel(VpnConfigTemplatePlanDelReq) returns (Empty);
+  // VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanGet(VpnConfigTemplatePlanGetReq) returns (VpnConfigTemplatePlanGetResp);
+  // VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanList(VpnConfigTemplatePlanListReq) returns (VpnConfigTemplatePlanListResp);
+
+  // VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
+  // VpnConfigTemplatePlanDetailAdd 添加模板详情
   rpc VpnConfigTemplatePlanDetailAdd(VpnConfigTemplatePlanDetailAddReq) returns (VpnConfigTemplatePlanDetailAddResp);
   rpc VpnConfigTemplatePlanDetailUpdate(VpnConfigTemplatePlanDetailUpdateReq) returns (VpnConfigTemplatePlanDetailUpdateResp);
   rpc VpnConfigTemplatePlanDetailDel(VpnConfigTemplatePlanDetailDelReq) returns (Empty);

+ 34 - 7
pb/pb/gorpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
 // 	protoc-gen-go v1.36.10
-// 	protoc        v3.19.4
+// 	protoc        v6.33.0
 // source: gorpc.proto
 
 package pb
@@ -26142,6 +26142,7 @@ func (x *VpnConfigTemplatePlanAddResp) GetDetails() []*VpnConfigTemplatePlanDeta
 type VpnConfigTemplatePlanUpdateReq struct {
 	state         protoimpl.MessageState   `protogen:"open.v1"`
 	Vo            *VpnConfigTemplatePlanVo `protobuf:"bytes,1,opt,name=vo,proto3" json:"vo,omitempty"`
+	WithDetails   bool                     `protobuf:"varint,2,opt,name=withDetails,proto3" json:"withDetails,omitempty"`
 	unknownFields protoimpl.UnknownFields
 	sizeCache     protoimpl.SizeCache
 }
@@ -26183,6 +26184,13 @@ func (x *VpnConfigTemplatePlanUpdateReq) GetVo() *VpnConfigTemplatePlanVo {
 	return nil
 }
 
+func (x *VpnConfigTemplatePlanUpdateReq) GetWithDetails() bool {
+	if x != nil {
+		return x.WithDetails
+	}
+	return false
+}
+
 type VpnConfigTemplatePlanUpdateResp struct {
 	state         protoimpl.MessageState           `protogen:"open.v1"`
 	Plan          *VpnConfigTemplatePlanVo         `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"`
@@ -26282,6 +26290,7 @@ func (x *VpnConfigTemplatePlanDelReq) GetIds() []int64 {
 type VpnConfigTemplatePlanGetReq struct {
 	state         protoimpl.MessageState   `protogen:"open.v1"`
 	Vo            *VpnConfigTemplatePlanVo `protobuf:"bytes,1,opt,name=vo,proto3" json:"vo,omitempty"`
+	WithDetails   bool                     `protobuf:"varint,2,opt,name=withDetails,proto3" json:"withDetails,omitempty"`
 	unknownFields protoimpl.UnknownFields
 	sizeCache     protoimpl.SizeCache
 }
@@ -26323,6 +26332,13 @@ func (x *VpnConfigTemplatePlanGetReq) GetVo() *VpnConfigTemplatePlanVo {
 	return nil
 }
 
+func (x *VpnConfigTemplatePlanGetReq) GetWithDetails() bool {
+	if x != nil {
+		return x.WithDetails
+	}
+	return false
+}
+
 type VpnConfigTemplatePlanGetResp struct {
 	state         protoimpl.MessageState           `protogen:"open.v1"`
 	Plan          *VpnConfigTemplatePlanVo         `protobuf:"bytes,1,opt,name=plan,proto3" json:"plan,omitempty"`
@@ -26381,6 +26397,7 @@ type VpnConfigTemplatePlanListReq struct {
 	Vo            *VpnConfigTemplatePlanVo `protobuf:"bytes,2,opt,name=vo,proto3" json:"vo,omitempty"`
 	ExcludeIds    []int64                  `protobuf:"varint,3,rep,packed,name=excludeIds,proto3" json:"excludeIds,omitempty"`
 	ProductCodes  []string                 `protobuf:"bytes,4,rep,name=productCodes,proto3" json:"productCodes,omitempty"`
+	WithDetails   bool                     `protobuf:"varint,5,opt,name=withDetails,proto3" json:"withDetails,omitempty"`
 	unknownFields protoimpl.UnknownFields
 	sizeCache     protoimpl.SizeCache
 }
@@ -26443,6 +26460,13 @@ func (x *VpnConfigTemplatePlanListReq) GetProductCodes() []string {
 	return nil
 }
 
+func (x *VpnConfigTemplatePlanListReq) GetWithDetails() bool {
+	if x != nil {
+		return x.WithDetails
+	}
+	return false
+}
+
 type VpnConfigTemplatePlanListResp struct {
 	state         protoimpl.MessageState          `protogen:"open.v1"`
 	Total         int64                           `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
@@ -29298,26 +29322,29 @@ const file_gorpc_proto_rawDesc = "" +
 	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"\x92\x01\n" +
 	"\x1cVpnConfigTemplatePlanAddResp\x122\n" +
 	"\x04plan\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x04plan\x12>\n" +
-	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"P\n" +
+	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"r\n" +
 	"\x1eVpnConfigTemplatePlanUpdateReq\x12.\n" +
-	"\x02vo\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x02vo\"\x95\x01\n" +
+	"\x02vo\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x02vo\x12 \n" +
+	"\vwithDetails\x18\x02 \x01(\bR\vwithDetails\"\x95\x01\n" +
 	"\x1fVpnConfigTemplatePlanUpdateResp\x122\n" +
 	"\x04plan\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x04plan\x12>\n" +
 	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"/\n" +
 	"\x1bVpnConfigTemplatePlanDelReq\x12\x10\n" +
-	"\x03ids\x18\x01 \x03(\x03R\x03ids\"M\n" +
+	"\x03ids\x18\x01 \x03(\x03R\x03ids\"o\n" +
 	"\x1bVpnConfigTemplatePlanGetReq\x12.\n" +
-	"\x02vo\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x02vo\"\x92\x01\n" +
+	"\x02vo\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x02vo\x12 \n" +
+	"\vwithDetails\x18\x02 \x01(\bR\vwithDetails\"\x92\x01\n" +
 	"\x1cVpnConfigTemplatePlanGetResp\x122\n" +
 	"\x04plan\x18\x01 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x04plan\x12>\n" +
-	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"\xb3\x01\n" +
+	"\adetails\x18\x02 \x03(\v2$.gorpc.VpnConfigTemplatePlanDetailVoR\adetails\"\xd5\x01\n" +
 	"\x1cVpnConfigTemplatePlanListReq\x12\x1f\n" +
 	"\x04page\x18\x01 \x01(\v2\v.gorpc.PageR\x04page\x12.\n" +
 	"\x02vo\x18\x02 \x01(\v2\x1e.gorpc.VpnConfigTemplatePlanVoR\x02vo\x12\x1e\n" +
 	"\n" +
 	"excludeIds\x18\x03 \x03(\x03R\n" +
 	"excludeIds\x12\"\n" +
-	"\fproductCodes\x18\x04 \x03(\tR\fproductCodes\"n\n" +
+	"\fproductCodes\x18\x04 \x03(\tR\fproductCodes\x12 \n" +
+	"\vwithDetails\x18\x05 \x01(\bR\vwithDetails\"n\n" +
 	"\x1dVpnConfigTemplatePlanListResp\x12\x14\n" +
 	"\x05total\x18\x01 \x01(\x03R\x05total\x127\n" +
 	"\x04list\x18\x02 \x03(\v2#.gorpc.VpnConfigTemplatePlanGetRespR\x04list\"Y\n" +

+ 17 - 5
pb/pb/gorpc_grpc.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.5.1
-// - protoc             v3.19.4
+// - protoc             v6.33.0
 // source: gorpc.proto
 
 package pb
@@ -11215,13 +11215,19 @@ type GoVpnClientClient interface {
 	VpnipBindBatchUpdate(ctx context.Context, in *VpnipBindBatchUpdateReq, opts ...grpc.CallOption) (*VpnipBindBatchUpdateResp, error)
 	// VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
 	VpnipsBindServer(ctx context.Context, in *VpnipBindBatchAddReq, opts ...grpc.CallOption) (*VpnipBindBatchAddResp, error)
-	// VpnConfigTemplatePlan Model
-	// VpnConfigTemplatePlanAdd
+	// VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
+	// VpnConfigTemplatePlanAdd 添加配置模板及模板详情
 	VpnConfigTemplatePlanAdd(ctx context.Context, in *VpnConfigTemplatePlanAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanAddResp, error)
+	// VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanUpdate(ctx context.Context, in *VpnConfigTemplatePlanUpdateReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanUpdateResp, error)
+	// VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
 	VpnConfigTemplatePlanDel(ctx context.Context, in *VpnConfigTemplatePlanDelReq, opts ...grpc.CallOption) (*Empty, error)
+	// VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanGet(ctx context.Context, in *VpnConfigTemplatePlanGetReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanGetResp, error)
+	// VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanList(ctx context.Context, in *VpnConfigTemplatePlanListReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanListResp, error)
+	// VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
+	// VpnConfigTemplatePlanDetailAdd 添加模板详情
 	VpnConfigTemplatePlanDetailAdd(ctx context.Context, in *VpnConfigTemplatePlanDetailAddReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanDetailAddResp, error)
 	VpnConfigTemplatePlanDetailUpdate(ctx context.Context, in *VpnConfigTemplatePlanDetailUpdateReq, opts ...grpc.CallOption) (*VpnConfigTemplatePlanDetailUpdateResp, error)
 	VpnConfigTemplatePlanDetailDel(ctx context.Context, in *VpnConfigTemplatePlanDetailDelReq, opts ...grpc.CallOption) (*Empty, error)
@@ -12326,13 +12332,19 @@ type GoVpnClientServer interface {
 	VpnipBindBatchUpdate(context.Context, *VpnipBindBatchUpdateReq) (*VpnipBindBatchUpdateResp, error)
 	// VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
 	VpnipsBindServer(context.Context, *VpnipBindBatchAddReq) (*VpnipBindBatchAddResp, error)
-	// VpnConfigTemplatePlan Model
-	// VpnConfigTemplatePlanAdd
+	// VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
+	// VpnConfigTemplatePlanAdd 添加配置模板及模板详情
 	VpnConfigTemplatePlanAdd(context.Context, *VpnConfigTemplatePlanAddReq) (*VpnConfigTemplatePlanAddResp, error)
+	// VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanUpdate(context.Context, *VpnConfigTemplatePlanUpdateReq) (*VpnConfigTemplatePlanUpdateResp, error)
+	// VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
 	VpnConfigTemplatePlanDel(context.Context, *VpnConfigTemplatePlanDelReq) (*Empty, error)
+	// VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanGet(context.Context, *VpnConfigTemplatePlanGetReq) (*VpnConfigTemplatePlanGetResp, error)
+	// VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
 	VpnConfigTemplatePlanList(context.Context, *VpnConfigTemplatePlanListReq) (*VpnConfigTemplatePlanListResp, error)
+	// VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
+	// VpnConfigTemplatePlanDetailAdd 添加模板详情
 	VpnConfigTemplatePlanDetailAdd(context.Context, *VpnConfigTemplatePlanDetailAddReq) (*VpnConfigTemplatePlanDetailAddResp, error)
 	VpnConfigTemplatePlanDetailUpdate(context.Context, *VpnConfigTemplatePlanDetailUpdateReq) (*VpnConfigTemplatePlanDetailUpdateResp, error)
 	VpnConfigTemplatePlanDetailDel(context.Context, *VpnConfigTemplatePlanDetailDelReq) (*Empty, error)

+ 18 - 4
pb/vpn.proto

@@ -555,7 +555,10 @@ message VpnConfigTemplatePlanAddResp {
   repeated VpnConfigTemplatePlanDetailVo details = 2;
 }
 
-message VpnConfigTemplatePlanUpdateReq { VpnConfigTemplatePlanVo vo = 1; }
+message VpnConfigTemplatePlanUpdateReq {
+  VpnConfigTemplatePlanVo vo = 1;
+  bool withDetails = 2;
+}
 
 message VpnConfigTemplatePlanUpdateResp {
   VpnConfigTemplatePlanVo plan = 1;
@@ -564,7 +567,10 @@ message VpnConfigTemplatePlanUpdateResp {
 
 message VpnConfigTemplatePlanDelReq { repeated int64 ids = 1; }
 
-message VpnConfigTemplatePlanGetReq { VpnConfigTemplatePlanVo vo = 1; }
+message VpnConfigTemplatePlanGetReq {
+  VpnConfigTemplatePlanVo vo = 1;
+  bool withDetails = 2;
+}
 
 message VpnConfigTemplatePlanGetResp {
   VpnConfigTemplatePlanVo plan = 1;
@@ -576,6 +582,7 @@ message VpnConfigTemplatePlanListReq {
   VpnConfigTemplatePlanVo vo = 2;
   repeated int64 excludeIds = 3;
   repeated string productCodes = 4;
+  bool withDetails = 5;
 }
 
 message VpnConfigTemplatePlanListResp {
@@ -751,13 +758,20 @@ service GoVpnClient {
   // VpnipsBindServer 为一台服务器绑定一批新IP,会解绑上次绑定的IP,再绑定新的IP,仅需提供 ipId, serverId, Remark, createAt, updateAt 即可,其他字段会自动填充
   rpc VpnipsBindServer(VpnipBindBatchAddReq) returns (VpnipBindBatchAddResp);
 
-  // VpnConfigTemplatePlan Model
-  // VpnConfigTemplatePlanAdd
+  // VpnConfigTemplatePlan Model (Xray配置模板,jump那边叫做配置模板)
+  // VpnConfigTemplatePlanAdd 添加配置模板及模板详情
   rpc VpnConfigTemplatePlanAdd(VpnConfigTemplatePlanAddReq) returns (VpnConfigTemplatePlanAddResp);
+  // VpnConfigTemplatePlanUpdate 更新配置模板(只更新模板,不更新模板详情,如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanUpdate(VpnConfigTemplatePlanUpdateReq) returns (VpnConfigTemplatePlanUpdateResp);
+  // VpnConfigTemplatePlanDel 删除配置模板(会同时删除模板详情)
   rpc VpnConfigTemplatePlanDel(VpnConfigTemplatePlanDelReq) returns (Empty);
+  // VpnConfigTemplatePlanGet 获取配置模板(如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanGet(VpnConfigTemplatePlanGetReq) returns (VpnConfigTemplatePlanGetResp);
+  // VpnConfigTemplatePlanList 获取配置模板列表(如果 withDetails 为 true,则返回结果中包含模板详情)
   rpc VpnConfigTemplatePlanList(VpnConfigTemplatePlanListReq) returns (VpnConfigTemplatePlanListResp);
+
+  // VpnConfigTemplatePlanDetail Model (Xray配置模板详情,jump那边叫做传输配置)
+  // VpnConfigTemplatePlanDetailAdd 添加模板详情
   rpc VpnConfigTemplatePlanDetailAdd(VpnConfigTemplatePlanDetailAddReq) returns (VpnConfigTemplatePlanDetailAddResp);
   rpc VpnConfigTemplatePlanDetailUpdate(VpnConfigTemplatePlanDetailUpdateReq) returns (VpnConfigTemplatePlanDetailUpdateResp);
   rpc VpnConfigTemplatePlanDetailDel(VpnConfigTemplatePlanDetailDelReq) returns (Empty);