Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 42f36cc36a |
@ -1101,6 +1101,302 @@ func (x *RemoveXrayUserResponse) GetError() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetHysteria2StatusRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusRequest) Reset() {
|
||||||
|
*x = GetHysteria2StatusRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[20]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetHysteria2StatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[20]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetHysteria2StatusRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetHysteria2StatusRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{20}
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetHysteria2StatusResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Running bool `protobuf:"varint,1,opt,name=running,proto3" json:"running,omitempty"`
|
||||||
|
Port int32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) Reset() {
|
||||||
|
*x = GetHysteria2StatusResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[21]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetHysteria2StatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[21]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use GetHysteria2StatusResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetHysteria2StatusResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{21}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) GetRunning() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Running
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) GetPort() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Port
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetHysteria2StatusResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddHysteria2UserRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||||
|
Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserRequest) Reset() {
|
||||||
|
*x = AddHysteria2UserRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[22]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddHysteria2UserRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[22]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use AddHysteria2UserRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddHysteria2UserRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{22}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserRequest) GetUuid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uuid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserRequest) GetEmail() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Email
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddHysteria2UserResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserResponse) Reset() {
|
||||||
|
*x = AddHysteria2UserResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[23]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddHysteria2UserResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[23]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use AddHysteria2UserResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddHysteria2UserResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{23}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddHysteria2UserResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveHysteria2UserRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserRequest) Reset() {
|
||||||
|
*x = RemoveHysteria2UserRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[24]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemoveHysteria2UserRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[24]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use RemoveHysteria2UserRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemoveHysteria2UserRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{24}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserRequest) GetUuid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uuid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveHysteria2UserResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserResponse) Reset() {
|
||||||
|
*x = RemoveHysteria2UserResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[25]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemoveHysteria2UserResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[25]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use RemoveHysteria2UserResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemoveHysteria2UserResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{25}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveHysteria2UserResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_proto_agent_proto protoreflect.FileDescriptor
|
var File_proto_agent_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_proto_agent_proto_rawDesc = "" +
|
const file_proto_agent_proto_rawDesc = "" +
|
||||||
@ -1182,7 +1478,23 @@ const file_proto_agent_proto_rawDesc = "" +
|
|||||||
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"H\n" +
|
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"H\n" +
|
||||||
"\x16RemoveXrayUserResponse\x12\x18\n" +
|
"\x16RemoveXrayUserResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
"\x05error\x18\x02 \x01(\tR\x05error2\xd1\x05\n" +
|
"\x05error\x18\x02 \x01(\tR\x05error\"\x1b\n" +
|
||||||
|
"\x19GetHysteria2StatusRequest\"`\n" +
|
||||||
|
"\x1aGetHysteria2StatusResponse\x12\x18\n" +
|
||||||
|
"\arunning\x18\x01 \x01(\bR\arunning\x12\x12\n" +
|
||||||
|
"\x04port\x18\x02 \x01(\x05R\x04port\x12\x14\n" +
|
||||||
|
"\x05error\x18\x03 \x01(\tR\x05error\"C\n" +
|
||||||
|
"\x17AddHysteria2UserRequest\x12\x12\n" +
|
||||||
|
"\x04uuid\x18\x01 \x01(\tR\x04uuid\x12\x14\n" +
|
||||||
|
"\x05email\x18\x02 \x01(\tR\x05email\"J\n" +
|
||||||
|
"\x18AddHysteria2UserResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error\"0\n" +
|
||||||
|
"\x1aRemoveHysteria2UserRequest\x12\x12\n" +
|
||||||
|
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"M\n" +
|
||||||
|
"\x1bRemoveHysteria2UserResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error2\xdf\a\n" +
|
||||||
"\x0eWireGuardAgent\x12S\n" +
|
"\x0eWireGuardAgent\x12S\n" +
|
||||||
"\x10GetClientConfigs\x12\x1e.agent.GetClientConfigsRequest\x1a\x1f.agent.GetClientConfigsResponse\x12M\n" +
|
"\x10GetClientConfigs\x12\x1e.agent.GetClientConfigsRequest\x1a\x1f.agent.GetClientConfigsResponse\x12M\n" +
|
||||||
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12S\n" +
|
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12S\n" +
|
||||||
@ -1192,7 +1504,10 @@ const file_proto_agent_proto_rawDesc = "" +
|
|||||||
"\rGetXrayStatus\x12\x1b.agent.GetXrayStatusRequest\x1a\x1c.agent.GetXrayStatusResponse\x12S\n" +
|
"\rGetXrayStatus\x12\x1b.agent.GetXrayStatusRequest\x1a\x1c.agent.GetXrayStatusResponse\x12S\n" +
|
||||||
"\x10GetXrayPublicKey\x12\x1e.agent.GetXrayPublicKeyRequest\x1a\x1f.agent.GetXrayPublicKeyResponse\x12D\n" +
|
"\x10GetXrayPublicKey\x12\x1e.agent.GetXrayPublicKeyRequest\x1a\x1f.agent.GetXrayPublicKeyResponse\x12D\n" +
|
||||||
"\vAddXrayUser\x12\x19.agent.AddXrayUserRequest\x1a\x1a.agent.AddXrayUserResponse\x12M\n" +
|
"\vAddXrayUser\x12\x19.agent.AddXrayUserRequest\x1a\x1a.agent.AddXrayUserResponse\x12M\n" +
|
||||||
"\x0eRemoveXrayUser\x12\x1c.agent.RemoveXrayUserRequest\x1a\x1d.agent.RemoveXrayUserResponseB\x13Z\x11l_vpn_proto/protob\x06proto3"
|
"\x0eRemoveXrayUser\x12\x1c.agent.RemoveXrayUserRequest\x1a\x1d.agent.RemoveXrayUserResponse\x12Y\n" +
|
||||||
|
"\x12GetHysteria2Status\x12 .agent.GetHysteria2StatusRequest\x1a!.agent.GetHysteria2StatusResponse\x12S\n" +
|
||||||
|
"\x10AddHysteria2User\x12\x1e.agent.AddHysteria2UserRequest\x1a\x1f.agent.AddHysteria2UserResponse\x12\\\n" +
|
||||||
|
"\x13RemoveHysteria2User\x12!.agent.RemoveHysteria2UserRequest\x1a\".agent.RemoveHysteria2UserResponseB\x13Z\x11l_vpn_proto/protob\x06proto3"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_proto_agent_proto_rawDescOnce sync.Once
|
file_proto_agent_proto_rawDescOnce sync.Once
|
||||||
@ -1206,7 +1521,7 @@ func file_proto_agent_proto_rawDescGZIP() []byte {
|
|||||||
return file_proto_agent_proto_rawDescData
|
return file_proto_agent_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_proto_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
var file_proto_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 26)
|
||||||
var file_proto_agent_proto_goTypes = []any{
|
var file_proto_agent_proto_goTypes = []any{
|
||||||
(*GetClientConfigsRequest)(nil), // 0: agent.GetClientConfigsRequest
|
(*GetClientConfigsRequest)(nil), // 0: agent.GetClientConfigsRequest
|
||||||
(*ClientConfig)(nil), // 1: agent.ClientConfig
|
(*ClientConfig)(nil), // 1: agent.ClientConfig
|
||||||
@ -1228,6 +1543,12 @@ var file_proto_agent_proto_goTypes = []any{
|
|||||||
(*AddXrayUserResponse)(nil), // 17: agent.AddXrayUserResponse
|
(*AddXrayUserResponse)(nil), // 17: agent.AddXrayUserResponse
|
||||||
(*RemoveXrayUserRequest)(nil), // 18: agent.RemoveXrayUserRequest
|
(*RemoveXrayUserRequest)(nil), // 18: agent.RemoveXrayUserRequest
|
||||||
(*RemoveXrayUserResponse)(nil), // 19: agent.RemoveXrayUserResponse
|
(*RemoveXrayUserResponse)(nil), // 19: agent.RemoveXrayUserResponse
|
||||||
|
(*GetHysteria2StatusRequest)(nil), // 20: agent.GetHysteria2StatusRequest
|
||||||
|
(*GetHysteria2StatusResponse)(nil), // 21: agent.GetHysteria2StatusResponse
|
||||||
|
(*AddHysteria2UserRequest)(nil), // 22: agent.AddHysteria2UserRequest
|
||||||
|
(*AddHysteria2UserResponse)(nil), // 23: agent.AddHysteria2UserResponse
|
||||||
|
(*RemoveHysteria2UserRequest)(nil), // 24: agent.RemoveHysteria2UserRequest
|
||||||
|
(*RemoveHysteria2UserResponse)(nil), // 25: agent.RemoveHysteria2UserResponse
|
||||||
}
|
}
|
||||||
var file_proto_agent_proto_depIdxs = []int32{
|
var file_proto_agent_proto_depIdxs = []int32{
|
||||||
1, // 0: agent.GetClientConfigsResponse.clients:type_name -> agent.ClientConfig
|
1, // 0: agent.GetClientConfigsResponse.clients:type_name -> agent.ClientConfig
|
||||||
@ -1242,17 +1563,23 @@ var file_proto_agent_proto_depIdxs = []int32{
|
|||||||
14, // 9: agent.WireGuardAgent.GetXrayPublicKey:input_type -> agent.GetXrayPublicKeyRequest
|
14, // 9: agent.WireGuardAgent.GetXrayPublicKey:input_type -> agent.GetXrayPublicKeyRequest
|
||||||
16, // 10: agent.WireGuardAgent.AddXrayUser:input_type -> agent.AddXrayUserRequest
|
16, // 10: agent.WireGuardAgent.AddXrayUser:input_type -> agent.AddXrayUserRequest
|
||||||
18, // 11: agent.WireGuardAgent.RemoveXrayUser:input_type -> agent.RemoveXrayUserRequest
|
18, // 11: agent.WireGuardAgent.RemoveXrayUser:input_type -> agent.RemoveXrayUserRequest
|
||||||
2, // 12: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
|
20, // 12: agent.WireGuardAgent.GetHysteria2Status:input_type -> agent.GetHysteria2StatusRequest
|
||||||
4, // 13: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
|
22, // 13: agent.WireGuardAgent.AddHysteria2User:input_type -> agent.AddHysteria2UserRequest
|
||||||
6, // 14: agent.WireGuardAgent.UnregisterClient:output_type -> agent.UnregisterClientResponse
|
24, // 14: agent.WireGuardAgent.RemoveHysteria2User:input_type -> agent.RemoveHysteria2UserRequest
|
||||||
8, // 15: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
|
2, // 15: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
|
||||||
11, // 16: agent.WireGuardAgent.PingHosts:output_type -> agent.PingHostsResponse
|
4, // 16: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
|
||||||
13, // 17: agent.WireGuardAgent.GetXrayStatus:output_type -> agent.GetXrayStatusResponse
|
6, // 17: agent.WireGuardAgent.UnregisterClient:output_type -> agent.UnregisterClientResponse
|
||||||
15, // 18: agent.WireGuardAgent.GetXrayPublicKey:output_type -> agent.GetXrayPublicKeyResponse
|
8, // 18: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
|
||||||
17, // 19: agent.WireGuardAgent.AddXrayUser:output_type -> agent.AddXrayUserResponse
|
11, // 19: agent.WireGuardAgent.PingHosts:output_type -> agent.PingHostsResponse
|
||||||
19, // 20: agent.WireGuardAgent.RemoveXrayUser:output_type -> agent.RemoveXrayUserResponse
|
13, // 20: agent.WireGuardAgent.GetXrayStatus:output_type -> agent.GetXrayStatusResponse
|
||||||
12, // [12:21] is the sub-list for method output_type
|
15, // 21: agent.WireGuardAgent.GetXrayPublicKey:output_type -> agent.GetXrayPublicKeyResponse
|
||||||
3, // [3:12] is the sub-list for method input_type
|
17, // 22: agent.WireGuardAgent.AddXrayUser:output_type -> agent.AddXrayUserResponse
|
||||||
|
19, // 23: agent.WireGuardAgent.RemoveXrayUser:output_type -> agent.RemoveXrayUserResponse
|
||||||
|
21, // 24: agent.WireGuardAgent.GetHysteria2Status:output_type -> agent.GetHysteria2StatusResponse
|
||||||
|
23, // 25: agent.WireGuardAgent.AddHysteria2User:output_type -> agent.AddHysteria2UserResponse
|
||||||
|
25, // 26: agent.WireGuardAgent.RemoveHysteria2User:output_type -> agent.RemoveHysteria2UserResponse
|
||||||
|
15, // [15:27] is the sub-list for method output_type
|
||||||
|
3, // [3:15] is the sub-list for method input_type
|
||||||
3, // [3:3] is the sub-list for extension type_name
|
3, // [3:3] is the sub-list for extension type_name
|
||||||
3, // [3:3] is the sub-list for extension extendee
|
3, // [3:3] is the sub-list for extension extendee
|
||||||
0, // [0:3] is the sub-list for field type_name
|
0, // [0:3] is the sub-list for field type_name
|
||||||
@ -1269,7 +1596,7 @@ func file_proto_agent_proto_init() {
|
|||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_agent_proto_rawDesc), len(file_proto_agent_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_agent_proto_rawDesc), len(file_proto_agent_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 20,
|
NumMessages: 26,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -16,6 +16,11 @@ service WireGuardAgent {
|
|||||||
rpc GetXrayPublicKey(GetXrayPublicKeyRequest) returns (GetXrayPublicKeyResponse);
|
rpc GetXrayPublicKey(GetXrayPublicKeyRequest) returns (GetXrayPublicKeyResponse);
|
||||||
rpc AddXrayUser(AddXrayUserRequest) returns (AddXrayUserResponse);
|
rpc AddXrayUser(AddXrayUserRequest) returns (AddXrayUserResponse);
|
||||||
rpc RemoveXrayUser(RemoveXrayUserRequest) returns (RemoveXrayUserResponse);
|
rpc RemoveXrayUser(RemoveXrayUserRequest) returns (RemoveXrayUserResponse);
|
||||||
|
|
||||||
|
// Hysteria2 / QUIC management
|
||||||
|
rpc GetHysteria2Status(GetHysteria2StatusRequest) returns (GetHysteria2StatusResponse);
|
||||||
|
rpc AddHysteria2User(AddHysteria2UserRequest) returns (AddHysteria2UserResponse);
|
||||||
|
rpc RemoveHysteria2User(RemoveHysteria2UserRequest) returns (RemoveHysteria2UserResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetClientConfigsRequest {}
|
message GetClientConfigsRequest {}
|
||||||
@ -116,3 +121,29 @@ message RemoveXrayUserResponse {
|
|||||||
bool success = 1;
|
bool success = 1;
|
||||||
string error = 2;
|
string error = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ── Hysteria2 messages ────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
message GetHysteria2StatusRequest {}
|
||||||
|
message GetHysteria2StatusResponse {
|
||||||
|
bool running = 1;
|
||||||
|
int32 port = 2;
|
||||||
|
string error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddHysteria2UserRequest {
|
||||||
|
string uuid = 1;
|
||||||
|
string email = 2;
|
||||||
|
}
|
||||||
|
message AddHysteria2UserResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveHysteria2UserRequest {
|
||||||
|
string uuid = 1;
|
||||||
|
}
|
||||||
|
message RemoveHysteria2UserResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|||||||
@ -28,6 +28,9 @@ const (
|
|||||||
WireGuardAgent_GetXrayPublicKey_FullMethodName = "/agent.WireGuardAgent/GetXrayPublicKey"
|
WireGuardAgent_GetXrayPublicKey_FullMethodName = "/agent.WireGuardAgent/GetXrayPublicKey"
|
||||||
WireGuardAgent_AddXrayUser_FullMethodName = "/agent.WireGuardAgent/AddXrayUser"
|
WireGuardAgent_AddXrayUser_FullMethodName = "/agent.WireGuardAgent/AddXrayUser"
|
||||||
WireGuardAgent_RemoveXrayUser_FullMethodName = "/agent.WireGuardAgent/RemoveXrayUser"
|
WireGuardAgent_RemoveXrayUser_FullMethodName = "/agent.WireGuardAgent/RemoveXrayUser"
|
||||||
|
WireGuardAgent_GetHysteria2Status_FullMethodName = "/agent.WireGuardAgent/GetHysteria2Status"
|
||||||
|
WireGuardAgent_AddHysteria2User_FullMethodName = "/agent.WireGuardAgent/AddHysteria2User"
|
||||||
|
WireGuardAgent_RemoveHysteria2User_FullMethodName = "/agent.WireGuardAgent/RemoveHysteria2User"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WireGuardAgentClient is the client API for WireGuardAgent service.
|
// WireGuardAgentClient is the client API for WireGuardAgent service.
|
||||||
@ -44,6 +47,10 @@ type WireGuardAgentClient interface {
|
|||||||
GetXrayPublicKey(ctx context.Context, in *GetXrayPublicKeyRequest, opts ...grpc.CallOption) (*GetXrayPublicKeyResponse, error)
|
GetXrayPublicKey(ctx context.Context, in *GetXrayPublicKeyRequest, opts ...grpc.CallOption) (*GetXrayPublicKeyResponse, error)
|
||||||
AddXrayUser(ctx context.Context, in *AddXrayUserRequest, opts ...grpc.CallOption) (*AddXrayUserResponse, error)
|
AddXrayUser(ctx context.Context, in *AddXrayUserRequest, opts ...grpc.CallOption) (*AddXrayUserResponse, error)
|
||||||
RemoveXrayUser(ctx context.Context, in *RemoveXrayUserRequest, opts ...grpc.CallOption) (*RemoveXrayUserResponse, error)
|
RemoveXrayUser(ctx context.Context, in *RemoveXrayUserRequest, opts ...grpc.CallOption) (*RemoveXrayUserResponse, error)
|
||||||
|
// Hysteria2 / QUIC management
|
||||||
|
GetHysteria2Status(ctx context.Context, in *GetHysteria2StatusRequest, opts ...grpc.CallOption) (*GetHysteria2StatusResponse, error)
|
||||||
|
AddHysteria2User(ctx context.Context, in *AddHysteria2UserRequest, opts ...grpc.CallOption) (*AddHysteria2UserResponse, error)
|
||||||
|
RemoveHysteria2User(ctx context.Context, in *RemoveHysteria2UserRequest, opts ...grpc.CallOption) (*RemoveHysteria2UserResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type wireGuardAgentClient struct {
|
type wireGuardAgentClient struct {
|
||||||
@ -144,6 +151,36 @@ func (c *wireGuardAgentClient) RemoveXrayUser(ctx context.Context, in *RemoveXra
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) GetHysteria2Status(ctx context.Context, in *GetHysteria2StatusRequest, opts ...grpc.CallOption) (*GetHysteria2StatusResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetHysteria2StatusResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_GetHysteria2Status_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) AddHysteria2User(ctx context.Context, in *AddHysteria2UserRequest, opts ...grpc.CallOption) (*AddHysteria2UserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(AddHysteria2UserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_AddHysteria2User_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) RemoveHysteria2User(ctx context.Context, in *RemoveHysteria2UserRequest, opts ...grpc.CallOption) (*RemoveHysteria2UserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(RemoveHysteria2UserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_RemoveHysteria2User_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// WireGuardAgentServer is the server API for WireGuardAgent service.
|
// WireGuardAgentServer is the server API for WireGuardAgent service.
|
||||||
// All implementations must embed UnimplementedWireGuardAgentServer
|
// All implementations must embed UnimplementedWireGuardAgentServer
|
||||||
// for forward compatibility.
|
// for forward compatibility.
|
||||||
@ -158,6 +195,10 @@ type WireGuardAgentServer interface {
|
|||||||
GetXrayPublicKey(context.Context, *GetXrayPublicKeyRequest) (*GetXrayPublicKeyResponse, error)
|
GetXrayPublicKey(context.Context, *GetXrayPublicKeyRequest) (*GetXrayPublicKeyResponse, error)
|
||||||
AddXrayUser(context.Context, *AddXrayUserRequest) (*AddXrayUserResponse, error)
|
AddXrayUser(context.Context, *AddXrayUserRequest) (*AddXrayUserResponse, error)
|
||||||
RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error)
|
RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error)
|
||||||
|
// Hysteria2 / QUIC management
|
||||||
|
GetHysteria2Status(context.Context, *GetHysteria2StatusRequest) (*GetHysteria2StatusResponse, error)
|
||||||
|
AddHysteria2User(context.Context, *AddHysteria2UserRequest) (*AddHysteria2UserResponse, error)
|
||||||
|
RemoveHysteria2User(context.Context, *RemoveHysteria2UserRequest) (*RemoveHysteria2UserResponse, error)
|
||||||
mustEmbedUnimplementedWireGuardAgentServer()
|
mustEmbedUnimplementedWireGuardAgentServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,6 +236,15 @@ func (UnimplementedWireGuardAgentServer) AddXrayUser(context.Context, *AddXrayUs
|
|||||||
func (UnimplementedWireGuardAgentServer) RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error) {
|
func (UnimplementedWireGuardAgentServer) RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method RemoveXrayUser not implemented")
|
return nil, status.Error(codes.Unimplemented, "method RemoveXrayUser not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) GetHysteria2Status(context.Context, *GetHysteria2StatusRequest) (*GetHysteria2StatusResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetHysteria2Status not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) AddHysteria2User(context.Context, *AddHysteria2UserRequest) (*AddHysteria2UserResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method AddHysteria2User not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) RemoveHysteria2User(context.Context, *RemoveHysteria2UserRequest) (*RemoveHysteria2UserResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method RemoveHysteria2User not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedWireGuardAgentServer) mustEmbedUnimplementedWireGuardAgentServer() {}
|
func (UnimplementedWireGuardAgentServer) mustEmbedUnimplementedWireGuardAgentServer() {}
|
||||||
func (UnimplementedWireGuardAgentServer) testEmbeddedByValue() {}
|
func (UnimplementedWireGuardAgentServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
@ -378,6 +428,60 @@ func _WireGuardAgent_RemoveXrayUser_Handler(srv interface{}, ctx context.Context
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_GetHysteria2Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetHysteria2StatusRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).GetHysteria2Status(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_GetHysteria2Status_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).GetHysteria2Status(ctx, req.(*GetHysteria2StatusRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_AddHysteria2User_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AddHysteria2UserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).AddHysteria2User(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_AddHysteria2User_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).AddHysteria2User(ctx, req.(*AddHysteria2UserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_RemoveHysteria2User_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RemoveHysteria2UserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).RemoveHysteria2User(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_RemoveHysteria2User_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).RemoveHysteria2User(ctx, req.(*RemoveHysteria2UserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// WireGuardAgent_ServiceDesc is the grpc.ServiceDesc for WireGuardAgent service.
|
// WireGuardAgent_ServiceDesc is the grpc.ServiceDesc for WireGuardAgent service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -421,6 +525,18 @@ var WireGuardAgent_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "RemoveXrayUser",
|
MethodName: "RemoveXrayUser",
|
||||||
Handler: _WireGuardAgent_RemoveXrayUser_Handler,
|
Handler: _WireGuardAgent_RemoveXrayUser_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetHysteria2Status",
|
||||||
|
Handler: _WireGuardAgent_GetHysteria2Status_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AddHysteria2User",
|
||||||
|
Handler: _WireGuardAgent_AddHysteria2User_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RemoveHysteria2User",
|
||||||
|
Handler: _WireGuardAgent_RemoveHysteria2User_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "proto/agent.proto",
|
Metadata: "proto/agent.proto",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user