Help us shape the future of Go! Take the 2026 Go Developer Survey

serverv1

package
v1.15.13 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

README

Server HTTP Protobuf 接口

此目录的 server.proto 为节点 Server 接口提供可选的 Protobuf 二进制传输,覆盖以下端点:

  • POST /v1/server/online
  • POST /v1/server/push
  • POST /v1/server/status
  • GET /v1/server/config
  • GET /v1/server/user
  • GET /v2/server/{server_id}

上报类请求使用 Content-Type: application/protobuf 发送 Protobuf body; 增加 Accept: application/protobuf 可请求 Protobuf 响应。未指定时仍默认使用 JSON。GET 接口只需使用 Accept 协商响应格式。既有的 server_id、protocol 与 secret_key 查询参数保持不变。

所有成功的 Protobuf 信封均使用 code = 200 和 message = "success"。失败响应 使用 Result;带业务数据的成功响应使用强类型 data 字段。 GET /v2/server/{server_id} 定义了与既有 PPanel 节点对接一致的 DNS、出站和 协议消息。只有 plugin_options 使用 google.protobuf.Value,以保留对象和 SIP003 字符串两种插件参数形式。

修改 schema 后,使用以下命令重新生成 Go 绑定:

PATH="$(go env GOPATH)/bin:$PATH" \
  protoc --go_out=paths=source_relative:. api/server/v1/server.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_server_v1_server_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DNSResolver

