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) ParseSSNodeResponse(nodeInfoResponse *simplejson.Json) (*api.NodeInfo, error)
- func (c *APIClient) ParseTrojanNodeResponse(nodeInfoResponse *simplejson.Json) (*api.NodeInfo, error)
- func (c *APIClient) ParseV2rayNodeResponse(nodeInfoResponse *simplejson.Json) (*api.NodeInfo, error)
- func (c *APIClient) ReportIllegal(detectResultList *[]api.DetectResult) error
- func (c *APIClient) ReportNodeOnlineUsers(onlineUserList *[]api.OnlineUser) error
- func (c *APIClient) ReportNodeStatus(nodeStatus *api.NodeStatus) (err error)
- func (c *APIClient) ReportUserTraffic(userTraffic *[]api.UserTraffic) error
- type NodeOnline
- type NodeStatus
- type REALITYConfig
- type UserTraffic
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 ConfigResp *simplejson.Json // contains filtered or unexported fields }
APIClient create an api client to the panel.
func (*APIClient) Describe ¶
func (c *APIClient) Describe() api.ClientInfo
Describe return a description of the client
func (*APIClient) GetNodeInfo ¶
GetNodeInfo will pull NodeInfo Config from panel
func (*APIClient) GetNodeRule ¶
func (c *APIClient) GetNodeRule() (*[]api.DetectRule, error)
GetNodeRule implements the API interface
func (*APIClient) GetUserList ¶
GetUserList will pull user form panel
func (*APIClient) ParseSSNodeResponse ¶
ParseSSNodeResponse parse the response for the given nodeInfo format
func (*APIClient) ParseTrojanNodeResponse ¶
func (c *APIClient) ParseTrojanNodeResponse(nodeInfoResponse *simplejson.Json) (*api.NodeInfo, error)
ParseTrojanNodeResponse parse the response for the given nodeInfo format
func (*APIClient) ParseV2rayNodeResponse ¶
func (c *APIClient) ParseV2rayNodeResponse(nodeInfoResponse *simplejson.Json) (*api.NodeInfo, error)
ParseV2rayNodeResponse parse the response for the given nodeInfo format
func (*APIClient) ReportIllegal ¶
func (c *APIClient) ReportIllegal(detectResultList *[]api.DetectResult) error
ReportIllegal implements the API interface
func (*APIClient) ReportNodeOnlineUsers ¶
func (c *APIClient) ReportNodeOnlineUsers(onlineUserList *[]api.OnlineUser) error
ReportNodeOnlineUsers implements the API interface
func (*APIClient) ReportNodeStatus ¶
func (c *APIClient) ReportNodeStatus(nodeStatus *api.NodeStatus) (err error)
ReportNodeStatus implements the API interface
func (*APIClient) ReportUserTraffic ¶
func (c *APIClient) ReportUserTraffic(userTraffic *[]api.UserTraffic) error
ReportUserTraffic reports the user traffic
type NodeOnline ¶
type NodeStatus ¶
type REALITYConfig ¶
type REALITYConfig struct { Dest string `json:"dest,omitempty"` ProxyProtocolVer uint64 `json:"proxy_protocol_ver,omitempty"` ServerNames []string `json:"server_names,omitempty"` PrivateKey string `json:"private_key,omitempty"` MinClientVer string `json:"min_client_ver,omitempty"` MaxClientVer string `json:"max_client_ver,omitempty"` MaxTimeDiff uint64 `json:"max_time_diff,omitempty"` ShortIds []string `json:"short_ids,omitempty"` }
type UserTraffic ¶
Click to show internal directories.
Click to hide internal directories.