Compare commits
4 Commits
ad2a795de7
...
e390fbb72e
| Author | SHA1 | Date | |
|---|---|---|---|
| e390fbb72e | |||
| 6aba40ff65 | |||
| 557243af1c | |||
|
|
22309e99c2 |
@ -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.36.11
|
// protoc-gen-go v1.36.11
|
||||||
// protoc v3.21.12
|
// protoc v7.34.0
|
||||||
// source: proto/agent.proto
|
// source: proto/agent.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
@ -313,6 +313,102 @@ func (x *RegisterClientResponse) GetClient() *ClientConfig {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UnregisterClientRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientRequest) Reset() {
|
||||||
|
*x = UnregisterClientRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnregisterClientRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UnregisterClientRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[5]
|
||||||
|
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 UnregisterClientRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UnregisterClientRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientRequest) GetPublicKey() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PublicKey
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type UnregisterClientResponse 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 *UnregisterClientResponse) Reset() {
|
||||||
|
*x = UnregisterClientResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*UnregisterClientResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *UnregisterClientResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[6]
|
||||||
|
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 UnregisterClientResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*UnregisterClientResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *UnregisterClientResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
type GetServerStatusRequest struct {
|
type GetServerStatusRequest struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
@ -321,7 +417,7 @@ type GetServerStatusRequest struct {
|
|||||||
|
|
||||||
func (x *GetServerStatusRequest) Reset() {
|
func (x *GetServerStatusRequest) Reset() {
|
||||||
*x = GetServerStatusRequest{}
|
*x = GetServerStatusRequest{}
|
||||||
mi := &file_proto_agent_proto_msgTypes[5]
|
mi := &file_proto_agent_proto_msgTypes[7]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -333,7 +429,7 @@ func (x *GetServerStatusRequest) String() string {
|
|||||||
func (*GetServerStatusRequest) ProtoMessage() {}
|
func (*GetServerStatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_agent_proto_msgTypes[5]
|
mi := &file_proto_agent_proto_msgTypes[7]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -346,7 +442,7 @@ func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GetServerStatusRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GetServerStatusRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*GetServerStatusRequest) Descriptor() ([]byte, []int) {
|
func (*GetServerStatusRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_agent_proto_rawDescGZIP(), []int{5}
|
return file_proto_agent_proto_rawDescGZIP(), []int{7}
|
||||||
}
|
}
|
||||||
|
|
||||||
type GetServerStatusResponse struct {
|
type GetServerStatusResponse struct {
|
||||||
@ -363,7 +459,7 @@ type GetServerStatusResponse struct {
|
|||||||
|
|
||||||
func (x *GetServerStatusResponse) Reset() {
|
func (x *GetServerStatusResponse) Reset() {
|
||||||
*x = GetServerStatusResponse{}
|
*x = GetServerStatusResponse{}
|
||||||
mi := &file_proto_agent_proto_msgTypes[6]
|
mi := &file_proto_agent_proto_msgTypes[8]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
@ -375,7 +471,7 @@ func (x *GetServerStatusResponse) String() string {
|
|||||||
func (*GetServerStatusResponse) ProtoMessage() {}
|
func (*GetServerStatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_proto_agent_proto_msgTypes[6]
|
mi := &file_proto_agent_proto_msgTypes[8]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
@ -388,7 +484,7 @@ func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
|
|||||||
|
|
||||||
// Deprecated: Use GetServerStatusResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GetServerStatusResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*GetServerStatusResponse) Descriptor() ([]byte, []int) {
|
func (*GetServerStatusResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_proto_agent_proto_rawDescGZIP(), []int{6}
|
return file_proto_agent_proto_rawDescGZIP(), []int{8}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetServerStatusResponse) GetSuccess() bool {
|
func (x *GetServerStatusResponse) GetSuccess() bool {
|
||||||
@ -433,6 +529,578 @@ func (x *GetServerStatusResponse) GetPeersCount() int32 {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PingHostsRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsRequest) Reset() {
|
||||||
|
*x = PingHostsRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[9]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PingHostsRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PingHostsRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[9]
|
||||||
|
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 PingHostsRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PingHostsRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{9}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsRequest) GetHosts() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Hosts
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type PingResult struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
|
||||||
|
LatencyMs float64 `protobuf:"fixed64,2,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"` // -1 if unreachable
|
||||||
|
Reachable bool `protobuf:"varint,3,opt,name=reachable,proto3" json:"reachable,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) Reset() {
|
||||||
|
*x = PingResult{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[10]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PingResult) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PingResult) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[10]
|
||||||
|
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 PingResult.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PingResult) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{10}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) GetHost() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Host
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) GetLatencyMs() float64 {
|
||||||
|
if x != nil {
|
||||||
|
return x.LatencyMs
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) GetReachable() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Reachable
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingResult) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type PingHostsResponse 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"`
|
||||||
|
Results []*PingResult `protobuf:"bytes,3,rep,name=results,proto3" json:"results,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) Reset() {
|
||||||
|
*x = PingHostsResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*PingHostsResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[11]
|
||||||
|
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 PingHostsResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*PingHostsResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{11}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *PingHostsResponse) GetResults() []*PingResult {
|
||||||
|
if x != nil {
|
||||||
|
return x.Results
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetXrayStatusRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusRequest) Reset() {
|
||||||
|
*x = GetXrayStatusRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[12]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetXrayStatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[12]
|
||||||
|
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 GetXrayStatusRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetXrayStatusRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{12}
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetXrayStatusResponse 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 *GetXrayStatusResponse) Reset() {
|
||||||
|
*x = GetXrayStatusResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[13]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetXrayStatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[13]
|
||||||
|
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 GetXrayStatusResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetXrayStatusResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{13}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusResponse) GetRunning() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Running
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusResponse) GetPort() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Port
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayStatusResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetXrayPublicKeyRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyRequest) Reset() {
|
||||||
|
*x = GetXrayPublicKeyRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[14]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetXrayPublicKeyRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[14]
|
||||||
|
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 GetXrayPublicKeyRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetXrayPublicKeyRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{14}
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetXrayPublicKeyResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
|
||||||
|
ShortId string `protobuf:"bytes,2,opt,name=short_id,json=shortId,proto3" json:"short_id,omitempty"`
|
||||||
|
ServerName string `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
|
||||||
|
Port int32 `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) Reset() {
|
||||||
|
*x = GetXrayPublicKeyResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[15]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*GetXrayPublicKeyResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[15]
|
||||||
|
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 GetXrayPublicKeyResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*GetXrayPublicKeyResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{15}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) GetPublicKey() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.PublicKey
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) GetShortId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ShortId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) GetServerName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *GetXrayPublicKeyResponse) GetPort() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Port
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddXrayUserRequest 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 *AddXrayUserRequest) Reset() {
|
||||||
|
*x = AddXrayUserRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[16]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddXrayUserRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddXrayUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[16]
|
||||||
|
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 AddXrayUserRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddXrayUserRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{16}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserRequest) GetUuid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uuid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserRequest) GetEmail() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Email
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type AddXrayUserResponse 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 *AddXrayUserResponse) Reset() {
|
||||||
|
*x = AddXrayUserResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[17]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*AddXrayUserResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *AddXrayUserResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[17]
|
||||||
|
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 AddXrayUserResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*AddXrayUserResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{17}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *AddXrayUserResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveXrayUserRequest 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 *RemoveXrayUserRequest) Reset() {
|
||||||
|
*x = RemoveXrayUserRequest{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[18]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemoveXrayUserRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[18]
|
||||||
|
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 RemoveXrayUserRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemoveXrayUserRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{18}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserRequest) GetUuid() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Uuid
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type RemoveXrayUserResponse 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 *RemoveXrayUserResponse) Reset() {
|
||||||
|
*x = RemoveXrayUserResponse{}
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[19]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*RemoveXrayUserResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_agent_proto_msgTypes[19]
|
||||||
|
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 RemoveXrayUserResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*RemoveXrayUserResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_agent_proto_rawDescGZIP(), []int{19}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *RemoveXrayUserResponse) 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 = "" +
|
||||||
@ -461,7 +1129,13 @@ const file_proto_agent_proto_rawDesc = "" +
|
|||||||
"\x16RegisterClientResponse\x12\x18\n" +
|
"\x16RegisterClientResponse\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\x05error\x12+\n" +
|
"\x05error\x18\x02 \x01(\tR\x05error\x12+\n" +
|
||||||
"\x06client\x18\x03 \x01(\v2\x13.agent.ClientConfigR\x06client\"\x18\n" +
|
"\x06client\x18\x03 \x01(\v2\x13.agent.ClientConfigR\x06client\"8\n" +
|
||||||
|
"\x17UnregisterClientRequest\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"public_key\x18\x01 \x01(\tR\tpublicKey\"J\n" +
|
||||||
|
"\x18UnregisterClientResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error\"\x18\n" +
|
||||||
"\x16GetServerStatusRequest\"\xd7\x01\n" +
|
"\x16GetServerStatusRequest\"\xd7\x01\n" +
|
||||||
"\x17GetServerStatusResponse\x12\x18\n" +
|
"\x17GetServerStatusResponse\x12\x18\n" +
|
||||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
@ -471,11 +1145,54 @@ const file_proto_agent_proto_rawDesc = "" +
|
|||||||
"public_key\x18\x04 \x01(\tR\tpublicKey\x12%\n" +
|
"public_key\x18\x04 \x01(\tR\tpublicKey\x12%\n" +
|
||||||
"\x0elistening_port\x18\x05 \x01(\tR\rlisteningPort\x12\x1f\n" +
|
"\x0elistening_port\x18\x05 \x01(\tR\rlisteningPort\x12\x1f\n" +
|
||||||
"\vpeers_count\x18\x06 \x01(\x05R\n" +
|
"\vpeers_count\x18\x06 \x01(\x05R\n" +
|
||||||
"peersCount2\x86\x02\n" +
|
"peersCount\"(\n" +
|
||||||
|
"\x10PingHostsRequest\x12\x14\n" +
|
||||||
|
"\x05hosts\x18\x01 \x03(\tR\x05hosts\"s\n" +
|
||||||
|
"\n" +
|
||||||
|
"PingResult\x12\x12\n" +
|
||||||
|
"\x04host\x18\x01 \x01(\tR\x04host\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"latency_ms\x18\x02 \x01(\x01R\tlatencyMs\x12\x1c\n" +
|
||||||
|
"\treachable\x18\x03 \x01(\bR\treachable\x12\x14\n" +
|
||||||
|
"\x05error\x18\x04 \x01(\tR\x05error\"p\n" +
|
||||||
|
"\x11PingHostsResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error\x12+\n" +
|
||||||
|
"\aresults\x18\x03 \x03(\v2\x11.agent.PingResultR\aresults\"\x16\n" +
|
||||||
|
"\x14GetXrayStatusRequest\"[\n" +
|
||||||
|
"\x15GetXrayStatusResponse\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\"\x19\n" +
|
||||||
|
"\x17GetXrayPublicKeyRequest\"\x89\x01\n" +
|
||||||
|
"\x18GetXrayPublicKeyResponse\x12\x1d\n" +
|
||||||
|
"\n" +
|
||||||
|
"public_key\x18\x01 \x01(\tR\tpublicKey\x12\x19\n" +
|
||||||
|
"\bshort_id\x18\x02 \x01(\tR\ashortId\x12\x1f\n" +
|
||||||
|
"\vserver_name\x18\x03 \x01(\tR\n" +
|
||||||
|
"serverName\x12\x12\n" +
|
||||||
|
"\x04port\x18\x04 \x01(\x05R\x04port\">\n" +
|
||||||
|
"\x12AddXrayUserRequest\x12\x12\n" +
|
||||||
|
"\x04uuid\x18\x01 \x01(\tR\x04uuid\x12\x14\n" +
|
||||||
|
"\x05email\x18\x02 \x01(\tR\x05email\"E\n" +
|
||||||
|
"\x13AddXrayUserResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error\"+\n" +
|
||||||
|
"\x15RemoveXrayUserRequest\x12\x12\n" +
|
||||||
|
"\x04uuid\x18\x01 \x01(\tR\x04uuid\"H\n" +
|
||||||
|
"\x16RemoveXrayUserResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error2\xd1\x05\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\x12P\n" +
|
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12S\n" +
|
||||||
"\x0fGetServerStatus\x12\x1d.agent.GetServerStatusRequest\x1a\x1e.agent.GetServerStatusResponseB\x13Z\x11l_vpn_proto/protob\x06proto3"
|
"\x10UnregisterClient\x12\x1e.agent.UnregisterClientRequest\x1a\x1f.agent.UnregisterClientResponse\x12P\n" +
|
||||||
|
"\x0fGetServerStatus\x12\x1d.agent.GetServerStatusRequest\x1a\x1e.agent.GetServerStatusResponse\x12>\n" +
|
||||||
|
"\tPingHosts\x12\x17.agent.PingHostsRequest\x1a\x18.agent.PingHostsResponse\x12J\n" +
|
||||||
|
"\rGetXrayStatus\x12\x1b.agent.GetXrayStatusRequest\x1a\x1c.agent.GetXrayStatusResponse\x12S\n" +
|
||||||
|
"\x10GetXrayPublicKey\x12\x1e.agent.GetXrayPublicKeyRequest\x1a\x1f.agent.GetXrayPublicKeyResponse\x12D\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"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_proto_agent_proto_rawDescOnce sync.Once
|
file_proto_agent_proto_rawDescOnce sync.Once
|
||||||
@ -489,30 +1206,56 @@ 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, 7)
|
var file_proto_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||||
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
|
||||||
(*GetClientConfigsResponse)(nil), // 2: agent.GetClientConfigsResponse
|
(*GetClientConfigsResponse)(nil), // 2: agent.GetClientConfigsResponse
|
||||||
(*RegisterClientRequest)(nil), // 3: agent.RegisterClientRequest
|
(*RegisterClientRequest)(nil), // 3: agent.RegisterClientRequest
|
||||||
(*RegisterClientResponse)(nil), // 4: agent.RegisterClientResponse
|
(*RegisterClientResponse)(nil), // 4: agent.RegisterClientResponse
|
||||||
(*GetServerStatusRequest)(nil), // 5: agent.GetServerStatusRequest
|
(*UnregisterClientRequest)(nil), // 5: agent.UnregisterClientRequest
|
||||||
(*GetServerStatusResponse)(nil), // 6: agent.GetServerStatusResponse
|
(*UnregisterClientResponse)(nil), // 6: agent.UnregisterClientResponse
|
||||||
|
(*GetServerStatusRequest)(nil), // 7: agent.GetServerStatusRequest
|
||||||
|
(*GetServerStatusResponse)(nil), // 8: agent.GetServerStatusResponse
|
||||||
|
(*PingHostsRequest)(nil), // 9: agent.PingHostsRequest
|
||||||
|
(*PingResult)(nil), // 10: agent.PingResult
|
||||||
|
(*PingHostsResponse)(nil), // 11: agent.PingHostsResponse
|
||||||
|
(*GetXrayStatusRequest)(nil), // 12: agent.GetXrayStatusRequest
|
||||||
|
(*GetXrayStatusResponse)(nil), // 13: agent.GetXrayStatusResponse
|
||||||
|
(*GetXrayPublicKeyRequest)(nil), // 14: agent.GetXrayPublicKeyRequest
|
||||||
|
(*GetXrayPublicKeyResponse)(nil), // 15: agent.GetXrayPublicKeyResponse
|
||||||
|
(*AddXrayUserRequest)(nil), // 16: agent.AddXrayUserRequest
|
||||||
|
(*AddXrayUserResponse)(nil), // 17: agent.AddXrayUserResponse
|
||||||
|
(*RemoveXrayUserRequest)(nil), // 18: agent.RemoveXrayUserRequest
|
||||||
|
(*RemoveXrayUserResponse)(nil), // 19: agent.RemoveXrayUserResponse
|
||||||
}
|
}
|
||||||
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
|
||||||
1, // 1: agent.RegisterClientResponse.client:type_name -> agent.ClientConfig
|
1, // 1: agent.RegisterClientResponse.client:type_name -> agent.ClientConfig
|
||||||
0, // 2: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest
|
10, // 2: agent.PingHostsResponse.results:type_name -> agent.PingResult
|
||||||
3, // 3: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest
|
0, // 3: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest
|
||||||
5, // 4: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest
|
3, // 4: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest
|
||||||
2, // 5: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
|
5, // 5: agent.WireGuardAgent.UnregisterClient:input_type -> agent.UnregisterClientRequest
|
||||||
4, // 6: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
|
7, // 6: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest
|
||||||
6, // 7: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
|
9, // 7: agent.WireGuardAgent.PingHosts:input_type -> agent.PingHostsRequest
|
||||||
5, // [5:8] is the sub-list for method output_type
|
12, // 8: agent.WireGuardAgent.GetXrayStatus:input_type -> agent.GetXrayStatusRequest
|
||||||
2, // [2:5] is the sub-list for method input_type
|
14, // 9: agent.WireGuardAgent.GetXrayPublicKey:input_type -> agent.GetXrayPublicKeyRequest
|
||||||
2, // [2:2] is the sub-list for extension type_name
|
16, // 10: agent.WireGuardAgent.AddXrayUser:input_type -> agent.AddXrayUserRequest
|
||||||
2, // [2:2] is the sub-list for extension extendee
|
18, // 11: agent.WireGuardAgent.RemoveXrayUser:input_type -> agent.RemoveXrayUserRequest
|
||||||
0, // [0:2] is the sub-list for field type_name
|
2, // 12: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
|
||||||
|
4, // 13: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
|
||||||
|
6, // 14: agent.WireGuardAgent.UnregisterClient:output_type -> agent.UnregisterClientResponse
|
||||||
|
8, // 15: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
|
||||||
|
11, // 16: agent.WireGuardAgent.PingHosts:output_type -> agent.PingHostsResponse
|
||||||
|
13, // 17: agent.WireGuardAgent.GetXrayStatus:output_type -> agent.GetXrayStatusResponse
|
||||||
|
15, // 18: agent.WireGuardAgent.GetXrayPublicKey:output_type -> agent.GetXrayPublicKeyResponse
|
||||||
|
17, // 19: agent.WireGuardAgent.AddXrayUser:output_type -> agent.AddXrayUserResponse
|
||||||
|
19, // 20: agent.WireGuardAgent.RemoveXrayUser:output_type -> agent.RemoveXrayUserResponse
|
||||||
|
12, // [12:21] is the sub-list for method output_type
|
||||||
|
3, // [3:12] 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 extendee
|
||||||
|
0, // [0:3] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_proto_agent_proto_init() }
|
func init() { file_proto_agent_proto_init() }
|
||||||
@ -526,7 +1269,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: 7,
|
NumMessages: 20,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@ -7,7 +7,15 @@ option go_package = "l_vpn_proto/proto";
|
|||||||
service WireGuardAgent {
|
service WireGuardAgent {
|
||||||
rpc GetClientConfigs(GetClientConfigsRequest) returns (GetClientConfigsResponse);
|
rpc GetClientConfigs(GetClientConfigsRequest) returns (GetClientConfigsResponse);
|
||||||
rpc RegisterClient(RegisterClientRequest) returns (RegisterClientResponse);
|
rpc RegisterClient(RegisterClientRequest) returns (RegisterClientResponse);
|
||||||
|
rpc UnregisterClient(UnregisterClientRequest) returns (UnregisterClientResponse);
|
||||||
rpc GetServerStatus(GetServerStatusRequest) returns (GetServerStatusResponse);
|
rpc GetServerStatus(GetServerStatusRequest) returns (GetServerStatusResponse);
|
||||||
|
rpc PingHosts(PingHostsRequest) returns (PingHostsResponse);
|
||||||
|
|
||||||
|
// Xray / VLESS+Reality management
|
||||||
|
rpc GetXrayStatus(GetXrayStatusRequest) returns (GetXrayStatusResponse);
|
||||||
|
rpc GetXrayPublicKey(GetXrayPublicKeyRequest) returns (GetXrayPublicKeyResponse);
|
||||||
|
rpc AddXrayUser(AddXrayUserRequest) returns (AddXrayUserResponse);
|
||||||
|
rpc RemoveXrayUser(RemoveXrayUserRequest) returns (RemoveXrayUserResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
message GetClientConfigsRequest {}
|
message GetClientConfigsRequest {}
|
||||||
@ -38,6 +46,15 @@ message RegisterClientResponse {
|
|||||||
ClientConfig client = 3;
|
ClientConfig client = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message UnregisterClientRequest {
|
||||||
|
string public_key = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message UnregisterClientResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|
||||||
message GetServerStatusRequest {}
|
message GetServerStatusRequest {}
|
||||||
|
|
||||||
message GetServerStatusResponse {
|
message GetServerStatusResponse {
|
||||||
@ -48,3 +65,54 @@ message GetServerStatusResponse {
|
|||||||
string listening_port = 5;
|
string listening_port = 5;
|
||||||
int32 peers_count = 6;
|
int32 peers_count = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message PingHostsRequest {
|
||||||
|
repeated string hosts = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PingResult {
|
||||||
|
string host = 1;
|
||||||
|
double latency_ms = 2; // -1 if unreachable
|
||||||
|
bool reachable = 3;
|
||||||
|
string error = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PingHostsResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
repeated PingResult results = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ── Xray messages ─────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
message GetXrayStatusRequest {}
|
||||||
|
message GetXrayStatusResponse {
|
||||||
|
bool running = 1;
|
||||||
|
int32 port = 2;
|
||||||
|
string error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetXrayPublicKeyRequest {}
|
||||||
|
message GetXrayPublicKeyResponse {
|
||||||
|
string public_key = 1;
|
||||||
|
string short_id = 2;
|
||||||
|
string server_name = 3;
|
||||||
|
int32 port = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message AddXrayUserRequest {
|
||||||
|
string uuid = 1;
|
||||||
|
string email = 2;
|
||||||
|
}
|
||||||
|
message AddXrayUserResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message RemoveXrayUserRequest {
|
||||||
|
string uuid = 1;
|
||||||
|
}
|
||||||
|
message RemoveXrayUserResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|||||||
@ -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.6.1
|
// - protoc-gen-go-grpc v1.6.1
|
||||||
// - protoc v3.21.12
|
// - protoc v7.34.0
|
||||||
// source: proto/agent.proto
|
// source: proto/agent.proto
|
||||||
|
|
||||||
package proto
|
package proto
|
||||||
@ -21,7 +21,13 @@ const _ = grpc.SupportPackageIsVersion9
|
|||||||
const (
|
const (
|
||||||
WireGuardAgent_GetClientConfigs_FullMethodName = "/agent.WireGuardAgent/GetClientConfigs"
|
WireGuardAgent_GetClientConfigs_FullMethodName = "/agent.WireGuardAgent/GetClientConfigs"
|
||||||
WireGuardAgent_RegisterClient_FullMethodName = "/agent.WireGuardAgent/RegisterClient"
|
WireGuardAgent_RegisterClient_FullMethodName = "/agent.WireGuardAgent/RegisterClient"
|
||||||
|
WireGuardAgent_UnregisterClient_FullMethodName = "/agent.WireGuardAgent/UnregisterClient"
|
||||||
WireGuardAgent_GetServerStatus_FullMethodName = "/agent.WireGuardAgent/GetServerStatus"
|
WireGuardAgent_GetServerStatus_FullMethodName = "/agent.WireGuardAgent/GetServerStatus"
|
||||||
|
WireGuardAgent_PingHosts_FullMethodName = "/agent.WireGuardAgent/PingHosts"
|
||||||
|
WireGuardAgent_GetXrayStatus_FullMethodName = "/agent.WireGuardAgent/GetXrayStatus"
|
||||||
|
WireGuardAgent_GetXrayPublicKey_FullMethodName = "/agent.WireGuardAgent/GetXrayPublicKey"
|
||||||
|
WireGuardAgent_AddXrayUser_FullMethodName = "/agent.WireGuardAgent/AddXrayUser"
|
||||||
|
WireGuardAgent_RemoveXrayUser_FullMethodName = "/agent.WireGuardAgent/RemoveXrayUser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// WireGuardAgentClient is the client API for WireGuardAgent service.
|
// WireGuardAgentClient is the client API for WireGuardAgent service.
|
||||||
@ -30,7 +36,14 @@ const (
|
|||||||
type WireGuardAgentClient interface {
|
type WireGuardAgentClient interface {
|
||||||
GetClientConfigs(ctx context.Context, in *GetClientConfigsRequest, opts ...grpc.CallOption) (*GetClientConfigsResponse, error)
|
GetClientConfigs(ctx context.Context, in *GetClientConfigsRequest, opts ...grpc.CallOption) (*GetClientConfigsResponse, error)
|
||||||
RegisterClient(ctx context.Context, in *RegisterClientRequest, opts ...grpc.CallOption) (*RegisterClientResponse, error)
|
RegisterClient(ctx context.Context, in *RegisterClientRequest, opts ...grpc.CallOption) (*RegisterClientResponse, error)
|
||||||
|
UnregisterClient(ctx context.Context, in *UnregisterClientRequest, opts ...grpc.CallOption) (*UnregisterClientResponse, error)
|
||||||
GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error)
|
GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error)
|
||||||
|
PingHosts(ctx context.Context, in *PingHostsRequest, opts ...grpc.CallOption) (*PingHostsResponse, error)
|
||||||
|
// Xray / VLESS+Reality management
|
||||||
|
GetXrayStatus(ctx context.Context, in *GetXrayStatusRequest, opts ...grpc.CallOption) (*GetXrayStatusResponse, error)
|
||||||
|
GetXrayPublicKey(ctx context.Context, in *GetXrayPublicKeyRequest, opts ...grpc.CallOption) (*GetXrayPublicKeyResponse, error)
|
||||||
|
AddXrayUser(ctx context.Context, in *AddXrayUserRequest, opts ...grpc.CallOption) (*AddXrayUserResponse, error)
|
||||||
|
RemoveXrayUser(ctx context.Context, in *RemoveXrayUserRequest, opts ...grpc.CallOption) (*RemoveXrayUserResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type wireGuardAgentClient struct {
|
type wireGuardAgentClient struct {
|
||||||
@ -61,6 +74,16 @@ func (c *wireGuardAgentClient) RegisterClient(ctx context.Context, in *RegisterC
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) UnregisterClient(ctx context.Context, in *UnregisterClientRequest, opts ...grpc.CallOption) (*UnregisterClientResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(UnregisterClientResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_UnregisterClient_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error) {
|
func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServerStatusRequest, opts ...grpc.CallOption) (*GetServerStatusResponse, error) {
|
||||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
out := new(GetServerStatusResponse)
|
out := new(GetServerStatusResponse)
|
||||||
@ -71,13 +94,70 @@ func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServe
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) PingHosts(ctx context.Context, in *PingHostsRequest, opts ...grpc.CallOption) (*PingHostsResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(PingHostsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_PingHosts_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) GetXrayStatus(ctx context.Context, in *GetXrayStatusRequest, opts ...grpc.CallOption) (*GetXrayStatusResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetXrayStatusResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_GetXrayStatus_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) GetXrayPublicKey(ctx context.Context, in *GetXrayPublicKeyRequest, opts ...grpc.CallOption) (*GetXrayPublicKeyResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(GetXrayPublicKeyResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_GetXrayPublicKey_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) AddXrayUser(ctx context.Context, in *AddXrayUserRequest, opts ...grpc.CallOption) (*AddXrayUserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(AddXrayUserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_AddXrayUser_FullMethodName, in, out, cOpts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *wireGuardAgentClient) RemoveXrayUser(ctx context.Context, in *RemoveXrayUserRequest, opts ...grpc.CallOption) (*RemoveXrayUserResponse, error) {
|
||||||
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||||
|
out := new(RemoveXrayUserResponse)
|
||||||
|
err := c.cc.Invoke(ctx, WireGuardAgent_RemoveXrayUser_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.
|
||||||
type WireGuardAgentServer interface {
|
type WireGuardAgentServer interface {
|
||||||
GetClientConfigs(context.Context, *GetClientConfigsRequest) (*GetClientConfigsResponse, error)
|
GetClientConfigs(context.Context, *GetClientConfigsRequest) (*GetClientConfigsResponse, error)
|
||||||
RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error)
|
RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error)
|
||||||
|
UnregisterClient(context.Context, *UnregisterClientRequest) (*UnregisterClientResponse, error)
|
||||||
GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error)
|
GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error)
|
||||||
|
PingHosts(context.Context, *PingHostsRequest) (*PingHostsResponse, error)
|
||||||
|
// Xray / VLESS+Reality management
|
||||||
|
GetXrayStatus(context.Context, *GetXrayStatusRequest) (*GetXrayStatusResponse, error)
|
||||||
|
GetXrayPublicKey(context.Context, *GetXrayPublicKeyRequest) (*GetXrayPublicKeyResponse, error)
|
||||||
|
AddXrayUser(context.Context, *AddXrayUserRequest) (*AddXrayUserResponse, error)
|
||||||
|
RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error)
|
||||||
mustEmbedUnimplementedWireGuardAgentServer()
|
mustEmbedUnimplementedWireGuardAgentServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,9 +174,27 @@ func (UnimplementedWireGuardAgentServer) GetClientConfigs(context.Context, *GetC
|
|||||||
func (UnimplementedWireGuardAgentServer) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) {
|
func (UnimplementedWireGuardAgentServer) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method RegisterClient not implemented")
|
return nil, status.Error(codes.Unimplemented, "method RegisterClient not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) UnregisterClient(context.Context, *UnregisterClientRequest) (*UnregisterClientResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method UnregisterClient not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedWireGuardAgentServer) GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error) {
|
func (UnimplementedWireGuardAgentServer) GetServerStatus(context.Context, *GetServerStatusRequest) (*GetServerStatusResponse, error) {
|
||||||
return nil, status.Error(codes.Unimplemented, "method GetServerStatus not implemented")
|
return nil, status.Error(codes.Unimplemented, "method GetServerStatus not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) PingHosts(context.Context, *PingHostsRequest) (*PingHostsResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method PingHosts not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) GetXrayStatus(context.Context, *GetXrayStatusRequest) (*GetXrayStatusResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetXrayStatus not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) GetXrayPublicKey(context.Context, *GetXrayPublicKeyRequest) (*GetXrayPublicKeyResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method GetXrayPublicKey not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) AddXrayUser(context.Context, *AddXrayUserRequest) (*AddXrayUserResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method AddXrayUser not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedWireGuardAgentServer) RemoveXrayUser(context.Context, *RemoveXrayUserRequest) (*RemoveXrayUserResponse, error) {
|
||||||
|
return nil, status.Error(codes.Unimplemented, "method RemoveXrayUser not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedWireGuardAgentServer) mustEmbedUnimplementedWireGuardAgentServer() {}
|
func (UnimplementedWireGuardAgentServer) mustEmbedUnimplementedWireGuardAgentServer() {}
|
||||||
func (UnimplementedWireGuardAgentServer) testEmbeddedByValue() {}
|
func (UnimplementedWireGuardAgentServer) testEmbeddedByValue() {}
|
||||||
|
|
||||||
@ -154,6 +252,24 @@ func _WireGuardAgent_RegisterClient_Handler(srv interface{}, ctx context.Context
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_UnregisterClient_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(UnregisterClientRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).UnregisterClient(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_UnregisterClient_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).UnregisterClient(ctx, req.(*UnregisterClientRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(GetServerStatusRequest)
|
in := new(GetServerStatusRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -172,6 +288,96 @@ func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_PingHosts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(PingHostsRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).PingHosts(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_PingHosts_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).PingHosts(ctx, req.(*PingHostsRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_GetXrayStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetXrayStatusRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).GetXrayStatus(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_GetXrayStatus_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).GetXrayStatus(ctx, req.(*GetXrayStatusRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_GetXrayPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetXrayPublicKeyRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).GetXrayPublicKey(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_GetXrayPublicKey_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).GetXrayPublicKey(ctx, req.(*GetXrayPublicKeyRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_AddXrayUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(AddXrayUserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).AddXrayUser(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_AddXrayUser_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).AddXrayUser(ctx, req.(*AddXrayUserRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _WireGuardAgent_RemoveXrayUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(RemoveXrayUserRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(WireGuardAgentServer).RemoveXrayUser(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: WireGuardAgent_RemoveXrayUser_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(WireGuardAgentServer).RemoveXrayUser(ctx, req.(*RemoveXrayUserRequest))
|
||||||
|
}
|
||||||
|
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)
|
||||||
@ -187,10 +393,34 @@ var WireGuardAgent_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "RegisterClient",
|
MethodName: "RegisterClient",
|
||||||
Handler: _WireGuardAgent_RegisterClient_Handler,
|
Handler: _WireGuardAgent_RegisterClient_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UnregisterClient",
|
||||||
|
Handler: _WireGuardAgent_UnregisterClient_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "GetServerStatus",
|
MethodName: "GetServerStatus",
|
||||||
Handler: _WireGuardAgent_GetServerStatus_Handler,
|
Handler: _WireGuardAgent_GetServerStatus_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "PingHosts",
|
||||||
|
Handler: _WireGuardAgent_PingHosts_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetXrayStatus",
|
||||||
|
Handler: _WireGuardAgent_GetXrayStatus_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetXrayPublicKey",
|
||||||
|
Handler: _WireGuardAgent_GetXrayPublicKey_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "AddXrayUser",
|
||||||
|
Handler: _WireGuardAgent_AddXrayUser_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "RemoveXrayUser",
|
||||||
|
Handler: _WireGuardAgent_RemoveXrayUser_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "proto/agent.proto",
|
Metadata: "proto/agent.proto",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user