type DNSResolver struct {
	Proto      string   `protobuf:"bytes,1,opt,name=proto,proto3" json:"proto,omitempty"`
	Address    string   `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	ServerName string   `protobuf:"bytes,3,opt,name=server_name,json=serverName,proto3" json:"server_name,omitempty"`
	Domains    []string `protobuf:"bytes,4,rep,name=domains,proto3" json:"domains,omitempty"`
	// contains filtered or unexported fields
}

DNSResolver is one DNS resolver used by the node runtime.

func (*DNSResolver) Descriptor deprecated

func (*DNSResolver) Descriptor() ([]byte, []int)

Deprecated: Use DNSResolver.ProtoReflect.Descriptor instead.

func (*DNSResolver) GetAddress

func (x *DNSResolver) GetAddress() string

func (*DNSResolver) GetDomains

func (x *DNSResolver) GetDomains() []string

func (*DNSResolver) GetProto

func (x *DNSResolver) GetProto() string

func (*DNSResolver) GetServerName

func (x *DNSResolver) GetServerName() string

func (*DNSResolver) ProtoMessage

func (*DNSResolver) ProtoMessage()

func (*DNSResolver) ProtoReflect

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

func (*DNSResolver) Reset

func (x *DNSResolver) Reset()

func (*DNSResolver) String

func (x *DNSResolver) String() string

type GetServerConfigResponse

type GetServerConfigResponse struct {
	Code    uint32            `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string            `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    *ServerConfigData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServerConfigResponse) Descriptor deprecated

func (*GetServerConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetServerConfigResponse.ProtoReflect.Descriptor instead.

func (*GetServerConfigResponse) GetCode

func (x *GetServerConfigResponse) GetCode() uint32

func (*GetServerConfigResponse) GetData

func (*GetServerConfigResponse) GetMessage

func (x *GetServerConfigResponse) GetMessage() string

func (*GetServerConfigResponse) ProtoMessage

func (*GetServerConfigResponse) ProtoMessage()

func (*GetServerConfigResponse) ProtoReflect

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

func (*GetServerConfigResponse) Reset

func (x *GetServerConfigResponse) Reset()

func (*GetServerConfigResponse) String

func (x *GetServerConfigResponse) String() string

type GetServerUserListResponse

type GetServerUserListResponse struct {
	Code    uint32              `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string              `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    *ServerUserListData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*GetServerUserListResponse) Descriptor deprecated

func (*GetServerUserListResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetServerUserListResponse.ProtoReflect.Descriptor instead.

func (*GetServerUserListResponse) GetCode

func (x *GetServerUserListResponse) GetCode() uint32

func (*GetServerUserListResponse) GetData

func (*GetServerUserListResponse) GetMessage

func (x *GetServerUserListResponse) GetMessage() string

func (*GetServerUserListResponse) ProtoMessage

func (*GetServerUserListResponse) ProtoMessage()

func (*GetServerUserListResponse) ProtoReflect

func (*GetServerUserListResponse) Reset

func (x *GetServerUserListResponse) Reset()

func (*GetServerUserListResponse) String

func (x *GetServerUserListResponse) String() string

type OnlineUser

type OnlineUser struct {
	UserId int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Ip     string `protobuf:"bytes,2,opt,name=ip,proto3" json:"ip,omitempty"`
	// contains filtered or unexported fields
}

func (*OnlineUser) Descriptor deprecated

func (*OnlineUser) Descriptor() ([]byte, []int)

Deprecated: Use OnlineUser.ProtoReflect.Descriptor instead.

func (*OnlineUser) GetIp

func (x *OnlineUser) GetIp() string

func (*OnlineUser) GetUserId

func (x *OnlineUser) GetUserId() int64

func (*OnlineUser) ProtoMessage

func (*OnlineUser) ProtoMessage()

func (*OnlineUser) ProtoReflect

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

func (*OnlineUser) Reset

func (x *OnlineUser) Reset()

func (*OnlineUser) String

func (x *OnlineUser) String() string

type Outbound

type Outbound struct {
	Name                    string          `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Protocol                string          `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Address                 string          `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
	Port                    int64           `protobuf:"varint,4,opt,name=port,proto3" json:"port,omitempty"`
	User                    string          `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"`
	Password                string          `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	Uuid                    string          `protobuf:"bytes,7,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Cipher                  string          `protobuf:"bytes,8,opt,name=cipher,proto3" json:"cipher,omitempty"`
	Plugin                  string          `protobuf:"bytes,9,opt,name=plugin,proto3" json:"plugin,omitempty"`
	PluginOptions           *structpb.Value `protobuf:"bytes,10,opt,name=plugin_options,json=pluginOptions,proto3" json:"plugin_options,omitempty"`
	Security                string          `protobuf:"bytes,11,opt,name=security,proto3" json:"security,omitempty"`
	Sni                     string          `protobuf:"bytes,12,opt,name=sni,proto3" json:"sni,omitempty"`
	Alpn                    []string        `protobuf:"bytes,13,rep,name=alpn,proto3" json:"alpn,omitempty"`
	AllowInsecure           bool            `protobuf:"varint,14,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
	Fingerprint             string          `protobuf:"bytes,15,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	Transport               string          `protobuf:"bytes,16,opt,name=transport,proto3" json:"transport,omitempty"`
	Host                    string          `protobuf:"bytes,17,opt,name=host,proto3" json:"host,omitempty"`
	Path                    string          `protobuf:"bytes,18,opt,name=path,proto3" json:"path,omitempty"`
	ServiceName             string          `protobuf:"bytes,19,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	XhttpMode               string          `protobuf:"bytes,20,opt,name=xhttp_mode,json=xhttpMode,proto3" json:"xhttp_mode,omitempty"`
	XhttpExtra              string          `protobuf:"bytes,21,opt,name=xhttp_extra,json=xhttpExtra,proto3" json:"xhttp_extra,omitempty"`
	Flow                    string          `protobuf:"bytes,22,opt,name=flow,proto3" json:"flow,omitempty"`
	Encryption              string          `protobuf:"bytes,23,opt,name=encryption,proto3" json:"encryption,omitempty"`
	EncryptionMode          string          `protobuf:"bytes,24,opt,name=encryption_mode,json=encryptionMode,proto3" json:"encryption_mode,omitempty"`
	EncryptionRtt           string          `protobuf:"bytes,25,opt,name=encryption_rtt,json=encryptionRtt,proto3" json:"encryption_rtt,omitempty"`
	EncryptionTicket        string          `protobuf:"bytes,26,opt,name=encryption_ticket,json=encryptionTicket,proto3" json:"encryption_ticket,omitempty"`
	EncryptionClientPadding string          `` /* 133-byte string literal not displayed */
	EncryptionPassword      string          `protobuf:"bytes,28,opt,name=encryption_password,json=encryptionPassword,proto3" json:"encryption_password,omitempty"`
	Multiplex               string          `protobuf:"bytes,29,opt,name=multiplex,proto3" json:"multiplex,omitempty"`
	Uot                     bool            `protobuf:"varint,30,opt,name=uot,proto3" json:"uot,omitempty"`
	UotVersion              int64           `protobuf:"varint,31,opt,name=uot_version,json=uotVersion,proto3" json:"uot_version,omitempty"`
	CongestionController    string          `protobuf:"bytes,32,opt,name=congestion_controller,json=congestionController,proto3" json:"congestion_controller,omitempty"`
	UdpStream               bool            `protobuf:"varint,33,opt,name=udp_stream,json=udpStream,proto3" json:"udp_stream,omitempty"`
	ReduceRtt               bool            `protobuf:"varint,34,opt,name=reduce_rtt,json=reduceRtt,proto3" json:"reduce_rtt,omitempty"`
	Heartbeat               int64           `protobuf:"varint,35,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"`
	RealityPublicKey        string          `protobuf:"bytes,36,opt,name=reality_public_key,json=realityPublicKey,proto3" json:"reality_public_key,omitempty"`
	RealityShortId          string          `protobuf:"bytes,37,opt,name=reality_short_id,json=realityShortId,proto3" json:"reality_short_id,omitempty"`
	SpiderX                 string          `protobuf:"bytes,38,opt,name=spider_x,json=spiderX,proto3" json:"spider_x,omitempty"`
	Settings                string          `protobuf:"bytes,39,opt,name=settings,proto3" json:"settings,omitempty"`
	StreamSettings          string          `protobuf:"bytes,40,opt,name=stream_settings,json=streamSettings,proto3" json:"stream_settings,omitempty"`
	Rules                   []string        `protobuf:"bytes,41,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

Outbound is one normalized outbound configuration. plugin_options preserves both object and SIP003 string forms accepted by the existing JSON API.

func (*Outbound) Descriptor deprecated

func (*Outbound) Descriptor() ([]byte, []int)

Deprecated: Use Outbound.ProtoReflect.Descriptor instead.

func (*Outbound) GetAddress

func (x *Outbound) GetAddress() string

func (*Outbound) GetAllowInsecure

func (x *Outbound) GetAllowInsecure() bool

func (*Outbound) GetAlpn

func (x *Outbound) GetAlpn() []string

func (*Outbound) GetCipher

func (x *Outbound) GetCipher() string

func (*Outbound) GetCongestionController

func (x *Outbound) GetCongestionController() string

func (*Outbound) GetEncryption

func (x *Outbound) GetEncryption() string

func (*Outbound) GetEncryptionClientPadding

func (x *Outbound) GetEncryptionClientPadding() string

func (*Outbound) GetEncryptionMode

func (x *Outbound) GetEncryptionMode() string

func (*Outbound) GetEncryptionPassword

func (x *Outbound) GetEncryptionPassword() string

func (*Outbound) GetEncryptionRtt

func (x *Outbound) GetEncryptionRtt() string

func (*Outbound) GetEncryptionTicket

func (x *Outbound) GetEncryptionTicket() string

func (*Outbound) GetFingerprint

func (x *Outbound) GetFingerprint() string

func (*Outbound) GetFlow

func (x *Outbound) GetFlow() string

func (*Outbound) GetHeartbeat

func (x *Outbound) GetHeartbeat() int64

func (*Outbound) GetHost

func (x *Outbound) GetHost() string

func (*Outbound) GetMultiplex

func (x *Outbound) GetMultiplex() string

func (*Outbound) GetName

func (x *Outbound) GetName() string

func (*Outbound) GetPassword

func (x *Outbound) GetPassword() string

func (*Outbound) GetPath

func (x *Outbound) GetPath() string

func (*Outbound) GetPlugin

func (x *Outbound) GetPlugin() string

func (*Outbound) GetPluginOptions

func (x *Outbound) GetPluginOptions() *structpb.Value

func (*Outbound) GetPort

func (x *Outbound) GetPort() int64

func (*Outbound) GetProtocol

func (x *Outbound) GetProtocol() string

func (*Outbound) GetRealityPublicKey

func (x *Outbound) GetRealityPublicKey() string

func (*Outbound) GetRealityShortId

func (x *Outbound) GetRealityShortId() string

func (*Outbound) GetReduceRtt

func (x *Outbound) GetReduceRtt() bool

func (*Outbound) GetRules

func (x *Outbound) GetRules() []string

func (*Outbound) GetSecurity

func (x *Outbound) GetSecurity() string

func (*Outbound) GetServiceName

func (x *Outbound) GetServiceName() string

func (*Outbound) GetSettings

func (x *Outbound) GetSettings() string

func (*Outbound) GetSni

func (x *Outbound) GetSni() string

func (*Outbound) GetSpiderX

func (x *Outbound) GetSpiderX() string

func (*Outbound) GetStreamSettings

func (x *Outbound) GetStreamSettings() string

func (*Outbound) GetTransport

func (x *Outbound) GetTransport() string

func (*Outbound) GetUdpStream

func (x *Outbound) GetUdpStream() bool

func (*Outbound) GetUot

func (x *Outbound) GetUot() bool

func (*Outbound) GetUotVersion

func (x *Outbound) GetUotVersion() int64

func (*Outbound) GetUser

func (x *Outbound) GetUser() string

func (*Outbound) GetUuid

func (x *Outbound) GetUuid() string

func (*Outbound) GetXhttpExtra

func (x *Outbound) GetXhttpExtra() string

func (*Outbound) GetXhttpMode

func (x *Outbound) GetXhttpMode() string

func (*Outbound) ProtoMessage

func (*Outbound) ProtoMessage()

func (*Outbound) ProtoReflect

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

func (*Outbound) Reset

func (x *Outbound) Reset()

func (*Outbound) String

func (x *Outbound) String() string

type PushOnlineUsersRequest

type PushOnlineUsersRequest struct {
	Users []*OnlineUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*PushOnlineUsersRequest) Descriptor deprecated

func (*PushOnlineUsersRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushOnlineUsersRequest.ProtoReflect.Descriptor instead.

func (*PushOnlineUsersRequest) GetUsers

func (x *PushOnlineUsersRequest) GetUsers() []*OnlineUser

func (*PushOnlineUsersRequest) ProtoMessage

func (*PushOnlineUsersRequest) ProtoMessage()

func (*PushOnlineUsersRequest) ProtoReflect

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

func (*PushOnlineUsersRequest) Reset

func (x *PushOnlineUsersRequest) Reset()

func (*PushOnlineUsersRequest) String

func (x *PushOnlineUsersRequest) String() string

type PushServerStatusRequest

type PushServerStatusRequest struct {
	Cpu       float64 `protobuf:"fixed64,1,opt,name=cpu,proto3" json:"cpu,omitempty"`
	Mem       float64 `protobuf:"fixed64,2,opt,name=mem,proto3" json:"mem,omitempty"`
	Disk      float64 `protobuf:"fixed64,3,opt,name=disk,proto3" json:"disk,omitempty"`
	UpdatedAt int64   `protobuf:"varint,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	// contains filtered or unexported fields
}

func (*PushServerStatusRequest) Descriptor deprecated

func (*PushServerStatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushServerStatusRequest.ProtoReflect.Descriptor instead.

func (*PushServerStatusRequest) GetCpu

func (x *PushServerStatusRequest) GetCpu() float64

func (*PushServerStatusRequest) GetDisk

func (x *PushServerStatusRequest) GetDisk() float64

func (*PushServerStatusRequest) GetMem

func (x *PushServerStatusRequest) GetMem() float64

func (*PushServerStatusRequest) GetUpdatedAt

func (x *PushServerStatusRequest) GetUpdatedAt() int64

func (*PushServerStatusRequest) ProtoMessage

func (*PushServerStatusRequest) ProtoMessage()

func (*PushServerStatusRequest) ProtoReflect

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

func (*PushServerStatusRequest) Reset

func (x *PushServerStatusRequest) Reset()

func (*PushServerStatusRequest) String

func (x *PushServerStatusRequest) String() string

type PushUserTrafficRequest

type PushUserTrafficRequest struct {
	Traffic []*UserTraffic `protobuf:"bytes,1,rep,name=traffic,proto3" json:"traffic,omitempty"`
	// contains filtered or unexported fields
}

func (*PushUserTrafficRequest) Descriptor deprecated

func (*PushUserTrafficRequest) Descriptor() ([]byte, []int)

Deprecated: Use PushUserTrafficRequest.ProtoReflect.Descriptor instead.

func (*PushUserTrafficRequest) GetTraffic

func (x *PushUserTrafficRequest) GetTraffic() []*UserTraffic

func (*PushUserTrafficRequest) ProtoMessage

func (*PushUserTrafficRequest) ProtoMessage()

func (*PushUserTrafficRequest) ProtoReflect

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

func (*PushUserTrafficRequest) Reset

func (x *PushUserTrafficRequest) Reset()

func (*PushUserTrafficRequest) String

func (x *PushUserTrafficRequest) String() string

type QueryServerProtocolConfigData

type QueryServerProtocolConfigData struct {
	TrafficReportThreshold int64             `` /* 130-byte string literal not displayed */
	PushInterval           int64             `protobuf:"varint,2,opt,name=push_interval,json=pushInterval,proto3" json:"push_interval,omitempty"`
	PullInterval           int64             `protobuf:"varint,3,opt,name=pull_interval,json=pullInterval,proto3" json:"pull_interval,omitempty"`
	IpStrategy             string            `protobuf:"bytes,4,opt,name=ip_strategy,json=ipStrategy,proto3" json:"ip_strategy,omitempty"`
	Dns                    []*DNSResolver    `protobuf:"bytes,5,rep,name=dns,proto3" json:"dns,omitempty"`
	Block                  []string          `protobuf:"bytes,6,rep,name=block,proto3" json:"block,omitempty"`
	Outbound               []*Outbound       `protobuf:"bytes,7,rep,name=outbound,proto3" json:"outbound,omitempty"`
	Protocols              []*ServerProtocol `protobuf:"bytes,8,rep,name=protocols,proto3" json:"protocols,omitempty"`
	Total                  int64             `protobuf:"varint,9,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

QueryServerProtocolConfigData is the strongly typed data payload returned by GET /v2/server/{server_id}.

func (*QueryServerProtocolConfigData) Descriptor deprecated

func (*QueryServerProtocolConfigData) Descriptor() ([]byte, []int)

Deprecated: Use QueryServerProtocolConfigData.ProtoReflect.Descriptor instead.

func (*QueryServerProtocolConfigData) GetBlock

func (x *QueryServerProtocolConfigData) GetBlock() []string

func (*QueryServerProtocolConfigData) GetDns

func (*QueryServerProtocolConfigData) GetIpStrategy

func (x *QueryServerProtocolConfigData) GetIpStrategy() string

func (*QueryServerProtocolConfigData) GetOutbound

func (x *QueryServerProtocolConfigData) GetOutbound() []*Outbound

func (*QueryServerProtocolConfigData) GetProtocols

func (x *QueryServerProtocolConfigData) GetProtocols() []*ServerProtocol

func (*QueryServerProtocolConfigData) GetPullInterval

func (x *QueryServerProtocolConfigData) GetPullInterval() int64

func (*QueryServerProtocolConfigData) GetPushInterval

func (x *QueryServerProtocolConfigData) GetPushInterval() int64

func (*QueryServerProtocolConfigData) GetTotal

func (x *QueryServerProtocolConfigData) GetTotal() int64

func (*QueryServerProtocolConfigData) GetTrafficReportThreshold

func (x *QueryServerProtocolConfigData) GetTrafficReportThreshold() int64

func (*QueryServerProtocolConfigData) ProtoMessage

func (*QueryServerProtocolConfigData) ProtoMessage()

func (*QueryServerProtocolConfigData) ProtoReflect

func (*QueryServerProtocolConfigData) Reset

func (x *QueryServerProtocolConfigData) Reset()

func (*QueryServerProtocolConfigData) String

type QueryServerProtocolConfigResponse

type QueryServerProtocolConfigResponse struct {
	Code    uint32                         `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string                         `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Data    *QueryServerProtocolConfigData `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryServerProtocolConfigResponse) Descriptor deprecated

func (*QueryServerProtocolConfigResponse) Descriptor() ([]byte, []int)

Deprecated: Use QueryServerProtocolConfigResponse.ProtoReflect.Descriptor instead.

func (*QueryServerProtocolConfigResponse) GetCode

func (*QueryServerProtocolConfigResponse) GetData

func (*QueryServerProtocolConfigResponse) GetMessage

func (x *QueryServerProtocolConfigResponse) GetMessage() string

func (*QueryServerProtocolConfigResponse) ProtoMessage

func (*QueryServerProtocolConfigResponse) ProtoMessage()

func (*QueryServerProtocolConfigResponse) ProtoReflect

func (*QueryServerProtocolConfigResponse) Reset

func (*QueryServerProtocolConfigResponse) String

type Result

type Result struct {
	Code    uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

Result is the common error and no-data response envelope. Its fields match the JSON API's code and msg fields.

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetCode

func (x *Result) GetCode() uint32

func (*Result) GetMessage

func (x *Result) GetMessage() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

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

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type ServerBasic

type ServerBasic struct {
	PushInterval int64 `protobuf:"varint,1,opt,name=push_interval,json=pushInterval,proto3" json:"push_interval,omitempty"`
	PullInterval int64 `protobuf:"varint,2,opt,name=pull_interval,json=pullInterval,proto3" json:"pull_interval,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerBasic) Descriptor deprecated

func (*ServerBasic) Descriptor() ([]byte, []int)

Deprecated: Use ServerBasic.ProtoReflect.Descriptor instead.

func (*ServerBasic) GetPullInterval

func (x *ServerBasic) GetPullInterval() int64

func (*ServerBasic) GetPushInterval

func (x *ServerBasic) GetPushInterval() int64

func (*ServerBasic) ProtoMessage

func (*ServerBasic) ProtoMessage()

func (*ServerBasic) ProtoReflect

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

func (*ServerBasic) Reset

func (x *ServerBasic) Reset()

func (*ServerBasic) String

func (x *ServerBasic) String() string

type ServerConfigData

type ServerConfigData struct {
	Basic    *ServerBasic     `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic,omitempty"`
	Protocol string           `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Config   *structpb.Struct `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

Config is intentionally dynamic because the fields depend on the selected node protocol. It has the same object shape as the JSON config property.

func (*ServerConfigData) Descriptor deprecated

func (*ServerConfigData) Descriptor() ([]byte, []int)

Deprecated: Use ServerConfigData.ProtoReflect.Descriptor instead.

func (*ServerConfigData) GetBasic

func (x *ServerConfigData) GetBasic() *ServerBasic

func (*ServerConfigData) GetConfig

func (x *ServerConfigData) GetConfig() *structpb.Struct

func (*ServerConfigData) GetProtocol

func (x *ServerConfigData) GetProtocol() string

func (*ServerConfigData) ProtoMessage

func (*ServerConfigData) ProtoMessage()

func (*ServerConfigData) ProtoReflect

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

func (*ServerConfigData) Reset

func (x *ServerConfigData) Reset()

func (*ServerConfigData) String

func (x *ServerConfigData) String() string

type ServerProtocol

type ServerProtocol struct {
	Type                    string          `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Port                    uint32          `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Version                 int64           `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	Mode                    string          `protobuf:"bytes,4,opt,name=mode,proto3" json:"mode,omitempty"`
	Enable                  bool            `protobuf:"varint,5,opt,name=enable,proto3" json:"enable,omitempty"`
	Security                string          `protobuf:"bytes,6,opt,name=security,proto3" json:"security,omitempty"`
	Network                 string          `protobuf:"bytes,7,opt,name=network,proto3" json:"network,omitempty"`
	Sni                     string          `protobuf:"bytes,8,opt,name=sni,proto3" json:"sni,omitempty"`
	Alpn                    []string        `protobuf:"bytes,9,rep,name=alpn,proto3" json:"alpn,omitempty"`
	AllowInsecure           bool            `protobuf:"varint,10,opt,name=allow_insecure,json=allowInsecure,proto3" json:"allow_insecure,omitempty"`
	Fingerprint             string          `protobuf:"bytes,11,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
	RealityServerAddr       string          `protobuf:"bytes,12,opt,name=reality_server_addr,json=realityServerAddr,proto3" json:"reality_server_addr,omitempty"`
	RealityServerPort       int64           `protobuf:"varint,13,opt,name=reality_server_port,json=realityServerPort,proto3" json:"reality_server_port,omitempty"`
	RealityPrivateKey       string          `protobuf:"bytes,14,opt,name=reality_private_key,json=realityPrivateKey,proto3" json:"reality_private_key,omitempty"`
	RealityPublicKey        string          `protobuf:"bytes,15,opt,name=reality_public_key,json=realityPublicKey,proto3" json:"reality_public_key,omitempty"`
	RealityShortId          string          `protobuf:"bytes,16,opt,name=reality_short_id,json=realityShortId,proto3" json:"reality_short_id,omitempty"`
	Transport               string          `protobuf:"bytes,17,opt,name=transport,proto3" json:"transport,omitempty"`
	Host                    string          `protobuf:"bytes,18,opt,name=host,proto3" json:"host,omitempty"`
	Path                    string          `protobuf:"bytes,19,opt,name=path,proto3" json:"path,omitempty"`
	ServiceName             string          `protobuf:"bytes,20,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
	Cipher                  string          `protobuf:"bytes,21,opt,name=cipher,proto3" json:"cipher,omitempty"`
	ServerKey               string          `protobuf:"bytes,22,opt,name=server_key,json=serverKey,proto3" json:"server_key,omitempty"`
	Plugin                  string          `protobuf:"bytes,23,opt,name=plugin,proto3" json:"plugin,omitempty"`
	PluginOptions           *structpb.Value `protobuf:"bytes,24,opt,name=plugin_options,json=pluginOptions,proto3" json:"plugin_options,omitempty"`
	Flow                    string          `protobuf:"bytes,25,opt,name=flow,proto3" json:"flow,omitempty"`
	Uot                     bool            `protobuf:"varint,26,opt,name=uot,proto3" json:"uot,omitempty"`
	UotVersion              int64           `protobuf:"varint,27,opt,name=uot_version,json=uotVersion,proto3" json:"uot_version,omitempty"`
	AcceptProxyProtocol     bool            `protobuf:"varint,28,opt,name=accept_proxy_protocol,json=acceptProxyProtocol,proto3" json:"accept_proxy_protocol,omitempty"`
	HopPorts                string          `protobuf:"bytes,29,opt,name=hop_ports,json=hopPorts,proto3" json:"hop_ports,omitempty"`
	HopInterval             int64           `protobuf:"varint,30,opt,name=hop_interval,json=hopInterval,proto3" json:"hop_interval,omitempty"`
	ObfsPassword            string          `protobuf:"bytes,31,opt,name=obfs_password,json=obfsPassword,proto3" json:"obfs_password,omitempty"`
	DisableSni              bool            `protobuf:"varint,32,opt,name=disable_sni,json=disableSni,proto3" json:"disable_sni,omitempty"`
	ReduceRtt               bool            `protobuf:"varint,33,opt,name=reduce_rtt,json=reduceRtt,proto3" json:"reduce_rtt,omitempty"`
	Heartbeat               int64           `protobuf:"varint,34,opt,name=heartbeat,proto3" json:"heartbeat,omitempty"`
	UdpRelayMode            string          `protobuf:"bytes,35,opt,name=udp_relay_mode,json=udpRelayMode,proto3" json:"udp_relay_mode,omitempty"`
	CongestionController    string          `protobuf:"bytes,36,opt,name=congestion_controller,json=congestionController,proto3" json:"congestion_controller,omitempty"`
	QuicCongestionControl   string          `` /* 127-byte string literal not displayed */
	Multiplex               string          `protobuf:"bytes,38,opt,name=multiplex,proto3" json:"multiplex,omitempty"`
	PaddingScheme           string          `protobuf:"bytes,39,opt,name=padding_scheme,json=paddingScheme,proto3" json:"padding_scheme,omitempty"`
	TrafficPattern          string          `protobuf:"bytes,40,opt,name=traffic_pattern,json=trafficPattern,proto3" json:"traffic_pattern,omitempty"`
	UserHintIsMandatory     bool            `protobuf:"varint,41,opt,name=user_hint_is_mandatory,json=userHintIsMandatory,proto3" json:"user_hint_is_mandatory,omitempty"`
	UpMbps                  int64           `protobuf:"varint,42,opt,name=up_mbps,json=upMbps,proto3" json:"up_mbps,omitempty"`
	DownMbps                int64           `protobuf:"varint,43,opt,name=down_mbps,json=downMbps,proto3" json:"down_mbps,omitempty"`
	Obfs                    string          `protobuf:"bytes,44,opt,name=obfs,proto3" json:"obfs,omitempty"`
	SsrProtocol             string          `protobuf:"bytes,45,opt,name=ssr_protocol,json=ssrProtocol,proto3" json:"ssr_protocol,omitempty"`
	ProtocolParam           string          `protobuf:"bytes,46,opt,name=protocol_param,json=protocolParam,proto3" json:"protocol_param,omitempty"`
	ObfsParam               string          `protobuf:"bytes,47,opt,name=obfs_param,json=obfsParam,proto3" json:"obfs_param,omitempty"`
	ObfsHost                string          `protobuf:"bytes,48,opt,name=obfs_host,json=obfsHost,proto3" json:"obfs_host,omitempty"`
	ObfsPath                string          `protobuf:"bytes,49,opt,name=obfs_path,json=obfsPath,proto3" json:"obfs_path,omitempty"`
	XhttpMode               string          `protobuf:"bytes,50,opt,name=xhttp_mode,json=xhttpMode,proto3" json:"xhttp_mode,omitempty"`
	XhttpExtra              string          `protobuf:"bytes,51,opt,name=xhttp_extra,json=xhttpExtra,proto3" json:"xhttp_extra,omitempty"`
	Encryption              string          `protobuf:"bytes,52,opt,name=encryption,proto3" json:"encryption,omitempty"`
	EncryptionMode          string          `protobuf:"bytes,53,opt,name=encryption_mode,json=encryptionMode,proto3" json:"encryption_mode,omitempty"`
	EncryptionRtt           string          `protobuf:"bytes,54,opt,name=encryption_rtt,json=encryptionRtt,proto3" json:"encryption_rtt,omitempty"`
	EncryptionTicket        string          `protobuf:"bytes,55,opt,name=encryption_ticket,json=encryptionTicket,proto3" json:"encryption_ticket,omitempty"`
	EncryptionServerPadding string          `` /* 133-byte string literal not displayed */
	EncryptionPrivateKey    string          `protobuf:"bytes,57,opt,name=encryption_private_key,json=encryptionPrivateKey,proto3" json:"encryption_private_key,omitempty"`
	EncryptionClientPadding string          `` /* 133-byte string literal not displayed */
	EncryptionPassword      string          `protobuf:"bytes,59,opt,name=encryption_password,json=encryptionPassword,proto3" json:"encryption_password,omitempty"`
	EchEnable               bool            `protobuf:"varint,60,opt,name=ech_enable,json=echEnable,proto3" json:"ech_enable,omitempty"`
	EchServerName           string          `protobuf:"bytes,61,opt,name=ech_server_name,json=echServerName,proto3" json:"ech_server_name,omitempty"`
	Ratio                   float64         `protobuf:"fixed64,62,opt,name=ratio,proto3" json:"ratio,omitempty"`
	CertMode                string          `protobuf:"bytes,63,opt,name=cert_mode,json=certMode,proto3" json:"cert_mode,omitempty"`
	CertDnsProvider         string          `protobuf:"bytes,64,opt,name=cert_dns_provider,json=certDnsProvider,proto3" json:"cert_dns_provider,omitempty"`
	CertDnsEnv              string          `protobuf:"bytes,65,opt,name=cert_dns_env,json=certDnsEnv,proto3" json:"cert_dns_env,omitempty"`
	// contains filtered or unexported fields
}

ServerProtocol is PPanel's normalized, flat protocol configuration. The protocol type identifies which fields are consumed by a node runtime; a flat model matches the established PPanel and Star-Node integration contract.

func (*ServerProtocol) Descriptor deprecated

func (*ServerProtocol) Descriptor() ([]byte, []int)

Deprecated: Use ServerProtocol.ProtoReflect.Descriptor instead.

func (*ServerProtocol) GetAcceptProxyProtocol

func (x *ServerProtocol) GetAcceptProxyProtocol() bool

func (*ServerProtocol) GetAllowInsecure

func (x *ServerProtocol) GetAllowInsecure() bool

func (*ServerProtocol) GetAlpn

func (x *ServerProtocol) GetAlpn() []string

func (*ServerProtocol) GetCertDnsEnv

func (x *ServerProtocol) GetCertDnsEnv() string

func (*ServerProtocol) GetCertDnsProvider

func (x *ServerProtocol) GetCertDnsProvider() string

func (*ServerProtocol) GetCertMode

func (x *ServerProtocol) GetCertMode() string

func (*ServerProtocol) GetCipher

func (x *ServerProtocol) GetCipher() string

func (*ServerProtocol) GetCongestionController

func (x *ServerProtocol) GetCongestionController() string

func (*ServerProtocol) GetDisableSni

func (x *ServerProtocol) GetDisableSni() bool

func (*ServerProtocol) GetDownMbps

func (x *ServerProtocol) GetDownMbps() int64

func (*ServerProtocol) GetEchEnable

func (x *ServerProtocol) GetEchEnable() bool

func (*ServerProtocol) GetEchServerName

func (x *ServerProtocol) GetEchServerName() string

func (*ServerProtocol) GetEnable

func (x *ServerProtocol) GetEnable() bool

func (*ServerProtocol) GetEncryption

func (x *ServerProtocol) GetEncryption() string

func (*ServerProtocol) GetEncryptionClientPadding

func (x *ServerProtocol) GetEncryptionClientPadding() string

func (*ServerProtocol) GetEncryptionMode

func (x *ServerProtocol) GetEncryptionMode() string

func (*ServerProtocol) GetEncryptionPassword

func (x *ServerProtocol) GetEncryptionPassword() string

func (*ServerProtocol) GetEncryptionPrivateKey

func (x *ServerProtocol) GetEncryptionPrivateKey() string

func (*ServerProtocol) GetEncryptionRtt

func (x *ServerProtocol) GetEncryptionRtt() string

func (*ServerProtocol) GetEncryptionServerPadding

func (x *ServerProtocol) GetEncryptionServerPadding() string

func (*ServerProtocol) GetEncryptionTicket

func (x *ServerProtocol) GetEncryptionTicket() string

func (*ServerProtocol) GetFingerprint

func (x *ServerProtocol) GetFingerprint() string

func (*ServerProtocol) GetFlow

func (x *ServerProtocol) GetFlow() string

func (*ServerProtocol) GetHeartbeat

func (x *ServerProtocol) GetHeartbeat() int64

func (*ServerProtocol) GetHopInterval

func (x *ServerProtocol) GetHopInterval() int64

func (*ServerProtocol) GetHopPorts

func (x *ServerProtocol) GetHopPorts() string

func (*ServerProtocol) GetHost

func (x *ServerProtocol) GetHost() string

func (*ServerProtocol) GetMode

func (x *ServerProtocol) GetMode() string

func (*ServerProtocol) GetMultiplex

func (x *ServerProtocol) GetMultiplex() string

func (*ServerProtocol) GetNetwork

func (x *ServerProtocol) GetNetwork() string

func (*ServerProtocol) GetObfs

func (x *ServerProtocol) GetObfs() string

func (*ServerProtocol) GetObfsHost

func (x *ServerProtocol) GetObfsHost() string

func (*ServerProtocol) GetObfsParam

func (x *ServerProtocol) GetObfsParam() string

func (*ServerProtocol) GetObfsPassword

func (x *ServerProtocol) GetObfsPassword() string

func (*ServerProtocol) GetObfsPath

func (x *ServerProtocol) GetObfsPath() string

func (*ServerProtocol) GetPaddingScheme

func (x *ServerProtocol) GetPaddingScheme() string

func (*ServerProtocol) GetPath

func (x *ServerProtocol) GetPath() string

func (*ServerProtocol) GetPlugin

func (x *ServerProtocol) GetPlugin() string

func (*ServerProtocol) GetPluginOptions

func (x *ServerProtocol) GetPluginOptions() *structpb.Value

func (*ServerProtocol) GetPort

func (x *ServerProtocol) GetPort() uint32

func (*ServerProtocol) GetProtocolParam

func (x *ServerProtocol) GetProtocolParam() string

func (*ServerProtocol) GetQuicCongestionControl

func (x *ServerProtocol) GetQuicCongestionControl() string

func (*ServerProtocol) GetRatio

func (x *ServerProtocol) GetRatio() float64

func (*ServerProtocol) GetRealityPrivateKey

func (x *ServerProtocol) GetRealityPrivateKey() string

func (*ServerProtocol) GetRealityPublicKey

func (x *ServerProtocol) GetRealityPublicKey() string

func (*ServerProtocol) GetRealityServerAddr

func (x *ServerProtocol) GetRealityServerAddr() string

func (*ServerProtocol) GetRealityServerPort

func (x *ServerProtocol) GetRealityServerPort() int64

func (*ServerProtocol) GetRealityShortId

func (x *ServerProtocol) GetRealityShortId() string

func (*ServerProtocol) GetReduceRtt

func (x *ServerProtocol) GetReduceRtt() bool

func (*ServerProtocol) GetSecurity

func (x *ServerProtocol) GetSecurity() string

func (*ServerProtocol) GetServerKey

func (x *ServerProtocol) GetServerKey() string

func (*ServerProtocol) GetServiceName

func (x *ServerProtocol) GetServiceName() string

func (*ServerProtocol) GetSni

func (x *ServerProtocol) GetSni() string

func (*ServerProtocol) GetSsrProtocol

func (x *ServerProtocol) GetSsrProtocol() string

func (*ServerProtocol) GetTrafficPattern

func (x *ServerProtocol) GetTrafficPattern() string

func (*ServerProtocol) GetTransport

func (x *ServerProtocol) GetTransport() string

func (*ServerProtocol) GetType

func (x *ServerProtocol) GetType() string

func (*ServerProtocol) GetUdpRelayMode

func (x *ServerProtocol) GetUdpRelayMode() string

func (*ServerProtocol) GetUot

func (x *ServerProtocol) GetUot() bool

func (*ServerProtocol) GetUotVersion

func (x *ServerProtocol) GetUotVersion() int64

func (*ServerProtocol) GetUpMbps

func (x *ServerProtocol) GetUpMbps() int64

func (*ServerProtocol) GetUserHintIsMandatory

func (x *ServerProtocol) GetUserHintIsMandatory() bool

func (*ServerProtocol) GetVersion

func (x *ServerProtocol) GetVersion() int64

func (*ServerProtocol) GetXhttpExtra

func (x *ServerProtocol) GetXhttpExtra() string

func (*ServerProtocol) GetXhttpMode

func (x *ServerProtocol) GetXhttpMode() string

func (*ServerProtocol) ProtoMessage

func (*ServerProtocol) ProtoMessage()

func (*ServerProtocol) ProtoReflect

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

func (*ServerProtocol) Reset

func (x *ServerProtocol) Reset()

func (*ServerProtocol) String

func (x *ServerProtocol) String() string

type ServerUser

type ServerUser struct {
	Id          int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Uuid        string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
	SpeedLimit  int64  `protobuf:"varint,3,opt,name=speed_limit,json=speedLimit,proto3" json:"speed_limit,omitempty"`
	DeviceLimit int64  `protobuf:"varint,4,opt,name=device_limit,json=deviceLimit,proto3" json:"device_limit,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerUser) Descriptor deprecated

func (*ServerUser) Descriptor() ([]byte, []int)

Deprecated: Use ServerUser.ProtoReflect.Descriptor instead.

func (*ServerUser) GetDeviceLimit

func (x *ServerUser) GetDeviceLimit() int64

func (*ServerUser) GetId

func (x *ServerUser) GetId() int64

func (*ServerUser) GetSpeedLimit

func (x *ServerUser) GetSpeedLimit() int64

func (*ServerUser) GetUuid

func (x *ServerUser) GetUuid() string

func (*ServerUser) ProtoMessage

func (*ServerUser) ProtoMessage()

func (*ServerUser) ProtoReflect

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

func (*ServerUser) Reset

func (x *ServerUser) Reset()

func (*ServerUser) String

func (x *ServerUser) String() string

type ServerUserListData

type ServerUserListData struct {
	Users []*ServerUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerUserListData) Descriptor deprecated

func (*ServerUserListData) Descriptor() ([]byte, []int)

Deprecated: Use ServerUserListData.ProtoReflect.Descriptor instead.

func (*ServerUserListData) GetUsers

func (x *ServerUserListData) GetUsers() []*ServerUser

func (*ServerUserListData) ProtoMessage

func (*ServerUserListData) ProtoMessage()

func (*ServerUserListData) ProtoReflect

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

func (*ServerUserListData) Reset

func (x *ServerUserListData) Reset()

func (*ServerUserListData) String

func (x *ServerUserListData) String() string

type UserTraffic

type UserTraffic struct {
	UserId   int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Upload   int64 `protobuf:"varint,2,opt,name=upload,proto3" json:"upload,omitempty"`
	Download int64 `protobuf:"varint,3,opt,name=download,proto3" json:"download,omitempty"`
	// contains filtered or unexported fields
}

func (*UserTraffic) Descriptor deprecated

func (*UserTraffic) Descriptor() ([]byte, []int)

Deprecated: Use UserTraffic.ProtoReflect.Descriptor instead.

func (*UserTraffic) GetDownload

func (x *UserTraffic) GetDownload() int64

func (*UserTraffic) GetUpload

func (x *UserTraffic) GetUpload() int64

func (*UserTraffic) GetUserId

func (x *UserTraffic) GetUserId() int64

func (*UserTraffic) ProtoMessage

func (*UserTraffic) ProtoMessage()

func (*UserTraffic) ProtoReflect

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

func (*UserTraffic) Reset

func (x *UserTraffic) Reset()

func (*UserTraffic) String

func (x *UserTraffic) String() string

Jump to

Keyboard shortcuts

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