Documentation ¶
Index ¶
- type APIClient
- func (c *APIClient) Debug()
- func (c *APIClient) Describe() api.ClientInfo
- func (c *APIClient) GetNodeInfo() (nodeInfo *api.NodeInfo, err error)
- func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error)
- func (c *APIClient) GetUserList() (UserList *[]api.UserInfo, err error)
- func (c *APIClient) ParseNodeInfo(nodeInfoResponse *Server) (*api.NodeInfo, error)
- func (c *APIClient) ParseUserListResponse(userInfoResponse *[]User) (*[]api.UserInfo, error)
- func (*APIClient) ReportIllegal(detectResultList *[]api.DetectResult) (err error)
- func (c *APIClient) ReportNodeOnlineUsers(onlineUserList *[]api.OnlineUser) error
- func (*APIClient) ReportNodeStatus(nodeStatus *api.NodeStatus) (err error)
- func (c *APIClient) ReportUserTraffic(userTraffic *[]api.UserTraffic) error
- type GrpcSettigns
- type OnlineUser
- type PostData
- type RealitySettings
- type Response
- type Server
- type TcpSettings
- type User
- type UserTraffic
- type WsSettings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIClient ¶
type APIClient struct { APIHost string NodeID int Key string NodeType string EnableVless bool VlessFlow string SpeedLimit float64 DeviceLimit int LocalRuleList []api.DetectRule LastReportOnline map[int]int // contains filtered or unexported fields }
func (*APIClient) Describe ¶
func (c *APIClient) Describe() api.ClientInfo
Describe return a description of the client
func (*APIClient) GetNodeInfo ¶
func (*APIClient) GetNodeRule ¶
func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error)
GetNodeRule implements api.API.
func (*APIClient) GetUserList ¶
func (*APIClient) ParseNodeInfo ¶
func (*APIClient) ParseUserListResponse ¶
func (*APIClient) ReportIllegal ¶
func (*APIClient) ReportIllegal(detectResultList *[]api.DetectResult) (err error)
ReportIllegal implements api.API.
func (*APIClient) ReportNodeOnlineUsers ¶
func (c *APIClient) ReportNodeOnlineUsers(onlineUserList *[]api.OnlineUser) error
func (*APIClient) ReportNodeStatus ¶
func (*APIClient) ReportNodeStatus(nodeStatus *api.NodeStatus) (err error)
ReportNodeStatus implements api.API.
func (*APIClient) ReportUserTraffic ¶
func (c *APIClient) ReportUserTraffic(userTraffic *[]api.UserTraffic) error
type GrpcSettigns ¶
type GrpcSettigns struct {
ServiceName string `json:"serviceName"`
}
type OnlineUser ¶
type RealitySettings ¶
type RealitySettings struct { Show bool `json:"show"` Dest string `json:"dest"` Xver uint64 `json:"xver"` ServerNames []string `json:"serverNames"` PrivateKey string `json:"privateKey"` MinClientVer string `json:"minClientVer"` MaxClientVer string `json:"maxClientVer"` MaxTimeDiff uint64 `json:"maxTimeDiff"` ProxyProtocolVer uint64 `json:"proxyProtocolVer"` ShortIds []string `json:"shortIds"` }
type Response ¶
type Response struct { StatusCode int `json:"statusCode"` Datas json.RawMessage `json:"datas"` }
type Server ¶
type Server struct { Port int `json:"serverPort"` Network string `json:"network"` Method string `json:"method"` Security string `json:"security"` Flow string `json:"flow"` WsSettings json.RawMessage `json:"wsSettings"` RealitySettings json.RawMessage `json:"realitySettings"` GrpcSettings json.RawMessage `json:"grpcSettings"` TcpSettings json.RawMessage `json:"tcpSettings"` }
type TcpSettings ¶
type TcpSettings struct {
Header json.RawMessage `json:"header"`
}
type UserTraffic ¶
type UserTraffic struct { UID int `json:"userId"` Upload int64 `json:"u"` Download int64 `json:"d"` }
UserTraffic is the data structure of traffic
type WsSettings ¶
Click to show internal directories.
Click to hide internal directories.