Compare commits
No commits in common. "e390fbb72e9cd9877937f528dddc1b7215ffd5fc" and "ad2a795de74bfdac20d23f9cad4960d42c851c9e" have entirely different histories.
e390fbb72e
...
ad2a795de7
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.11
|
||||
// protoc v7.34.0
|
||||
// protoc v3.21.12
|
||||
// source: proto/agent.proto
|
||||
|
||||
package proto
|
||||
@ -313,102 +313,6 @@ func (x *RegisterClientResponse) GetClient() *ClientConfig {
|
||||
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 {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
@ -417,7 +321,7 @@ type GetServerStatusRequest struct {
|
||||
|
||||
func (x *GetServerStatusRequest) Reset() {
|
||||
*x = GetServerStatusRequest{}
|
||||
mi := &file_proto_agent_proto_msgTypes[7]
|
||||
mi := &file_proto_agent_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -429,7 +333,7 @@ func (x *GetServerStatusRequest) String() string {
|
||||
func (*GetServerStatusRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_agent_proto_msgTypes[7]
|
||||
mi := &file_proto_agent_proto_msgTypes[5]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -442,7 +346,7 @@ func (x *GetServerStatusRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetServerStatusRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetServerStatusRequest) Descriptor() ([]byte, []int) {
|
||||
return file_proto_agent_proto_rawDescGZIP(), []int{7}
|
||||
return file_proto_agent_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
type GetServerStatusResponse struct {
|
||||
@ -459,7 +363,7 @@ type GetServerStatusResponse struct {
|
||||
|
||||
func (x *GetServerStatusResponse) Reset() {
|
||||
*x = GetServerStatusResponse{}
|
||||
mi := &file_proto_agent_proto_msgTypes[8]
|
||||
mi := &file_proto_agent_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@ -471,7 +375,7 @@ func (x *GetServerStatusResponse) String() string {
|
||||
func (*GetServerStatusResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_agent_proto_msgTypes[8]
|
||||
mi := &file_proto_agent_proto_msgTypes[6]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@ -484,7 +388,7 @@ func (x *GetServerStatusResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use GetServerStatusResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetServerStatusResponse) Descriptor() ([]byte, []int) {
|
||||
return file_proto_agent_proto_rawDescGZIP(), []int{8}
|
||||
return file_proto_agent_proto_rawDescGZIP(), []int{6}
|
||||
}
|
||||
|
||||
func (x *GetServerStatusResponse) GetSuccess() bool {
|
||||
@ -529,578 +433,6 @@ func (x *GetServerStatusResponse) GetPeersCount() int32 {
|
||||
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
|
||||
|
||||
const file_proto_agent_proto_rawDesc = "" +
|
||||
@ -1129,13 +461,7 @@ const file_proto_agent_proto_rawDesc = "" +
|
||||
"\x16RegisterClientResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||
"\x05error\x18\x02 \x01(\tR\x05error\x12+\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" +
|
||||
"\x06client\x18\x03 \x01(\v2\x13.agent.ClientConfigR\x06client\"\x18\n" +
|
||||
"\x16GetServerStatusRequest\"\xd7\x01\n" +
|
||||
"\x17GetServerStatusResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||
@ -1145,54 +471,11 @@ const file_proto_agent_proto_rawDesc = "" +
|
||||
"public_key\x18\x04 \x01(\tR\tpublicKey\x12%\n" +
|
||||
"\x0elistening_port\x18\x05 \x01(\tR\rlisteningPort\x12\x1f\n" +
|
||||
"\vpeers_count\x18\x06 \x01(\x05R\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" +
|
||||
"peersCount2\x86\x02\n" +
|
||||
"\x0eWireGuardAgent\x12S\n" +
|
||||
"\x10GetClientConfigs\x12\x1e.agent.GetClientConfigsRequest\x1a\x1f.agent.GetClientConfigsResponse\x12M\n" +
|
||||
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12S\n" +
|
||||
"\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"
|
||||
"\x0eRegisterClient\x12\x1c.agent.RegisterClientRequest\x1a\x1d.agent.RegisterClientResponse\x12P\n" +
|
||||
"\x0fGetServerStatus\x12\x1d.agent.GetServerStatusRequest\x1a\x1e.agent.GetServerStatusResponseB\x13Z\x11l_vpn_proto/protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_proto_agent_proto_rawDescOnce sync.Once
|
||||
@ -1206,56 +489,30 @@ func file_proto_agent_proto_rawDescGZIP() []byte {
|
||||
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, 7)
|
||||
var file_proto_agent_proto_goTypes = []any{
|
||||
(*GetClientConfigsRequest)(nil), // 0: agent.GetClientConfigsRequest
|
||||
(*ClientConfig)(nil), // 1: agent.ClientConfig
|
||||
(*GetClientConfigsResponse)(nil), // 2: agent.GetClientConfigsResponse
|
||||
(*RegisterClientRequest)(nil), // 3: agent.RegisterClientRequest
|
||||
(*RegisterClientResponse)(nil), // 4: agent.RegisterClientResponse
|
||||
(*UnregisterClientRequest)(nil), // 5: agent.UnregisterClientRequest
|
||||
(*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
|
||||
(*GetServerStatusRequest)(nil), // 5: agent.GetServerStatusRequest
|
||||
(*GetServerStatusResponse)(nil), // 6: agent.GetServerStatusResponse
|
||||
}
|
||||
var file_proto_agent_proto_depIdxs = []int32{
|
||||
1, // 0: agent.GetClientConfigsResponse.clients:type_name -> agent.ClientConfig
|
||||
1, // 1: agent.RegisterClientResponse.client:type_name -> agent.ClientConfig
|
||||
10, // 2: agent.PingHostsResponse.results:type_name -> agent.PingResult
|
||||
0, // 3: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest
|
||||
3, // 4: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest
|
||||
5, // 5: agent.WireGuardAgent.UnregisterClient:input_type -> agent.UnregisterClientRequest
|
||||
7, // 6: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest
|
||||
9, // 7: agent.WireGuardAgent.PingHosts:input_type -> agent.PingHostsRequest
|
||||
12, // 8: agent.WireGuardAgent.GetXrayStatus:input_type -> agent.GetXrayStatusRequest
|
||||
14, // 9: agent.WireGuardAgent.GetXrayPublicKey:input_type -> agent.GetXrayPublicKeyRequest
|
||||
16, // 10: agent.WireGuardAgent.AddXrayUser:input_type -> agent.AddXrayUserRequest
|
||||
18, // 11: agent.WireGuardAgent.RemoveXrayUser:input_type -> agent.RemoveXrayUserRequest
|
||||
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
|
||||
0, // 2: agent.WireGuardAgent.GetClientConfigs:input_type -> agent.GetClientConfigsRequest
|
||||
3, // 3: agent.WireGuardAgent.RegisterClient:input_type -> agent.RegisterClientRequest
|
||||
5, // 4: agent.WireGuardAgent.GetServerStatus:input_type -> agent.GetServerStatusRequest
|
||||
2, // 5: agent.WireGuardAgent.GetClientConfigs:output_type -> agent.GetClientConfigsResponse
|
||||
4, // 6: agent.WireGuardAgent.RegisterClient:output_type -> agent.RegisterClientResponse
|
||||
6, // 7: agent.WireGuardAgent.GetServerStatus:output_type -> agent.GetServerStatusResponse
|
||||
5, // [5:8] is the sub-list for method output_type
|
||||
2, // [2:5] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_agent_proto_init() }
|
||||
@ -1269,7 +526,7 @@ func file_proto_agent_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_agent_proto_rawDesc), len(file_proto_agent_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 20,
|
||||
NumMessages: 7,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
@ -7,15 +7,7 @@ option go_package = "l_vpn_proto/proto";
|
||||
service WireGuardAgent {
|
||||
rpc GetClientConfigs(GetClientConfigsRequest) returns (GetClientConfigsResponse);
|
||||
rpc RegisterClient(RegisterClientRequest) returns (RegisterClientResponse);
|
||||
rpc UnregisterClient(UnregisterClientRequest) returns (UnregisterClientResponse);
|
||||
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 {}
|
||||
@ -46,15 +38,6 @@ message RegisterClientResponse {
|
||||
ClientConfig client = 3;
|
||||
}
|
||||
|
||||
message UnregisterClientRequest {
|
||||
string public_key = 1;
|
||||
}
|
||||
|
||||
message UnregisterClientResponse {
|
||||
bool success = 1;
|
||||
string error = 2;
|
||||
}
|
||||
|
||||
message GetServerStatusRequest {}
|
||||
|
||||
message GetServerStatusResponse {
|
||||
@ -65,54 +48,3 @@ message GetServerStatusResponse {
|
||||
string listening_port = 5;
|
||||
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.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc v7.34.0
|
||||
// - protoc v3.21.12
|
||||
// source: proto/agent.proto
|
||||
|
||||
package proto
|
||||
@ -21,13 +21,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
const (
|
||||
WireGuardAgent_GetClientConfigs_FullMethodName = "/agent.WireGuardAgent/GetClientConfigs"
|
||||
WireGuardAgent_RegisterClient_FullMethodName = "/agent.WireGuardAgent/RegisterClient"
|
||||
WireGuardAgent_UnregisterClient_FullMethodName = "/agent.WireGuardAgent/UnregisterClient"
|
||||
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.
|
||||
@ -36,14 +30,7 @@ const (
|
||||
type WireGuardAgentClient interface {
|
||||
GetClientConfigs(ctx context.Context, in *GetClientConfigsRequest, opts ...grpc.CallOption) (*GetClientConfigsResponse, 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)
|
||||
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 {
|
||||
@ -74,16 +61,6 @@ func (c *wireGuardAgentClient) RegisterClient(ctx context.Context, in *RegisterC
|
||||
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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetServerStatusResponse)
|
||||
@ -94,70 +71,13 @@ func (c *wireGuardAgentClient) GetServerStatus(ctx context.Context, in *GetServe
|
||||
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.
|
||||
// All implementations must embed UnimplementedWireGuardAgentServer
|
||||
// for forward compatibility.
|
||||
type WireGuardAgentServer interface {
|
||||
GetClientConfigs(context.Context, *GetClientConfigsRequest) (*GetClientConfigsResponse, error)
|
||||
RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error)
|
||||
UnregisterClient(context.Context, *UnregisterClientRequest) (*UnregisterClientResponse, 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()
|
||||
}
|
||||
|
||||
@ -174,27 +94,9 @@ func (UnimplementedWireGuardAgentServer) GetClientConfigs(context.Context, *GetC
|
||||
func (UnimplementedWireGuardAgentServer) RegisterClient(context.Context, *RegisterClientRequest) (*RegisterClientResponse, error) {
|
||||
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) {
|
||||
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) testEmbeddedByValue() {}
|
||||
|
||||
@ -252,24 +154,6 @@ func _WireGuardAgent_RegisterClient_Handler(srv interface{}, ctx context.Context
|
||||
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) {
|
||||
in := new(GetServerStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -288,96 +172,6 @@ func _WireGuardAgent_GetServerStatus_Handler(srv interface{}, ctx context.Contex
|
||||
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.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -393,34 +187,10 @@ var WireGuardAgent_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "RegisterClient",
|
||||
Handler: _WireGuardAgent_RegisterClient_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UnregisterClient",
|
||||
Handler: _WireGuardAgent_UnregisterClient_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetServerStatus",
|
||||
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{},
|
||||
Metadata: "proto/agent.proto",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user