@@ -4,34 +4,27 @@ import "encoding/json"
44
55// NodeInfoResponse is the response of node
66type NodeInfoResponse struct {
7- Group int `json:"node_group"`
8- Class int `json:"node_class"`
9- SpeedLimit float64 `json:"node_speedlimit"`
7+ Class int `json:"clazz"`
8+ SpeedLimit float64 `json:"speedlimit"`
109 Method string `json:"method"`
11- TrafficRate float64 `json:"traffic_rate"`
12- MuOnly int `json:"mu_only"`
13- Sort int `json:"sort"`
14- RawServerString string `json:"server"`
15- Type string `json:"type"`
10+ TrafficRate float64 `json:"trafficRate"`
11+ RawServerString string `json:"outServer"`
12+ Port int `json:"outPort"`
13+ AlterId int `json:"alterId"`
14+ Network string `json:"network"`
15+ Security string `json:"security"`
16+ Host string `json:"host"`
17+ Path string `json:"path"`
18+ Grpc bool `json:"grpc"`
19+ Sni string `json:sni`
1620}
1721
1822// UserResponse is the response of user
1923type UserResponse struct {
20- ID int `json:"id"`
21- Email string `json:"email"`
22- Passwd string `json:"passwd"`
23- Port int `json:"port"`
24- Method string `json:"method"`
25- SpeedLimit float64 `json:"node_speedlimit"`
26- DeviceLimit int `json:"node_connector"`
27- Protocol string `json:"protocol"`
28- ProtocolParam string `json:"protocol_param"`
29- Obfs string `json:"obfs"`
30- ObfsParam string `json:"obfs_param"`
31- ForbiddenIP string `json:"forbidden_ip"`
32- ForbiddenPort string `json:"forbidden_port"`
33- UUID string `json:"uuid"`
34- MultiUser int `json:"is_multi_user"`
24+ ID int `json:"id"`
25+ Passwd string `json:"passwd"`
26+ SpeedLimit float64 `json:"speedlimit"`
27+ DeviceLimit int `json:"connector"`
3528}
3629
3730// Response is the common response
@@ -42,7 +35,10 @@ type Response struct {
4235
4336// PostData is the data structure of post data
4437type PostData struct {
45- Data interface {} `json:"data"`
38+ Type string `json:"type"`
39+ NodeId int `json:"nodeId"`
40+ Users interface {} `json:"users"`
41+ Onlines interface {} `json:"onlines"`
4642}
4743
4844// SystemLoad is the data structure of systemload
@@ -59,9 +55,10 @@ type OnlineUser struct {
5955
6056// UserTraffic is the data structure of traffic
6157type UserTraffic struct {
62- UID int `json:"user_id"`
63- Upload int64 `json:"u"`
64- Download int64 `json:"d"`
58+ UID int `json:"id"`
59+ Upload int64 `json:"up"`
60+ Download int64 `json:"down"`
61+ Ip string `json:"ip"`
6562}
6663
6764type RuleItem struct {
0 commit comments