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 AddRoutingRuleRequest
- func (*AddRoutingRuleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AddRoutingRuleRequest) GetRule() string
- func (x *AddRoutingRuleRequest) GetShouldReset() bool
- func (*AddRoutingRuleRequest) ProtoMessage()
- func (x *AddRoutingRuleRequest) ProtoReflect() protoreflect.Message
- func (x *AddRoutingRuleRequest) Reset()
- func (x *AddRoutingRuleRequest) String() string
- 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 BalancerInfoRequest
- func (*BalancerInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BalancerInfoRequest) GetTag() string
- func (*BalancerInfoRequest) ProtoMessage()
- func (x *BalancerInfoRequest) ProtoReflect() protoreflect.Message
- func (x *BalancerInfoRequest) Reset()
- func (x *BalancerInfoRequest) String() string
- type BalancerInfoResponse
- func (*BalancerInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BalancerInfoResponse) GetOverrideTarget() string
- func (x *BalancerInfoResponse) GetPrincipleTarget() []string
- func (*BalancerInfoResponse) ProtoMessage()
- func (x *BalancerInfoResponse) ProtoReflect() protoreflect.Message
- func (x *BalancerInfoResponse) Reset()
- func (x *BalancerInfoResponse) String() string
- 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 Hysteria
- type Latency
- func (*Latency) Descriptor() ([]byte, []int)deprecated
- func (x *Latency) GetAlive() bool
- func (x *Latency) GetDelay() int64
- func (x *Latency) GetLastSeenTime() int64
- func (x *Latency) GetLastTryTime() int64
- func (x *Latency) GetLink() string
- func (x *Latency) GetName() string
- func (x *Latency) GetSource() string
- func (*Latency) ProtoMessage()
- func (x *Latency) ProtoReflect() protoreflect.Message
- func (x *Latency) Reset()
- func (x *Latency) String() string
- type LatencyRequest
- type LatencyResponse
- 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 OverrideBalancerTargetRequest
- func (*OverrideBalancerTargetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *OverrideBalancerTargetRequest) GetBalancerTag() string
- func (x *OverrideBalancerTargetRequest) GetTarget() string
- func (*OverrideBalancerTargetRequest) ProtoMessage()
- func (x *OverrideBalancerTargetRequest) ProtoReflect() protoreflect.Message
- func (x *OverrideBalancerTargetRequest) Reset()
- func (x *OverrideBalancerTargetRequest) String() string
- type Proxy
- func (*Proxy) Descriptor() ([]byte, []int)deprecated
- func (x *Proxy) GetHysteria() *Hysteria
- func (x *Proxy) GetShadowsocks() *Shadowsocks
- func (x *Proxy) GetTrojan() *Trojan
- func (x *Proxy) GetVless() *Vless
- func (x *Proxy) GetVmess() *Vmess
- func (x *Proxy) GetWireguard() *Wireguard
- func (*Proxy) ProtoMessage()
- func (x *Proxy) ProtoReflect() protoreflect.Message
- func (x *Proxy) Reset()
- func (x *Proxy) String() string
- type RemoveRoutingRuleRequest
- func (*RemoveRoutingRuleRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RemoveRoutingRuleRequest) GetRuleTag() string
- func (*RemoveRoutingRuleRequest) ProtoMessage()
- func (x *RemoveRoutingRuleRequest) ProtoReflect() protoreflect.Message
- func (x *RemoveRoutingRuleRequest) Reset()
- func (x *RemoveRoutingRuleRequest) String() string
- type RouteResult
- func (*RouteResult) Descriptor() ([]byte, []int)deprecated
- func (x *RouteResult) GetInboundTag() string
- func (x *RouteResult) GetNetwork() string
- func (x *RouteResult) GetOutboundGroupTags() []string
- func (x *RouteResult) GetOutboundTag() string
- func (x *RouteResult) GetTargetDomain() string
- func (*RouteResult) ProtoMessage()
- func (x *RouteResult) ProtoReflect() protoreflect.Message
- func (x *RouteResult) Reset()
- func (x *RouteResult) String() string
- type RoutingRule
- func (*RoutingRule) Descriptor() ([]byte, []int)deprecated
- func (x *RoutingRule) GetOutboundTag() string
- func (x *RoutingRule) GetRuleTag() string
- func (*RoutingRule) ProtoMessage()
- func (x *RoutingRule) ProtoReflect() protoreflect.Message
- func (x *RoutingRule) Reset()
- func (x *RoutingRule) String() string
- type RoutingRulesResponse
- func (*RoutingRulesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RoutingRulesResponse) GetRules() []*RoutingRule
- func (*RoutingRulesResponse) ProtoMessage()
- func (x *RoutingRulesResponse) ProtoReflect() protoreflect.Message
- func (x *RoutingRulesResponse) Reset()
- func (x *RoutingRulesResponse) 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 (x *SystemStatsResponse) GetUptime() uint64
- func (*SystemStatsResponse) ProtoMessage()
- func (x *SystemStatsResponse) ProtoReflect() protoreflect.Message
- func (x *SystemStatsResponse) Reset()
- func (x *SystemStatsResponse) String() string
- type TestRouteRequest
- func (*TestRouteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TestRouteRequest) GetAttributes() map[string]string
- func (x *TestRouteRequest) GetFieldSelectors() []string
- func (x *TestRouteRequest) GetInboundTag() string
- func (x *TestRouteRequest) GetNetwork() string
- func (x *TestRouteRequest) GetProtocol() string
- func (x *TestRouteRequest) GetPublishResult() bool
- func (x *TestRouteRequest) GetTargetDomain() string
- func (x *TestRouteRequest) GetTargetIp() string
- func (x *TestRouteRequest) GetTargetPort() uint32
- func (x *TestRouteRequest) GetUser() string
- func (*TestRouteRequest) ProtoMessage()
- func (x *TestRouteRequest) ProtoReflect() protoreflect.Message
- func (x *TestRouteRequest) Reset()
- func (x *TestRouteRequest) String() string
- type Trojan
- type UnimplementedNodeServiceServer
- func (UnimplementedNodeServiceServer) AddRoutingRule(context.Context, *AddRoutingRuleRequest) (*Empty, error)
- func (UnimplementedNodeServiceServer) GetBackendStats(context.Context, *Empty) (*BackendStatsResponse, error)
- func (UnimplementedNodeServiceServer) GetBalancerInfo(context.Context, *BalancerInfoRequest) (*BalancerInfoResponse, error)
- func (UnimplementedNodeServiceServer) GetBaseInfo(context.Context, *Empty) (*BaseInfoResponse, error)
- func (UnimplementedNodeServiceServer) GetLogs(*Empty, grpc.ServerStreamingServer[Log]) error
- func (UnimplementedNodeServiceServer) GetOutboundsLatency(context.Context, *LatencyRequest) (*LatencyResponse, 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) ListRoutingRules(context.Context, *Empty) (*RoutingRulesResponse, error)
- func (UnimplementedNodeServiceServer) OverrideBalancerTarget(context.Context, *OverrideBalancerTargetRequest) (*Empty, error)
- func (UnimplementedNodeServiceServer) RemoveRoutingRule(context.Context, *RemoveRoutingRuleRequest) (*Empty, 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
- func (UnimplementedNodeServiceServer) TestRoute(context.Context, *TestRouteRequest) (*RouteResult, 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
- type Wireguard
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_GetOutboundsLatency_FullMethodName = "/service.NodeService/GetOutboundsLatency" 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" NodeService_ListRoutingRules_FullMethodName = "/service.NodeService/ListRoutingRules" NodeService_GetBalancerInfo_FullMethodName = "/service.NodeService/GetBalancerInfo" NodeService_TestRoute_FullMethodName = "/service.NodeService/TestRoute" NodeService_AddRoutingRule_FullMethodName = "/service.NodeService/AddRoutingRule" NodeService_RemoveRoutingRule_FullMethodName = "/service.NodeService/RemoveRoutingRule" NodeService_OverrideBalancerTarget_FullMethodName = "/service.NodeService/OverrideBalancerTarget" )
Variables ¶
var ( BackendType_name = map[int32]string{ 0: "XRAY", 1: "WIREGUARD", } BackendType_value = map[string]int32{ "XRAY": 0, "WIREGUARD": 1, } )
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: "GetOutboundsLatency", Handler: _NodeService_GetOutboundsLatency_Handler, }, { MethodName: "GetUserOnlineStats", Handler: _NodeService_GetUserOnlineStats_Handler, }, { MethodName: "GetUserOnlineIpListStats", Handler: _NodeService_GetUserOnlineIpListStats_Handler, }, { MethodName: "SyncUsers", Handler: _NodeService_SyncUsers_Handler, }, { MethodName: "ListRoutingRules", Handler: _NodeService_ListRoutingRules_Handler, }, { MethodName: "GetBalancerInfo", Handler: _NodeService_GetBalancerInfo_Handler, }, { MethodName: "TestRoute", Handler: _NodeService_TestRoute_Handler, }, { MethodName: "AddRoutingRule", Handler: _NodeService_AddRoutingRule_Handler, }, { MethodName: "RemoveRoutingRule", Handler: _NodeService_RemoveRoutingRule_Handler, }, { MethodName: "OverrideBalancerTarget", Handler: _NodeService_OverrideBalancerTarget_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 AddRoutingRuleRequest ¶ added in v0.5.4
type AddRoutingRuleRequest struct {
Rule string `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"` // JSON for one xray routing rule (same shape as routing.rules[])
// false (default) appends the rule, keeping existing rules; true resets the
// router (clears all rules + balancers) before adding. Default is the safe,
// non-destructive behavior.
ShouldReset bool `protobuf:"varint,2,opt,name=should_reset,json=shouldReset,proto3" json:"should_reset,omitempty"`
// contains filtered or unexported fields
}
func (*AddRoutingRuleRequest) Descriptor
deprecated
added in
v0.5.4
func (*AddRoutingRuleRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRoutingRuleRequest.ProtoReflect.Descriptor instead.
func (*AddRoutingRuleRequest) GetRule ¶ added in v0.5.4
func (x *AddRoutingRuleRequest) GetRule() string
func (*AddRoutingRuleRequest) GetShouldReset ¶ added in v0.5.4
func (x *AddRoutingRuleRequest) GetShouldReset() bool
func (*AddRoutingRuleRequest) ProtoMessage ¶ added in v0.5.4
func (*AddRoutingRuleRequest) ProtoMessage()
func (*AddRoutingRuleRequest) ProtoReflect ¶ added in v0.5.4
func (x *AddRoutingRuleRequest) ProtoReflect() protoreflect.Message
func (*AddRoutingRuleRequest) Reset ¶ added in v0.5.4
func (x *AddRoutingRuleRequest) Reset()
func (*AddRoutingRuleRequest) String ¶ added in v0.5.4
func (x *AddRoutingRuleRequest) String() string
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 BackendType_WIREGUARD BackendType = 1 )
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 BalancerInfoRequest ¶ added in v0.5.4
type BalancerInfoRequest struct {
Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
// contains filtered or unexported fields
}
func (*BalancerInfoRequest) Descriptor
deprecated
added in
v0.5.4
func (*BalancerInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use BalancerInfoRequest.ProtoReflect.Descriptor instead.
func (*BalancerInfoRequest) GetTag ¶ added in v0.5.4
func (x *BalancerInfoRequest) GetTag() string
func (*BalancerInfoRequest) ProtoMessage ¶ added in v0.5.4
func (*BalancerInfoRequest) ProtoMessage()
func (*BalancerInfoRequest) ProtoReflect ¶ added in v0.5.4
func (x *BalancerInfoRequest) ProtoReflect() protoreflect.Message
func (*BalancerInfoRequest) Reset ¶ added in v0.5.4
func (x *BalancerInfoRequest) Reset()
func (*BalancerInfoRequest) String ¶ added in v0.5.4
func (x *BalancerInfoRequest) String() string
type BalancerInfoResponse ¶ added in v0.5.4
type BalancerInfoResponse struct {
OverrideTarget string `protobuf:"bytes,1,opt,name=override_target,json=overrideTarget,proto3" json:"override_target,omitempty"`
PrincipleTarget []string `protobuf:"bytes,2,rep,name=principle_target,json=principleTarget,proto3" json:"principle_target,omitempty"`
// contains filtered or unexported fields
}
func (*BalancerInfoResponse) Descriptor
deprecated
added in
v0.5.4
func (*BalancerInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use BalancerInfoResponse.ProtoReflect.Descriptor instead.
func (*BalancerInfoResponse) GetOverrideTarget ¶ added in v0.5.4
func (x *BalancerInfoResponse) GetOverrideTarget() string
func (*BalancerInfoResponse) GetPrincipleTarget ¶ added in v0.5.4
func (x *BalancerInfoResponse) GetPrincipleTarget() []string
func (*BalancerInfoResponse) ProtoMessage ¶ added in v0.5.4
func (*BalancerInfoResponse) ProtoMessage()
func (*BalancerInfoResponse) ProtoReflect ¶ added in v0.5.4
func (x *BalancerInfoResponse) ProtoReflect() protoreflect.Message
func (*BalancerInfoResponse) Reset ¶ added in v0.5.4
func (x *BalancerInfoResponse) Reset()
func (*BalancerInfoResponse) String ¶ added in v0.5.4
func (x *BalancerInfoResponse) String() string
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 Hysteria ¶ added in v0.3.0
type Hysteria struct {
Auth string `protobuf:"bytes,1,opt,name=auth,proto3" json:"auth,omitempty"`
// contains filtered or unexported fields
}
func (*Hysteria) Descriptor
deprecated
added in
v0.3.0
func (*Hysteria) ProtoMessage ¶ added in v0.3.0
func (*Hysteria) ProtoMessage()
func (*Hysteria) ProtoReflect ¶ added in v0.3.0
func (x *Hysteria) ProtoReflect() protoreflect.Message
type Latency ¶ added in v0.4.1
type Latency struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Alive bool `protobuf:"varint,2,opt,name=alive,proto3" json:"alive,omitempty"`
Delay int64 `protobuf:"varint,3,opt,name=delay,proto3" json:"delay,omitempty"`
Link string `protobuf:"bytes,4,opt,name=link,proto3" json:"link,omitempty"`
LastSeenTime int64 `protobuf:"varint,5,opt,name=last_seen_time,json=lastSeenTime,proto3" json:"last_seen_time,omitempty"`
LastTryTime int64 `protobuf:"varint,6,opt,name=last_try_time,json=lastTryTime,proto3" json:"last_try_time,omitempty"`
Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"`
// contains filtered or unexported fields
}
func (*Latency) Descriptor
deprecated
added in
v0.4.1
func (*Latency) GetLastSeenTime ¶ added in v0.4.1
func (*Latency) GetLastTryTime ¶ added in v0.4.1
func (*Latency) ProtoMessage ¶ added in v0.4.1
func (*Latency) ProtoMessage()
func (*Latency) ProtoReflect ¶ added in v0.4.1
func (x *Latency) ProtoReflect() protoreflect.Message
type LatencyRequest ¶ added in v0.4.1
type LatencyRequest struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// contains filtered or unexported fields
}
func (*LatencyRequest) Descriptor
deprecated
added in
v0.4.1
func (*LatencyRequest) Descriptor() ([]byte, []int)
Deprecated: Use LatencyRequest.ProtoReflect.Descriptor instead.
func (*LatencyRequest) GetName ¶ added in v0.4.1
func (x *LatencyRequest) GetName() string
func (*LatencyRequest) ProtoMessage ¶ added in v0.4.1
func (*LatencyRequest) ProtoMessage()
func (*LatencyRequest) ProtoReflect ¶ added in v0.4.1
func (x *LatencyRequest) ProtoReflect() protoreflect.Message
func (*LatencyRequest) Reset ¶ added in v0.4.1
func (x *LatencyRequest) Reset()
func (*LatencyRequest) String ¶ added in v0.4.1
func (x *LatencyRequest) String() string
type LatencyResponse ¶ added in v0.4.1
type LatencyResponse struct {
Latencies []*Latency `protobuf:"bytes,1,rep,name=latencies,proto3" json:"latencies,omitempty"`
// contains filtered or unexported fields
}
func (*LatencyResponse) Descriptor
deprecated
added in
v0.4.1
func (*LatencyResponse) Descriptor() ([]byte, []int)
Deprecated: Use LatencyResponse.ProtoReflect.Descriptor instead.
func (*LatencyResponse) GetLatencies ¶ added in v0.4.1
func (x *LatencyResponse) GetLatencies() []*Latency
func (*LatencyResponse) ProtoMessage ¶ added in v0.4.1
func (*LatencyResponse) ProtoMessage()
func (*LatencyResponse) ProtoReflect ¶ added in v0.4.1
func (x *LatencyResponse) ProtoReflect() protoreflect.Message
func (*LatencyResponse) Reset ¶ added in v0.4.1
func (x *LatencyResponse) Reset()
func (*LatencyResponse) String ¶ added in v0.4.1
func (x *LatencyResponse) 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) 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)
GetOutboundsLatency(ctx context.Context, in *LatencyRequest, opts ...grpc.CallOption) (*LatencyResponse, 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)
ListRoutingRules(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*RoutingRulesResponse, error)
GetBalancerInfo(ctx context.Context, in *BalancerInfoRequest, opts ...grpc.CallOption) (*BalancerInfoResponse, error)
TestRoute(ctx context.Context, in *TestRouteRequest, opts ...grpc.CallOption) (*RouteResult, error)
AddRoutingRule(ctx context.Context, in *AddRoutingRuleRequest, opts ...grpc.CallOption) (*Empty, error)
RemoveRoutingRule(ctx context.Context, in *RemoveRoutingRuleRequest, opts ...grpc.CallOption) (*Empty, error)
OverrideBalancerTarget(ctx context.Context, in *OverrideBalancerTargetRequest, 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
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)
GetOutboundsLatency(context.Context, *LatencyRequest) (*LatencyResponse, 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
ListRoutingRules(context.Context, *Empty) (*RoutingRulesResponse, error)
GetBalancerInfo(context.Context, *BalancerInfoRequest) (*BalancerInfoResponse, error)
TestRoute(context.Context, *TestRouteRequest) (*RouteResult, error)
AddRoutingRule(context.Context, *AddRoutingRuleRequest) (*Empty, error)
RemoveRoutingRule(context.Context, *RemoveRoutingRuleRequest) (*Empty, error)
OverrideBalancerTarget(context.Context, *OverrideBalancerTargetRequest) (*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 OverrideBalancerTargetRequest ¶ added in v0.5.4
type OverrideBalancerTargetRequest struct {
BalancerTag string `protobuf:"bytes,1,opt,name=balancer_tag,json=balancerTag,proto3" json:"balancer_tag,omitempty"`
Target string `protobuf:"bytes,2,opt,name=target,proto3" json:"target,omitempty"`
// contains filtered or unexported fields
}
func (*OverrideBalancerTargetRequest) Descriptor
deprecated
added in
v0.5.4
func (*OverrideBalancerTargetRequest) Descriptor() ([]byte, []int)
Deprecated: Use OverrideBalancerTargetRequest.ProtoReflect.Descriptor instead.
func (*OverrideBalancerTargetRequest) GetBalancerTag ¶ added in v0.5.4
func (x *OverrideBalancerTargetRequest) GetBalancerTag() string
func (*OverrideBalancerTargetRequest) GetTarget ¶ added in v0.5.4
func (x *OverrideBalancerTargetRequest) GetTarget() string
func (*OverrideBalancerTargetRequest) ProtoMessage ¶ added in v0.5.4
func (*OverrideBalancerTargetRequest) ProtoMessage()
func (*OverrideBalancerTargetRequest) ProtoReflect ¶ added in v0.5.4
func (x *OverrideBalancerTargetRequest) ProtoReflect() protoreflect.Message
func (*OverrideBalancerTargetRequest) Reset ¶ added in v0.5.4
func (x *OverrideBalancerTargetRequest) Reset()
func (*OverrideBalancerTargetRequest) String ¶ added in v0.5.4
func (x *OverrideBalancerTargetRequest) 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"`
Wireguard *Wireguard `protobuf:"bytes,5,opt,name=wireguard,proto3" json:"wireguard,omitempty"`
Hysteria *Hysteria `protobuf:"bytes,6,opt,name=hysteria,proto3" json:"hysteria,omitempty"`
// contains filtered or unexported fields
}
func (*Proxy) Descriptor
deprecated
func (*Proxy) GetHysteria ¶ added in v0.3.0
func (*Proxy) GetShadowsocks ¶
func (x *Proxy) GetShadowsocks() *Shadowsocks
func (*Proxy) GetWireguard ¶ added in v0.3.0
func (*Proxy) ProtoMessage ¶
func (*Proxy) ProtoMessage()
func (*Proxy) ProtoReflect ¶
func (x *Proxy) ProtoReflect() protoreflect.Message
type RemoveRoutingRuleRequest ¶ added in v0.5.4
type RemoveRoutingRuleRequest struct {
RuleTag string `protobuf:"bytes,1,opt,name=rule_tag,json=ruleTag,proto3" json:"rule_tag,omitempty"`
// contains filtered or unexported fields
}
func (*RemoveRoutingRuleRequest) Descriptor
deprecated
added in
v0.5.4
func (*RemoveRoutingRuleRequest) Descriptor() ([]byte, []int)
Deprecated: Use RemoveRoutingRuleRequest.ProtoReflect.Descriptor instead.
func (*RemoveRoutingRuleRequest) GetRuleTag ¶ added in v0.5.4
func (x *RemoveRoutingRuleRequest) GetRuleTag() string
func (*RemoveRoutingRuleRequest) ProtoMessage ¶ added in v0.5.4
func (*RemoveRoutingRuleRequest) ProtoMessage()
func (*RemoveRoutingRuleRequest) ProtoReflect ¶ added in v0.5.4
func (x *RemoveRoutingRuleRequest) ProtoReflect() protoreflect.Message
func (*RemoveRoutingRuleRequest) Reset ¶ added in v0.5.4
func (x *RemoveRoutingRuleRequest) Reset()
func (*RemoveRoutingRuleRequest) String ¶ added in v0.5.4
func (x *RemoveRoutingRuleRequest) String() string
type RouteResult ¶ added in v0.5.4
type RouteResult struct {
OutboundTag string `protobuf:"bytes,1,opt,name=outbound_tag,json=outboundTag,proto3" json:"outbound_tag,omitempty"`
OutboundGroupTags []string `protobuf:"bytes,2,rep,name=outbound_group_tags,json=outboundGroupTags,proto3" json:"outbound_group_tags,omitempty"`
InboundTag string `protobuf:"bytes,3,opt,name=inbound_tag,json=inboundTag,proto3" json:"inbound_tag,omitempty"`
Network string `protobuf:"bytes,4,opt,name=network,proto3" json:"network,omitempty"`
TargetDomain string `protobuf:"bytes,5,opt,name=target_domain,json=targetDomain,proto3" json:"target_domain,omitempty"`
// contains filtered or unexported fields
}
func (*RouteResult) Descriptor
deprecated
added in
v0.5.4
func (*RouteResult) Descriptor() ([]byte, []int)
Deprecated: Use RouteResult.ProtoReflect.Descriptor instead.
func (*RouteResult) GetInboundTag ¶ added in v0.5.4
func (x *RouteResult) GetInboundTag() string
func (*RouteResult) GetNetwork ¶ added in v0.5.4
func (x *RouteResult) GetNetwork() string
func (*RouteResult) GetOutboundGroupTags ¶ added in v0.5.4
func (x *RouteResult) GetOutboundGroupTags() []string
func (*RouteResult) GetOutboundTag ¶ added in v0.5.4
func (x *RouteResult) GetOutboundTag() string
func (*RouteResult) GetTargetDomain ¶ added in v0.5.4
func (x *RouteResult) GetTargetDomain() string
func (*RouteResult) ProtoMessage ¶ added in v0.5.4
func (*RouteResult) ProtoMessage()
func (*RouteResult) ProtoReflect ¶ added in v0.5.4
func (x *RouteResult) ProtoReflect() protoreflect.Message
func (*RouteResult) Reset ¶ added in v0.5.4
func (x *RouteResult) Reset()
func (*RouteResult) String ¶ added in v0.5.4
func (x *RouteResult) String() string
type RoutingRule ¶ added in v0.5.4
type RoutingRule struct {
OutboundTag string `protobuf:"bytes,1,opt,name=outbound_tag,json=outboundTag,proto3" json:"outbound_tag,omitempty"`
RuleTag string `protobuf:"bytes,2,opt,name=rule_tag,json=ruleTag,proto3" json:"rule_tag,omitempty"`
// contains filtered or unexported fields
}
Routing (mirrors xray app/router/command, node-friendly shapes)
func (*RoutingRule) Descriptor
deprecated
added in
v0.5.4
func (*RoutingRule) Descriptor() ([]byte, []int)
Deprecated: Use RoutingRule.ProtoReflect.Descriptor instead.
func (*RoutingRule) GetOutboundTag ¶ added in v0.5.4
func (x *RoutingRule) GetOutboundTag() string
func (*RoutingRule) GetRuleTag ¶ added in v0.5.4
func (x *RoutingRule) GetRuleTag() string
func (*RoutingRule) ProtoMessage ¶ added in v0.5.4
func (*RoutingRule) ProtoMessage()
func (*RoutingRule) ProtoReflect ¶ added in v0.5.4
func (x *RoutingRule) ProtoReflect() protoreflect.Message
func (*RoutingRule) Reset ¶ added in v0.5.4
func (x *RoutingRule) Reset()
func (*RoutingRule) String ¶ added in v0.5.4
func (x *RoutingRule) String() string
type RoutingRulesResponse ¶ added in v0.5.4
type RoutingRulesResponse struct {
Rules []*RoutingRule `protobuf:"bytes,1,rep,name=rules,proto3" json:"rules,omitempty"`
// contains filtered or unexported fields
}
func (*RoutingRulesResponse) Descriptor
deprecated
added in
v0.5.4
func (*RoutingRulesResponse) Descriptor() ([]byte, []int)
Deprecated: Use RoutingRulesResponse.ProtoReflect.Descriptor instead.
func (*RoutingRulesResponse) GetRules ¶ added in v0.5.4
func (x *RoutingRulesResponse) GetRules() []*RoutingRule
func (*RoutingRulesResponse) ProtoMessage ¶ added in v0.5.4
func (*RoutingRulesResponse) ProtoMessage()
func (*RoutingRulesResponse) ProtoReflect ¶ added in v0.5.4
func (x *RoutingRulesResponse) ProtoReflect() protoreflect.Message
func (*RoutingRulesResponse) Reset ¶ added in v0.5.4
func (x *RoutingRulesResponse) Reset()
func (*RoutingRulesResponse) String ¶ added in v0.5.4
func (x *RoutingRulesResponse) 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) 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 */
Uptime uint64 `protobuf:"varint,7,opt,name=uptime,proto3" json:"uptime,omitempty"`
// 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) GetUptime ¶ added in v0.4.0
func (x *SystemStatsResponse) GetUptime() 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 TestRouteRequest ¶ added in v0.5.4
type TestRouteRequest struct {
InboundTag string `protobuf:"bytes,1,opt,name=inbound_tag,json=inboundTag,proto3" json:"inbound_tag,omitempty"`
Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` // "tcp" | "udp"
TargetIp string `protobuf:"bytes,3,opt,name=target_ip,json=targetIp,proto3" json:"target_ip,omitempty"`
TargetDomain string `protobuf:"bytes,4,opt,name=target_domain,json=targetDomain,proto3" json:"target_domain,omitempty"`
TargetPort uint32 `protobuf:"varint,5,opt,name=target_port,json=targetPort,proto3" json:"target_port,omitempty"`
Protocol string `protobuf:"bytes,6,opt,name=protocol,proto3" json:"protocol,omitempty"`
User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"`
Attributes map[string]string `` /* 147-byte string literal not displayed */
FieldSelectors []string `protobuf:"bytes,9,rep,name=field_selectors,json=fieldSelectors,proto3" json:"field_selectors,omitempty"`
PublishResult bool `protobuf:"varint,10,opt,name=publish_result,json=publishResult,proto3" json:"publish_result,omitempty"`
// contains filtered or unexported fields
}
func (*TestRouteRequest) Descriptor
deprecated
added in
v0.5.4
func (*TestRouteRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestRouteRequest.ProtoReflect.Descriptor instead.
func (*TestRouteRequest) GetAttributes ¶ added in v0.5.4
func (x *TestRouteRequest) GetAttributes() map[string]string
func (*TestRouteRequest) GetFieldSelectors ¶ added in v0.5.4
func (x *TestRouteRequest) GetFieldSelectors() []string
func (*TestRouteRequest) GetInboundTag ¶ added in v0.5.4
func (x *TestRouteRequest) GetInboundTag() string
func (*TestRouteRequest) GetNetwork ¶ added in v0.5.4
func (x *TestRouteRequest) GetNetwork() string
func (*TestRouteRequest) GetProtocol ¶ added in v0.5.4
func (x *TestRouteRequest) GetProtocol() string
func (*TestRouteRequest) GetPublishResult ¶ added in v0.5.4
func (x *TestRouteRequest) GetPublishResult() bool
func (*TestRouteRequest) GetTargetDomain ¶ added in v0.5.4
func (x *TestRouteRequest) GetTargetDomain() string
func (*TestRouteRequest) GetTargetIp ¶ added in v0.5.4
func (x *TestRouteRequest) GetTargetIp() string
func (*TestRouteRequest) GetTargetPort ¶ added in v0.5.4
func (x *TestRouteRequest) GetTargetPort() uint32
func (*TestRouteRequest) GetUser ¶ added in v0.5.4
func (x *TestRouteRequest) GetUser() string
func (*TestRouteRequest) ProtoMessage ¶ added in v0.5.4
func (*TestRouteRequest) ProtoMessage()
func (*TestRouteRequest) ProtoReflect ¶ added in v0.5.4
func (x *TestRouteRequest) ProtoReflect() protoreflect.Message
func (*TestRouteRequest) Reset ¶ added in v0.5.4
func (x *TestRouteRequest) Reset()
func (*TestRouteRequest) String ¶ added in v0.5.4
func (x *TestRouteRequest) 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) AddRoutingRule ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) AddRoutingRule(context.Context, *AddRoutingRuleRequest) (*Empty, error)
func (UnimplementedNodeServiceServer) GetBackendStats ¶
func (UnimplementedNodeServiceServer) GetBackendStats(context.Context, *Empty) (*BackendStatsResponse, error)
func (UnimplementedNodeServiceServer) GetBalancerInfo ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) GetBalancerInfo(context.Context, *BalancerInfoRequest) (*BalancerInfoResponse, 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) GetOutboundsLatency ¶ added in v0.4.1
func (UnimplementedNodeServiceServer) GetOutboundsLatency(context.Context, *LatencyRequest) (*LatencyResponse, 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) ListRoutingRules ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) ListRoutingRules(context.Context, *Empty) (*RoutingRulesResponse, error)
func (UnimplementedNodeServiceServer) OverrideBalancerTarget ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) OverrideBalancerTarget(context.Context, *OverrideBalancerTargetRequest) (*Empty, error)
func (UnimplementedNodeServiceServer) RemoveRoutingRule ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) RemoveRoutingRule(context.Context, *RemoveRoutingRuleRequest) (*Empty, 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
func (UnimplementedNodeServiceServer) TestRoute ¶ added in v0.5.4
func (UnimplementedNodeServiceServer) TestRoute(context.Context, *TestRouteRequest) (*RouteResult, 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
type Wireguard ¶ added in v0.3.0
type Wireguard struct {
PublicKey string `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
PeerIps []string `protobuf:"bytes,2,rep,name=peer_ips,json=peerIps,proto3" json:"peer_ips,omitempty"`
// contains filtered or unexported fields
}
func (*Wireguard) Descriptor
deprecated
added in
v0.3.0
func (*Wireguard) GetPeerIps ¶ added in v0.3.0
func (*Wireguard) GetPublicKey ¶ added in v0.3.0
func (*Wireguard) ProtoMessage ¶ added in v0.3.0
func (*Wireguard) ProtoMessage()
func (*Wireguard) ProtoReflect ¶ added in v0.3.0
func (x *Wireguard) ProtoReflect() protoreflect.Message