Documentation
¶
Index ¶
- Constants
- Variables
- func EnsureBase64Password(password string, method string) string
- func GrpcCodeToHTTP(code codes.Code) int
- func InterceptNotFound(err error) error
- func ReadProtoBody(body io.ReadCloser, message proto.Message) error
- func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)
- func SendProtoResponse(w http.ResponseWriter, data proto.Message)
- type Backend
- func (*Backend) Descriptor() ([]byte, []int)deprecated
- func (x *Backend) GetConfig() string
- func (x *Backend) GetExcludeInbounds() []string
- func (x *Backend) GetKeepAlive() uint64
- func (x *Backend) GetType() BackendType
- func (x *Backend) GetUsers() []*User
- func (*Backend) ProtoMessage()
- func (x *Backend) ProtoReflect() protoreflect.Message
- func (x *Backend) Reset()
- func (x *Backend) String() string
- type BackendStatsResponse
- func (*BackendStatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BackendStatsResponse) GetAlloc() uint64
- func (x *BackendStatsResponse) GetFrees() uint64
- func (x *BackendStatsResponse) GetLiveObjects() uint64
- func (x *BackendStatsResponse) GetMallocs() uint64
- func (x *BackendStatsResponse) GetNumGc() uint32
- func (x *BackendStatsResponse) GetNumGoroutine() uint32
- func (x *BackendStatsResponse) GetPauseTotalNs() uint64
- func (x *BackendStatsResponse) GetSys() uint64
- func (x *BackendStatsResponse) GetTotalAlloc() uint64
- func (x *BackendStatsResponse) GetUptime() uint32
- func (*BackendStatsResponse) ProtoMessage()
- func (x *BackendStatsResponse) ProtoReflect() protoreflect.Message
- func (x *BackendStatsResponse) Reset()
- func (x *BackendStatsResponse) String() string
- type BackendType
- func (BackendType) Descriptor() protoreflect.EnumDescriptor
- func (x BackendType) Enum() *BackendType
- func (BackendType) EnumDescriptor() ([]byte, []int)deprecated
- func (x BackendType) Number() protoreflect.EnumNumber
- func (x BackendType) String() string
- func (BackendType) Type() protoreflect.EnumType
- type BaseInfoResponse
- func (*BaseInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BaseInfoResponse) GetCoreVersion() string
- func (x *BaseInfoResponse) GetNodeVersion() string
- func (x *BaseInfoResponse) GetStarted() bool
- func (*BaseInfoResponse) ProtoMessage()
- func (x *BaseInfoResponse) ProtoReflect() protoreflect.Message
- func (x *BaseInfoResponse) Reset()
- func (x *BaseInfoResponse) String() string
- type Empty
- type Log
- type NodeServiceClient
- type NodeServiceServer
- type NodeService_GetLogsClient
- type NodeService_GetLogsServer
- type NodeService_SyncUserClient
- type NodeService_SyncUserServer
- type NodeService_SyncUsersChunkedClient
- type NodeService_SyncUsersChunkedServer
- type OnlineStatResponse
- func (*OnlineStatResponse) Descriptor() ([]byte, []int)deprecated
- func (x *OnlineStatResponse) GetName() string
- func (x *OnlineStatResponse) GetValue() int64
- func (*OnlineStatResponse) ProtoMessage()
- func (x *OnlineStatResponse) ProtoReflect() protoreflect.Message
- func (x *OnlineStatResponse) Reset()
- func (x *OnlineStatResponse) String() string
- type Proxy
- func (*Proxy) Descriptor() ([]byte, []int)deprecated
- func (x *Proxy) GetShadowsocks() *Shadowsocks
- func (x *Proxy) GetTrojan() *Trojan
- func (x *Proxy) GetVless() *Vless
- func (x *Proxy) GetVmess() *Vmess
- func (*Proxy) ProtoMessage()
- func (x *Proxy) ProtoReflect() protoreflect.Message
- func (x *Proxy) Reset()
- func (x *Proxy) String() string
- type Shadowsocks
- func (*Shadowsocks) Descriptor() ([]byte, []int)deprecated
- func (x *Shadowsocks) GetMethod() string
- func (x *Shadowsocks) GetPassword() string
- func (*Shadowsocks) ProtoMessage()
- func (x *Shadowsocks) ProtoReflect() protoreflect.Message
- func (x *Shadowsocks) Reset()
- func (x *Shadowsocks) String() string
- type Stat
- func (*Stat) Descriptor() ([]byte, []int)deprecated
- func (x *Stat) GetLink() string
- func (x *Stat) GetName() string
- func (x *Stat) GetType() string
- func (x *Stat) GetValue() int64
- func (*Stat) ProtoMessage()
- func (x *Stat) ProtoReflect() protoreflect.Message
- func (x *Stat) Reset()
- func (x *Stat) String() string
- type StatRequest
- func (*StatRequest) Descriptor() ([]byte, []int)deprecated
- func (x *StatRequest) GetName() string
- func (x *StatRequest) GetReset_() bool
- func (x *StatRequest) GetType() StatType
- func (*StatRequest) ProtoMessage()
- func (x *StatRequest) ProtoReflect() protoreflect.Message
- func (x *StatRequest) Reset()
- func (x *StatRequest) String() string
- type StatResponse
- type StatType
- type StatsOnlineIpListResponse
- func (*StatsOnlineIpListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatsOnlineIpListResponse) GetIps() map[string]int64
- func (x *StatsOnlineIpListResponse) GetName() string
- func (*StatsOnlineIpListResponse) ProtoMessage()
- func (x *StatsOnlineIpListResponse) ProtoReflect() protoreflect.Message
- func (x *StatsOnlineIpListResponse) Reset()
- func (x *StatsOnlineIpListResponse) String() string
- type SystemStatsResponse
- func (*SystemStatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SystemStatsResponse) GetCpuCores() uint64
- func (x *SystemStatsResponse) GetCpuUsage() float64
- func (x *SystemStatsResponse) GetIncomingBandwidthSpeed() uint64
- func (x *SystemStatsResponse) GetMemTotal() uint64
- func (x *SystemStatsResponse) GetMemUsed() uint64
- func (x *SystemStatsResponse) GetOutgoingBandwidthSpeed() uint64
- func (*SystemStatsResponse) ProtoMessage()
- func (x *SystemStatsResponse) ProtoReflect() protoreflect.Message
- func (x *SystemStatsResponse) Reset()
- func (x *SystemStatsResponse) String() string
- type Trojan
- type UnimplementedNodeServiceServer
- func (UnimplementedNodeServiceServer) GetBackendStats(context.Context, *Empty) (*BackendStatsResponse, error)
- func (UnimplementedNodeServiceServer) GetBaseInfo(context.Context, *Empty) (*BaseInfoResponse, error)
- func (UnimplementedNodeServiceServer) GetLogs(*Empty, grpc.ServerStreamingServer[Log]) error
- func (UnimplementedNodeServiceServer) GetStats(context.Context, *StatRequest) (*StatResponse, error)
- func (UnimplementedNodeServiceServer) GetSystemStats(context.Context, *Empty) (*SystemStatsResponse, error)
- func (UnimplementedNodeServiceServer) GetUserOnlineIpListStats(context.Context, *StatRequest) (*StatsOnlineIpListResponse, error)
- func (UnimplementedNodeServiceServer) GetUserOnlineStats(context.Context, *StatRequest) (*OnlineStatResponse, error)
- func (UnimplementedNodeServiceServer) Start(context.Context, *Backend) (*BaseInfoResponse, error)
- func (UnimplementedNodeServiceServer) Stop(context.Context, *Empty) (*Empty, error)
- func (UnimplementedNodeServiceServer) SyncUser(grpc.ClientStreamingServer[User, Empty]) error
- func (UnimplementedNodeServiceServer) SyncUsers(context.Context, *Users) (*Empty, error)
- func (UnimplementedNodeServiceServer) SyncUsersChunked(grpc.ClientStreamingServer[UsersChunk, Empty]) error
- type UnsafeNodeServiceServer
- type User
- type Users
- type UsersChunk
- func (*UsersChunk) Descriptor() ([]byte, []int)deprecated
- func (x *UsersChunk) GetIndex() uint64
- func (x *UsersChunk) GetLast() bool
- func (x *UsersChunk) GetUsers() []*User
- func (*UsersChunk) ProtoMessage()
- func (x *UsersChunk) ProtoReflect() protoreflect.Message
- func (x *UsersChunk) Reset()
- func (x *UsersChunk) String() string
- type Vless
- type Vmess
Constants ¶
const ( NodeService_Start_FullMethodName = "/service.NodeService/Start" NodeService_Stop_FullMethodName = "/service.NodeService/Stop" NodeService_GetBaseInfo_FullMethodName = "/service.NodeService/GetBaseInfo" NodeService_GetLogs_FullMethodName = "/service.NodeService/GetLogs" NodeService_GetSystemStats_FullMethodName = "/service.NodeService/GetSystemStats" NodeService_GetBackendStats_FullMethodName = "/service.NodeService/GetBackendStats" NodeService_GetStats_FullMethodName = "/service.NodeService/GetStats" NodeService_GetUserOnlineStats_FullMethodName = "/service.NodeService/GetUserOnlineStats" NodeService_GetUserOnlineIpListStats_FullMethodName = "/service.NodeService/GetUserOnlineIpListStats" NodeService_SyncUser_FullMethodName = "/service.NodeService/SyncUser" NodeService_SyncUsers_FullMethodName = "/service.NodeService/SyncUsers" NodeService_SyncUsersChunked_FullMethodName = "/service.NodeService/SyncUsersChunked" )
Variables ¶
var ( BackendType_name = map[int32]string{ 0: "XRAY", } BackendType_value = map[string]int32{ "XRAY": 0, } )
Enum value maps for BackendType.
var ( StatType_name = map[int32]string{ 0: "Outbounds", 1: "Outbound", 2: "Inbounds", 3: "Inbound", 4: "UsersStat", 5: "UserStat", } StatType_value = map[string]int32{ "Outbounds": 0, "Outbound": 1, "Inbounds": 2, "Inbound": 3, "UsersStat": 4, "UserStat": 5, } )
Enum value maps for StatType.
var File_common_service_proto protoreflect.FileDescriptor
var NodeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "service.NodeService", HandlerType: (*NodeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Start", Handler: _NodeService_Start_Handler, }, { MethodName: "Stop", Handler: _NodeService_Stop_Handler, }, { MethodName: "GetBaseInfo", Handler: _NodeService_GetBaseInfo_Handler, }, { MethodName: "GetSystemStats", Handler: _NodeService_GetSystemStats_Handler, }, { MethodName: "GetBackendStats", Handler: _NodeService_GetBackendStats_Handler, }, { MethodName: "GetStats", Handler: _NodeService_GetStats_Handler, }, { MethodName: "GetUserOnlineStats", Handler: _NodeService_GetUserOnlineStats_Handler, }, { MethodName: "GetUserOnlineIpListStats", Handler: _NodeService_GetUserOnlineIpListStats_Handler, }, { MethodName: "SyncUsers", Handler: _NodeService_SyncUsers_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetLogs", Handler: _NodeService_GetLogs_Handler, ServerStreams: true, }, { StreamName: "SyncUser", Handler: _NodeService_SyncUser_Handler, ClientStreams: true, }, { StreamName: "SyncUsersChunked", Handler: _NodeService_SyncUsersChunked_Handler, ClientStreams: true, }, }, Metadata: "common/service.proto", }
NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func EnsureBase64Password ¶
func GrpcCodeToHTTP ¶
GrpcCodeToHTTP maps gRPC codes to HTTP status codes.
func InterceptNotFound ¶
InterceptNotFound checks for errors ending with "not found." and wraps them as gRPC NotFound.
func ReadProtoBody ¶
func ReadProtoBody(body io.ReadCloser, message proto.Message) error
func RegisterNodeServiceServer ¶
func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer)
func SendProtoResponse ¶
func SendProtoResponse(w http.ResponseWriter, data proto.Message)
Types ¶
type Backend ¶
type Backend struct {
Type BackendType `protobuf:"varint,1,opt,name=type,proto3,enum=service.BackendType" json:"type,omitempty"`
Config string `protobuf:"bytes,2,opt,name=config,proto3" json:"config,omitempty"`
Users []*User `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
KeepAlive uint64 `protobuf:"varint,4,opt,name=keep_alive,json=keepAlive,proto3" json:"keep_alive,omitempty"`
ExcludeInbounds []string `protobuf:"bytes,5,rep,name=exclude_inbounds,json=excludeInbounds,proto3" json:"exclude_inbounds,omitempty"`
// contains filtered or unexported fields
}
func (*Backend) Descriptor
deprecated
func (*Backend) GetExcludeInbounds ¶
func (*Backend) GetKeepAlive ¶
func (*Backend) GetType ¶
func (x *Backend) GetType() BackendType
func (*Backend) ProtoMessage ¶
func (*Backend) ProtoMessage()
func (*Backend) ProtoReflect ¶
func (x *Backend) ProtoReflect() protoreflect.Message
type BackendStatsResponse ¶
type BackendStatsResponse struct {
NumGoroutine uint32 `protobuf:"varint,1,opt,name=num_goroutine,json=numGoroutine,proto3" json:"num_goroutine,omitempty"`
NumGc uint32 `protobuf:"varint,2,opt,name=num_gc,json=numGc,proto3" json:"num_gc,omitempty"`
Alloc uint64 `protobuf:"varint,3,opt,name=alloc,proto3" json:"alloc,omitempty"`
TotalAlloc uint64 `protobuf:"varint,4,opt,name=total_alloc,json=totalAlloc,proto3" json:"total_alloc,omitempty"`
Sys uint64 `protobuf:"varint,5,opt,name=sys,proto3" json:"sys,omitempty"`
Mallocs uint64 `protobuf:"varint,6,opt,name=mallocs,proto3" json:"mallocs,omitempty"`
Frees uint64 `protobuf:"varint,7,opt,name=frees,proto3" json:"frees,omitempty"`
LiveObjects uint64 `protobuf:"varint,8,opt,name=live_objects,json=liveObjects,proto3" json:"live_objects,omitempty"`
PauseTotalNs uint64 `protobuf:"varint,9,opt,name=pause_total_ns,json=pauseTotalNs,proto3" json:"pause_total_ns,omitempty"`
Uptime uint32 `protobuf:"varint,10,opt,name=uptime,proto3" json:"uptime,omitempty"`
// contains filtered or unexported fields
}
func (*BackendStatsResponse) Descriptor
deprecated
func (*BackendStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use BackendStatsResponse.ProtoReflect.Descriptor instead.
func (*BackendStatsResponse) GetAlloc ¶
func (x *BackendStatsResponse) GetAlloc() uint64
func (*BackendStatsResponse) GetFrees ¶
func (x *BackendStatsResponse) GetFrees() uint64
func (*BackendStatsResponse) GetLiveObjects ¶
func (x *BackendStatsResponse) GetLiveObjects() uint64
func (*BackendStatsResponse) GetMallocs ¶
func (x *BackendStatsResponse) GetMallocs() uint64
func (*BackendStatsResponse) GetNumGc ¶
func (x *BackendStatsResponse) GetNumGc() uint32
func (*BackendStatsResponse) GetNumGoroutine ¶
func (x *BackendStatsResponse) GetNumGoroutine() uint32
func (*BackendStatsResponse) GetPauseTotalNs ¶
func (x *BackendStatsResponse) GetPauseTotalNs() uint64
func (*BackendStatsResponse) GetSys ¶
func (x *BackendStatsResponse) GetSys() uint64
func (*BackendStatsResponse) GetTotalAlloc ¶
func (x *BackendStatsResponse) GetTotalAlloc() uint64
func (*BackendStatsResponse) GetUptime ¶
func (x *BackendStatsResponse) GetUptime() uint32
func (*BackendStatsResponse) ProtoMessage ¶
func (*BackendStatsResponse) ProtoMessage()
func (*BackendStatsResponse) ProtoReflect ¶
func (x *BackendStatsResponse) ProtoReflect() protoreflect.Message
func (*BackendStatsResponse) Reset ¶
func (x *BackendStatsResponse) Reset()
func (*BackendStatsResponse) String ¶
func (x *BackendStatsResponse) String() string
type BackendType ¶
type BackendType int32
const (
BackendType_XRAY BackendType = 0
)
func (BackendType) Descriptor ¶
func (BackendType) Descriptor() protoreflect.EnumDescriptor
func (BackendType) Enum ¶
func (x BackendType) Enum() *BackendType
func (BackendType) EnumDescriptor
deprecated
func (BackendType) EnumDescriptor() ([]byte, []int)
Deprecated: Use BackendType.Descriptor instead.
func (BackendType) Number ¶
func (x BackendType) Number() protoreflect.EnumNumber
func (BackendType) String ¶
func (x BackendType) String() string
func (BackendType) Type ¶
func (BackendType) Type() protoreflect.EnumType
type BaseInfoResponse ¶
type BaseInfoResponse struct {
Started bool `protobuf:"varint,1,opt,name=started,proto3" json:"started,omitempty"`
CoreVersion string `protobuf:"bytes,2,opt,name=core_version,json=coreVersion,proto3" json:"core_version,omitempty"`
NodeVersion string `protobuf:"bytes,3,opt,name=node_version,json=nodeVersion,proto3" json:"node_version,omitempty"`
// contains filtered or unexported fields
}
Base info response message
func (*BaseInfoResponse) Descriptor
deprecated
func (*BaseInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use BaseInfoResponse.ProtoReflect.Descriptor instead.
func (*BaseInfoResponse) GetCoreVersion ¶
func (x *BaseInfoResponse) GetCoreVersion() string
func (*BaseInfoResponse) GetNodeVersion ¶
func (x *BaseInfoResponse) GetNodeVersion() string
func (*BaseInfoResponse) GetStarted ¶
func (x *BaseInfoResponse) GetStarted() bool
func (*BaseInfoResponse) ProtoMessage ¶
func (*BaseInfoResponse) ProtoMessage()
func (*BaseInfoResponse) ProtoReflect ¶
func (x *BaseInfoResponse) ProtoReflect() protoreflect.Message
func (*BaseInfoResponse) Reset ¶
func (x *BaseInfoResponse) Reset()
func (*BaseInfoResponse) String ¶
func (x *BaseInfoResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Log ¶
type Log struct {
Detail string `protobuf:"bytes,1,opt,name=detail,proto3" json:"detail,omitempty"`
// contains filtered or unexported fields
}
log
func (*Log) Descriptor
deprecated
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) ProtoReflect ¶
func (x *Log) ProtoReflect() protoreflect.Message
type NodeServiceClient ¶
type NodeServiceClient interface {
Start(ctx context.Context, in *Backend, opts ...grpc.CallOption) (*BaseInfoResponse, error)
Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
GetBaseInfo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BaseInfoResponse, error)
GetLogs(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[Log], error)
GetSystemStats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SystemStatsResponse, error)
GetBackendStats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BackendStatsResponse, error)
GetStats(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
GetUserOnlineStats(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*OnlineStatResponse, error)
GetUserOnlineIpListStats(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatsOnlineIpListResponse, error)
SyncUser(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[User, Empty], error)
SyncUsers(ctx context.Context, in *Users, opts ...grpc.CallOption) (*Empty, error)
SyncUsersChunked(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[UsersChunk, Empty], error)
}
NodeServiceClient is the client API for NodeService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
Service for node management and connection
func NewNodeServiceClient ¶
func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient
type NodeServiceServer ¶
type NodeServiceServer interface {
Start(context.Context, *Backend) (*BaseInfoResponse, error)
Stop(context.Context, *Empty) (*Empty, error)
GetBaseInfo(context.Context, *Empty) (*BaseInfoResponse, error)
GetLogs(*Empty, grpc.ServerStreamingServer[Log]) error
GetSystemStats(context.Context, *Empty) (*SystemStatsResponse, error)
GetBackendStats(context.Context, *Empty) (*BackendStatsResponse, error)
GetStats(context.Context, *StatRequest) (*StatResponse, error)
GetUserOnlineStats(context.Context, *StatRequest) (*OnlineStatResponse, error)
GetUserOnlineIpListStats(context.Context, *StatRequest) (*StatsOnlineIpListResponse, error)
SyncUser(grpc.ClientStreamingServer[User, Empty]) error
SyncUsers(context.Context, *Users) (*Empty, error)
SyncUsersChunked(grpc.ClientStreamingServer[UsersChunk, Empty]) error
// contains filtered or unexported methods
}
NodeServiceServer is the server API for NodeService service. All implementations must embed UnimplementedNodeServiceServer for forward compatibility.
Service for node management and connection
type NodeService_GetLogsClient ¶
type NodeService_GetLogsClient = grpc.ServerStreamingClient[Log]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_GetLogsServer ¶
type NodeService_GetLogsServer = grpc.ServerStreamingServer[Log]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_SyncUserClient ¶
type NodeService_SyncUserClient = grpc.ClientStreamingClient[User, Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_SyncUserServer ¶
type NodeService_SyncUserServer = grpc.ClientStreamingServer[User, Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_SyncUsersChunkedClient ¶ added in v0.2.0
type NodeService_SyncUsersChunkedClient = grpc.ClientStreamingClient[UsersChunk, Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type NodeService_SyncUsersChunkedServer ¶ added in v0.2.0
type NodeService_SyncUsersChunkedServer = grpc.ClientStreamingServer[UsersChunk, Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type OnlineStatResponse ¶
type OnlineStatResponse struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*OnlineStatResponse) Descriptor
deprecated
func (*OnlineStatResponse) Descriptor() ([]byte, []int)
Deprecated: Use OnlineStatResponse.ProtoReflect.Descriptor instead.
func (*OnlineStatResponse) GetName ¶
func (x *OnlineStatResponse) GetName() string
func (*OnlineStatResponse) GetValue ¶
func (x *OnlineStatResponse) GetValue() int64
func (*OnlineStatResponse) ProtoMessage ¶
func (*OnlineStatResponse) ProtoMessage()
func (*OnlineStatResponse) ProtoReflect ¶
func (x *OnlineStatResponse) ProtoReflect() protoreflect.Message
func (*OnlineStatResponse) Reset ¶
func (x *OnlineStatResponse) Reset()
func (*OnlineStatResponse) String ¶
func (x *OnlineStatResponse) String() string
type Proxy ¶
type Proxy struct {
Vmess *Vmess `protobuf:"bytes,1,opt,name=vmess,proto3" json:"vmess,omitempty"`
Vless *Vless `protobuf:"bytes,2,opt,name=vless,proto3" json:"vless,omitempty"`
Trojan *Trojan `protobuf:"bytes,3,opt,name=trojan,proto3" json:"trojan,omitempty"`
Shadowsocks *Shadowsocks `protobuf:"bytes,4,opt,name=shadowsocks,proto3" json:"shadowsocks,omitempty"`
// contains filtered or unexported fields
}
func (*Proxy) Descriptor
deprecated
func (*Proxy) GetShadowsocks ¶
func (x *Proxy) GetShadowsocks() *Shadowsocks
func (*Proxy) ProtoMessage ¶
func (*Proxy) ProtoMessage()
func (*Proxy) ProtoReflect ¶
func (x *Proxy) ProtoReflect() protoreflect.Message
type Shadowsocks ¶
type Shadowsocks struct {
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
Method string `protobuf:"bytes,2,opt,name=method,proto3" json:"method,omitempty"`
// contains filtered or unexported fields
}
func (*Shadowsocks) Descriptor
deprecated
func (*Shadowsocks) Descriptor() ([]byte, []int)
Deprecated: Use Shadowsocks.ProtoReflect.Descriptor instead.
func (*Shadowsocks) GetMethod ¶
func (x *Shadowsocks) GetMethod() string
func (*Shadowsocks) GetPassword ¶
func (x *Shadowsocks) GetPassword() string
func (*Shadowsocks) ProtoMessage ¶
func (*Shadowsocks) ProtoMessage()
func (*Shadowsocks) ProtoReflect ¶
func (x *Shadowsocks) ProtoReflect() protoreflect.Message
func (*Shadowsocks) Reset ¶
func (x *Shadowsocks) Reset()
func (*Shadowsocks) String ¶
func (x *Shadowsocks) String() string
type Stat ¶
type Stat struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Link string `protobuf:"bytes,3,opt,name=link,proto3" json:"link,omitempty"`
Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
stats
func (*Stat) Descriptor
deprecated
func (*Stat) ProtoMessage ¶
func (*Stat) ProtoMessage()
func (*Stat) ProtoReflect ¶
func (x *Stat) ProtoReflect() protoreflect.Message
type StatRequest ¶
type StatRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Reset_ bool `protobuf:"varint,2,opt,name=reset,proto3" json:"reset,omitempty"`
Type StatType `protobuf:"varint,3,opt,name=type,proto3,enum=service.StatType" json:"type,omitempty"`
// contains filtered or unexported fields
}
func (*StatRequest) Descriptor
deprecated
func (*StatRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatRequest.ProtoReflect.Descriptor instead.
func (*StatRequest) GetName ¶
func (x *StatRequest) GetName() string
func (*StatRequest) GetReset_ ¶
func (x *StatRequest) GetReset_() bool
func (*StatRequest) GetType ¶
func (x *StatRequest) GetType() StatType
func (*StatRequest) ProtoMessage ¶
func (*StatRequest) ProtoMessage()
func (*StatRequest) ProtoReflect ¶
func (x *StatRequest) ProtoReflect() protoreflect.Message
func (*StatRequest) Reset ¶
func (x *StatRequest) Reset()
func (*StatRequest) String ¶
func (x *StatRequest) String() string
type StatResponse ¶
type StatResponse struct {
Stats []*Stat `protobuf:"bytes,1,rep,name=stats,proto3" json:"stats,omitempty"`
// contains filtered or unexported fields
}
func (*StatResponse) Descriptor
deprecated
func (*StatResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatResponse.ProtoReflect.Descriptor instead.
func (*StatResponse) GetStats ¶
func (x *StatResponse) GetStats() []*Stat
func (*StatResponse) ProtoMessage ¶
func (*StatResponse) ProtoMessage()
func (*StatResponse) ProtoReflect ¶
func (x *StatResponse) ProtoReflect() protoreflect.Message
func (*StatResponse) Reset ¶
func (x *StatResponse) Reset()
func (*StatResponse) String ¶
func (x *StatResponse) String() string
type StatType ¶
type StatType int32
func (StatType) Descriptor ¶
func (StatType) Descriptor() protoreflect.EnumDescriptor
func (StatType) EnumDescriptor
deprecated
func (StatType) Number ¶
func (x StatType) Number() protoreflect.EnumNumber
func (StatType) Type ¶
func (StatType) Type() protoreflect.EnumType
type StatsOnlineIpListResponse ¶
type StatsOnlineIpListResponse struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Ips map[string]int64 `` /* 134-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*StatsOnlineIpListResponse) Descriptor
deprecated
func (*StatsOnlineIpListResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatsOnlineIpListResponse.ProtoReflect.Descriptor instead.
func (*StatsOnlineIpListResponse) GetIps ¶
func (x *StatsOnlineIpListResponse) GetIps() map[string]int64
func (*StatsOnlineIpListResponse) GetName ¶
func (x *StatsOnlineIpListResponse) GetName() string
func (*StatsOnlineIpListResponse) ProtoMessage ¶
func (*StatsOnlineIpListResponse) ProtoMessage()
func (*StatsOnlineIpListResponse) ProtoReflect ¶
func (x *StatsOnlineIpListResponse) ProtoReflect() protoreflect.Message
func (*StatsOnlineIpListResponse) Reset ¶
func (x *StatsOnlineIpListResponse) Reset()
func (*StatsOnlineIpListResponse) String ¶
func (x *StatsOnlineIpListResponse) String() string
type SystemStatsResponse ¶
type SystemStatsResponse struct {
MemTotal uint64 `protobuf:"varint,1,opt,name=mem_total,json=memTotal,proto3" json:"mem_total,omitempty"`
MemUsed uint64 `protobuf:"varint,2,opt,name=mem_used,json=memUsed,proto3" json:"mem_used,omitempty"`
CpuCores uint64 `protobuf:"varint,3,opt,name=cpu_cores,json=cpuCores,proto3" json:"cpu_cores,omitempty"`
CpuUsage float64 `protobuf:"fixed64,4,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`
IncomingBandwidthSpeed uint64 `` /* 130-byte string literal not displayed */
OutgoingBandwidthSpeed uint64 `` /* 130-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*SystemStatsResponse) Descriptor
deprecated
func (*SystemStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use SystemStatsResponse.ProtoReflect.Descriptor instead.
func (*SystemStatsResponse) GetCpuCores ¶
func (x *SystemStatsResponse) GetCpuCores() uint64
func (*SystemStatsResponse) GetCpuUsage ¶
func (x *SystemStatsResponse) GetCpuUsage() float64
func (*SystemStatsResponse) GetIncomingBandwidthSpeed ¶
func (x *SystemStatsResponse) GetIncomingBandwidthSpeed() uint64
func (*SystemStatsResponse) GetMemTotal ¶
func (x *SystemStatsResponse) GetMemTotal() uint64
func (*SystemStatsResponse) GetMemUsed ¶
func (x *SystemStatsResponse) GetMemUsed() uint64
func (*SystemStatsResponse) GetOutgoingBandwidthSpeed ¶
func (x *SystemStatsResponse) GetOutgoingBandwidthSpeed() uint64
func (*SystemStatsResponse) ProtoMessage ¶
func (*SystemStatsResponse) ProtoMessage()
func (*SystemStatsResponse) ProtoReflect ¶
func (x *SystemStatsResponse) ProtoReflect() protoreflect.Message
func (*SystemStatsResponse) Reset ¶
func (x *SystemStatsResponse) Reset()
func (*SystemStatsResponse) String ¶
func (x *SystemStatsResponse) String() string
type Trojan ¶
type Trojan struct {
Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"`
// contains filtered or unexported fields
}
func (*Trojan) Descriptor
deprecated
func (*Trojan) GetPassword ¶
func (*Trojan) ProtoMessage ¶
func (*Trojan) ProtoMessage()
func (*Trojan) ProtoReflect ¶
func (x *Trojan) ProtoReflect() protoreflect.Message
type UnimplementedNodeServiceServer ¶
type UnimplementedNodeServiceServer struct{}
UnimplementedNodeServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedNodeServiceServer) GetBackendStats ¶
func (UnimplementedNodeServiceServer) GetBackendStats(context.Context, *Empty) (*BackendStatsResponse, error)
func (UnimplementedNodeServiceServer) GetBaseInfo ¶
func (UnimplementedNodeServiceServer) GetBaseInfo(context.Context, *Empty) (*BaseInfoResponse, error)
func (UnimplementedNodeServiceServer) GetLogs ¶
func (UnimplementedNodeServiceServer) GetLogs(*Empty, grpc.ServerStreamingServer[Log]) error
func (UnimplementedNodeServiceServer) GetStats ¶
func (UnimplementedNodeServiceServer) GetStats(context.Context, *StatRequest) (*StatResponse, error)
func (UnimplementedNodeServiceServer) GetSystemStats ¶
func (UnimplementedNodeServiceServer) GetSystemStats(context.Context, *Empty) (*SystemStatsResponse, error)
func (UnimplementedNodeServiceServer) GetUserOnlineIpListStats ¶
func (UnimplementedNodeServiceServer) GetUserOnlineIpListStats(context.Context, *StatRequest) (*StatsOnlineIpListResponse, error)
func (UnimplementedNodeServiceServer) GetUserOnlineStats ¶
func (UnimplementedNodeServiceServer) GetUserOnlineStats(context.Context, *StatRequest) (*OnlineStatResponse, error)
func (UnimplementedNodeServiceServer) Start ¶
func (UnimplementedNodeServiceServer) Start(context.Context, *Backend) (*BaseInfoResponse, error)
func (UnimplementedNodeServiceServer) SyncUser ¶
func (UnimplementedNodeServiceServer) SyncUser(grpc.ClientStreamingServer[User, Empty]) error
func (UnimplementedNodeServiceServer) SyncUsersChunked ¶ added in v0.2.0
func (UnimplementedNodeServiceServer) SyncUsersChunked(grpc.ClientStreamingServer[UsersChunk, Empty]) error
type UnsafeNodeServiceServer ¶
type UnsafeNodeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to NodeServiceServer will result in compilation errors.
type User ¶
type User struct {
Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"`
Proxies *Proxy `protobuf:"bytes,2,opt,name=proxies,proto3" json:"proxies,omitempty"`
Inbounds []string `protobuf:"bytes,3,rep,name=inbounds,proto3" json:"inbounds,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetInbounds ¶
func (*User) GetProxies ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type Users ¶
type Users struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
// contains filtered or unexported fields
}
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message
type UsersChunk ¶ added in v0.2.0
type UsersChunk struct {
Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
Index uint64 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"`
Last bool `protobuf:"varint,3,opt,name=last,proto3" json:"last,omitempty"`
// contains filtered or unexported fields
}
func (*UsersChunk) Descriptor
deprecated
added in
v0.2.0
func (*UsersChunk) Descriptor() ([]byte, []int)
Deprecated: Use UsersChunk.ProtoReflect.Descriptor instead.
func (*UsersChunk) GetIndex ¶ added in v0.2.0
func (x *UsersChunk) GetIndex() uint64
func (*UsersChunk) GetLast ¶ added in v0.2.0
func (x *UsersChunk) GetLast() bool
func (*UsersChunk) GetUsers ¶ added in v0.2.0
func (x *UsersChunk) GetUsers() []*User
func (*UsersChunk) ProtoMessage ¶ added in v0.2.0
func (*UsersChunk) ProtoMessage()
func (*UsersChunk) ProtoReflect ¶ added in v0.2.0
func (x *UsersChunk) ProtoReflect() protoreflect.Message
func (*UsersChunk) Reset ¶ added in v0.2.0
func (x *UsersChunk) Reset()
func (*UsersChunk) String ¶ added in v0.2.0
func (x *UsersChunk) String() string
type Vless ¶
type Vless struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Flow string `protobuf:"bytes,2,opt,name=flow,proto3" json:"flow,omitempty"`
// contains filtered or unexported fields
}
func (*Vless) Descriptor
deprecated
func (*Vless) ProtoMessage ¶
func (*Vless) ProtoMessage()
func (*Vless) ProtoReflect ¶
func (x *Vless) ProtoReflect() protoreflect.Message
type Vmess ¶
type Vmess struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// contains filtered or unexported fields
}
User
func (*Vmess) Descriptor
deprecated
func (*Vmess) ProtoMessage ¶
func (*Vmess) ProtoMessage()
func (*Vmess) ProtoReflect ¶
func (x *Vmess) ProtoReflect() protoreflect.Message