common

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
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"
)

Variables

View Source
var (
	BackendType_name = map[int32]string{
		0: "XRAY",
	}
	BackendType_value = map[string]int32{
		"XRAY": 0,
	}
)

Enum value maps for BackendType.

View Source
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.

View Source
var File_common_service_proto protoreflect.FileDescriptor
View Source
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,
		},
	},
	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 EnsureBase64Password(password string, method string) string

func GrpcCodeToHTTP

func GrpcCodeToHTTP(code codes.Code) int

GrpcCodeToHTTP maps gRPC codes to HTTP status codes.

func InterceptNotFound

func InterceptNotFound(err error) error

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) Descriptor() ([]byte, []int)

Deprecated: Use Backend.ProtoReflect.Descriptor instead.

func (*Backend) GetConfig

func (x *Backend) GetConfig() string

func (*Backend) GetExcludeInbounds

func (x *Backend) GetExcludeInbounds() []string

func (*Backend) GetKeepAlive

func (x *Backend) GetKeepAlive() uint64

func (*Backend) GetType

func (x *Backend) GetType() BackendType

func (*Backend) GetUsers

func (x *Backend) GetUsers() []*User

func (*Backend) ProtoMessage

func (*Backend) ProtoMessage()

func (*Backend) ProtoReflect

func (x *Backend) ProtoReflect() protoreflect.Message

func (*Backend) Reset

func (x *Backend) Reset()

func (*Backend) String

func (x *Backend) String() string

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) 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

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Log.ProtoReflect.Descriptor instead.

func (*Log) GetDetail

func (x *Log) GetDetail() string

func (*Log) ProtoMessage

func (*Log) ProtoMessage()

func (*Log) ProtoReflect

func (x *Log) ProtoReflect() protoreflect.Message

func (*Log) Reset

func (x *Log) Reset()

func (*Log) String

func (x *Log) String() string

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)
}

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

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)
	// 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 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) Descriptor() ([]byte, []int)

Deprecated: Use Proxy.ProtoReflect.Descriptor instead.

func (*Proxy) GetShadowsocks

func (x *Proxy) GetShadowsocks() *Shadowsocks

func (*Proxy) GetTrojan

func (x *Proxy) GetTrojan() *Trojan

func (*Proxy) GetVless

func (x *Proxy) GetVless() *Vless

func (*Proxy) GetVmess

func (x *Proxy) GetVmess() *Vmess

func (*Proxy) ProtoMessage

func (*Proxy) ProtoMessage()

func (*Proxy) ProtoReflect

func (x *Proxy) ProtoReflect() protoreflect.Message

func (*Proxy) Reset

func (x *Proxy) Reset()

func (*Proxy) String

func (x *Proxy) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Stat.ProtoReflect.Descriptor instead.

func (x *Stat) GetLink() string

func (*Stat) GetName

func (x *Stat) GetName() string

func (*Stat) GetType

func (x *Stat) GetType() string

func (*Stat) GetValue

func (x *Stat) GetValue() int64

func (*Stat) ProtoMessage

func (*Stat) ProtoMessage()

func (*Stat) ProtoReflect

func (x *Stat) ProtoReflect() protoreflect.Message

func (*Stat) Reset

func (x *Stat) Reset()

func (*Stat) String

func (x *Stat) String() string

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
const (
	StatType_Outbounds StatType = 0
	StatType_Outbound  StatType = 1
	StatType_Inbounds  StatType = 2
	StatType_Inbound   StatType = 3
	StatType_UsersStat StatType = 4
	StatType_UserStat  StatType = 5
)

func (StatType) Descriptor

func (StatType) Descriptor() protoreflect.EnumDescriptor

func (StatType) Enum

func (x StatType) Enum() *StatType

func (StatType) EnumDescriptor deprecated

func (StatType) EnumDescriptor() ([]byte, []int)

Deprecated: Use StatType.Descriptor instead.

func (StatType) Number

func (x StatType) Number() protoreflect.EnumNumber

func (StatType) String

func (x StatType) String() string

func (StatType) Type

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 (*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) Descriptor() ([]byte, []int)

Deprecated: Use Trojan.ProtoReflect.Descriptor instead.

func (*Trojan) GetPassword

func (x *Trojan) GetPassword() string

func (*Trojan) ProtoMessage

func (*Trojan) ProtoMessage()

func (*Trojan) ProtoReflect

func (x *Trojan) ProtoReflect() protoreflect.Message

func (*Trojan) Reset

func (x *Trojan) Reset()

func (*Trojan) String

func (x *Trojan) String() string

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) GetBaseInfo

func (UnimplementedNodeServiceServer) GetLogs

func (UnimplementedNodeServiceServer) GetStats

func (UnimplementedNodeServiceServer) GetSystemStats

func (UnimplementedNodeServiceServer) GetUserOnlineIpListStats

func (UnimplementedNodeServiceServer) GetUserOnlineStats

func (UnimplementedNodeServiceServer) Start

func (UnimplementedNodeServiceServer) Stop

func (UnimplementedNodeServiceServer) SyncUser

func (UnimplementedNodeServiceServer) SyncUsers

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetInbounds

func (x *User) GetInbounds() []string

func (*User) GetProxies

func (x *User) GetProxies() *Proxy

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Users.ProtoReflect.Descriptor instead.

func (*Users) GetUsers

func (x *Users) GetUsers() []*User

func (*Users) ProtoMessage

func (*Users) ProtoMessage()

func (*Users) ProtoReflect

func (x *Users) ProtoReflect() protoreflect.Message

func (*Users) Reset

func (x *Users) Reset()

func (*Users) String

func (x *Users) 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) Descriptor() ([]byte, []int)

Deprecated: Use Vless.ProtoReflect.Descriptor instead.

func (*Vless) GetFlow

func (x *Vless) GetFlow() string

func (*Vless) GetId

func (x *Vless) GetId() string

func (*Vless) ProtoMessage

func (*Vless) ProtoMessage()

func (*Vless) ProtoReflect

func (x *Vless) ProtoReflect() protoreflect.Message

func (*Vless) Reset

func (x *Vless) Reset()

func (*Vless) String

func (x *Vless) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Vmess.ProtoReflect.Descriptor instead.

func (*Vmess) GetId

func (x *Vmess) GetId() string

func (*Vmess) ProtoMessage

func (*Vmess) ProtoMessage()

func (*Vmess) ProtoReflect

func (x *Vmess) ProtoReflect() protoreflect.Message

func (*Vmess) Reset

func (x *Vmess) Reset()

func (*Vmess) String

func (x *Vmess) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL