Skip to content

Commit de2e991

Browse files
committed
update to 0.7.0
add more new function
1 parent ec1c8bd commit de2e991

File tree

15 files changed

+297
-226
lines changed

15 files changed

+297
-226
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ jobs:
139139
cp ${GITHUB_WORKSPACE}/README.md ./build_assets/README.md
140140
cp ${GITHUB_WORKSPACE}/LICENSE ./build_assets/LICENSE
141141
cp ${GITHUB_WORKSPACE}/main/dns.json ./build_assets/dns.json
142+
cp ${GITHUB_WORKSPACE}/main/route.json ./build_assets/route.json
143+
cp ${GITHUB_WORKSPACE}/main/custom_outbound.json ./build_assets/custom_outbound.json
142144
cp ${GITHUB_WORKSPACE}/main/rulelist ./build_assets/rulelist
143145
cp ${GITHUB_WORKSPACE}/main/config.yml.example ./build_assets/config.yml
144146
LIST=('geoip geoip geoip' 'domain-list-community dlc geosite')

api/apimodel.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package api
22

3+
import "encoding/json"
4+
35
// API config
46
type Config struct {
57
APIHost string `mapstructure:"ApiHost"`
@@ -37,7 +39,7 @@ type NodeInfo struct {
3739
EnableVless bool
3840
CypherMethod string
3941
ServiceName string
40-
HeaderType string
42+
Header json.RawMessage
4143
}
4244

4345
type UserInfo struct {

api/pmpanel/model.go

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,27 @@ import "encoding/json"
44

55
// NodeInfoResponse is the response of node
66
type 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
1923
type 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
4437
type 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
6157
type 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

6764
type RuleItem struct {

0 commit comments

Comments
 (0)