Documentation
¶
Index ¶
- Constants
- type BaseConfig
- type Client
- func (c *Client) Debug()
- func (c *Client) GetNodeInfo() (node *NodeInfo, err error)
- func (c *Client) GetUserList() (UserList []UserInfo, err error)
- func (c *Client) ReportNodeOnlineUsers(data *map[int][]string, reportOnline *map[int]int) error
- func (c *Client) ReportUserTraffic(userTraffic []UserTraffic) error
- type CommonNode
- type Hysteria2Node
- type HysteriaNode
- type NodeInfo
- type OnlineUser
- type RawDNS
- type RealityConfig
- type Route
- type Rules
- type ShadowsocksNode
- type TlsSettings
- type TrojanNode
- type UserInfo
- type UserListBody
- type UserTraffic
- type VAllssNode
Constants ¶
View Source
const ( None = 0 Tls = 1 Reality = 2 )
Security type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseConfig ¶
type Client ¶
type Client struct { APIHost string Token string NodeType string NodeId int LastReportOnline map[int]int // contains filtered or unexported fields }
func (*Client) GetNodeInfo ¶
func (*Client) GetUserList ¶
GetUserList will pull user form sspanel
func (*Client) ReportNodeOnlineUsers ¶
func (*Client) ReportUserTraffic ¶
func (c *Client) ReportUserTraffic(userTraffic []UserTraffic) error
ReportUserTraffic reports the user traffic
type CommonNode ¶
type CommonNode struct { Host string `json:"host"` ServerPort int `json:"server_port"` ServerName string `json:"server_name"` Routes []Route `json:"routes"` BaseConfig *BaseConfig `json:"base_config"` }
type Hysteria2Node ¶
type Hysteria2Node struct { CommonNode UpMbps int `json:"up_mbps"` DownMbps int `json:"down_mbps"` ObfsType string `json:"obfs"` ObfsPassword string `json:"obfs-password"` }
type HysteriaNode ¶
type HysteriaNode struct { CommonNode UpMbps int `json:"up_mbps"` DownMbps int `json:"down_mbps"` Obfs string `json:"obfs"` }
type NodeInfo ¶
type NodeInfo struct { Id int Type string Security int PushInterval time.Duration PullInterval time.Duration RawDNS RawDNS Rules Rules // origin VAllss *VAllssNode Shadowsocks *ShadowsocksNode Trojan *TrojanNode Hysteria *HysteriaNode Hysteria2 *Hysteria2Node Common *CommonNode }
type OnlineUser ¶
type RealityConfig ¶
type ShadowsocksNode ¶
type ShadowsocksNode struct { CommonNode Cipher string `json:"cipher"` ServerKey string `json:"server_key"` }
type TlsSettings ¶
type TrojanNode ¶
type TrojanNode struct { CommonNode Network string `json:"network"` NetworkSettings json.RawMessage `json:"networkSettings"` }
type UserListBody ¶
type UserListBody struct { //Msg string `json:"msg"` Users []UserInfo `json:"users"` }
type UserTraffic ¶
type VAllssNode ¶
type VAllssNode struct { CommonNode Tls int `json:"tls"` TlsSettings TlsSettings `json:"tls_settings"` TlsSettingsBack *TlsSettings `json:"tlsSettings"` Network string `json:"network"` NetworkSettings json.RawMessage `json:"network_settings"` NetworkSettingsBack json.RawMessage `json:"networkSettings"` ServerName string `json:"server_name"` // vless only Flow string `json:"flow"` RealityConfig RealityConfig `json:"-"` }
VAllssNode is vmess and vless node info
Click to show internal directories.
Click to hide internal directories.