|
| 1 | +package proxypanel |
| 2 | + |
| 3 | +import "encoding/json" |
| 4 | + |
| 5 | +type Response struct { |
| 6 | + Status string `json:"status"` |
| 7 | + Code int `json:"code"` |
| 8 | + Data json.RawMessage `json:"data"` |
| 9 | + Message string `json:"message"` |
| 10 | +} |
| 11 | + |
| 12 | +type V2rayNodeInfo struct { |
| 13 | + ID int `json:"id"` |
| 14 | + IsUDP bool `json:"is_udp"` |
| 15 | + SpeedLimit uint64 `json:"speed_limit"` |
| 16 | + ClientLimit int `json:"client_limit"` |
| 17 | + PushPort int `json:"push_port"` |
| 18 | + Secret string `json:"secret"` |
| 19 | + Key string `json:"key"` |
| 20 | + Cert string `json:"pem"` |
| 21 | + V2License string `json:"v2_license"` |
| 22 | + V2AlterID int `json:"v2_alter_id"` |
| 23 | + V2Port int `json:"v2_port"` |
| 24 | + V2Method string `json:"v2_method"` |
| 25 | + V2Net string `json:"v2_net"` |
| 26 | + V2Type string `json:"v2_type"` |
| 27 | + V2Host string `json:"v2_host"` |
| 28 | + V2Path string `json:"v2_path"` |
| 29 | + V2TLS bool `json:"v2_tls"` |
| 30 | + V2Cdn bool `json:"v2_cdn"` |
| 31 | + V2TLSProvider string `json:"v2_tls_provider"` |
| 32 | + RedirectUrl string `json:"redirect_url"` |
| 33 | +} |
| 34 | + |
| 35 | +type ShadowsocksNodeInfo struct { |
| 36 | + ID int `json:"id"` |
| 37 | + IsUDP int `json:"is_udp"` |
| 38 | + SpeedLimit uint64 `json:"speed_limit"` |
| 39 | + ClientLimit int `json:"client_limit"` |
| 40 | + PushPort int `json:"push_port"` |
| 41 | + Method string `json:"method"` |
| 42 | + Protocol string `json:"protocol"` |
| 43 | + Obfs string `json:"obfs"` |
| 44 | + Obfs_param string `json:"obfs_param"` |
| 45 | + Single int `json:"sinlge"` |
| 46 | + Port string `json:"port"` |
| 47 | + Passwd string `json:"Passwd"` |
| 48 | +} |
| 49 | + |
| 50 | +type TrojanNodeInfo struct { |
| 51 | + ID int `json:"id"` |
| 52 | + IsUDP bool `json:"is_udp"` |
| 53 | + SpeedLimit uint64 `json:"speed_limit"` |
| 54 | + ClientLimit int `json:"client_limit"` |
| 55 | + PushPort int `json:"push_port"` |
| 56 | + TrojanPort int `json:"trojan_port"` |
| 57 | +} |
| 58 | + |
| 59 | +// Node status report |
| 60 | +type NodeStatus struct { |
| 61 | + CPU string `json:"cpu"` |
| 62 | + Mem string `json:"mem"` |
| 63 | + Net string `json:"net"` |
| 64 | + Disk string `json:"disk"` |
| 65 | + Uptime int `json:"uptime"` |
| 66 | +} |
| 67 | + |
| 68 | +type NodeOnline struct { |
| 69 | + UID int `json:"uid"` |
| 70 | + IP string `json:"ip"` |
| 71 | +} |
| 72 | + |
| 73 | +type VMessUser struct { |
| 74 | + UID int `json:"uid"` |
| 75 | + VmessUID string `json:"vmess_uid"` |
| 76 | + SpeedLimit uint64 `json:"speed_limit"` |
| 77 | +} |
| 78 | + |
| 79 | +type TrojanUser struct { |
| 80 | + UID int `json:"uid"` |
| 81 | + Password string `json:"password"` |
| 82 | + SpeedLimit uint64 `json:"speed_limit"` |
| 83 | +} |
| 84 | + |
| 85 | +type SSUser struct { |
| 86 | + UID int `json:"uid"` |
| 87 | + Password string `json:"assword"` |
| 88 | + Method string `json:"method"` |
| 89 | + SpeedLimit uint64 `json:"speed_limit"` |
| 90 | +} |
| 91 | + |
| 92 | +type UserTraffic struct { |
| 93 | + UID int `json:"uid"` |
| 94 | + Upload int64 `json:"upload"` |
| 95 | + Download int64 `json:"download"` |
| 96 | +} |
| 97 | + |
| 98 | +type NodeRule struct { |
| 99 | + Mode string `json:"mode"` |
| 100 | + Rules []NodeRuleItem `json:"rules"` |
| 101 | +} |
| 102 | + |
| 103 | +type NodeRuleItem struct { |
| 104 | + ID int `json:"id"` |
| 105 | + Type string `json:"type"` |
| 106 | + Pattern string `json:"pattern"` |
| 107 | +} |
| 108 | + |
| 109 | +// IllegalReport |
| 110 | +type IllegalReport struct { |
| 111 | + UID int `json:"uid"` |
| 112 | + RuleID int `json:"rule_id"` |
| 113 | + Reason string `json:"reason"` |
| 114 | +} |
| 115 | + |
| 116 | +type Certificate struct { |
| 117 | + Key string `json:"key"` |
| 118 | + Pem string `json:"pem"` |
| 119 | +} |
0 commit comments