Skip to content

Commit 2d681ea

Browse files
committed
fix: spelling error "alert" -> "alter"
1 parent ca9ce04 commit 2d681ea

17 files changed

Lines changed: 27 additions & 30 deletions

File tree

cmd/Air-Universe/cfg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ var (
2020
},
2121
Proxy: structures.Proxy{
2222
Type: "xray",
23-
AlertID: 1,
23+
AlterID: 1,
2424
AutoGenerate: true,
2525
InTags: []string{},
2626
APIAddress: "127.0.0.1",

configs/Air-Universe_json/Air-Universe_full.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"proxy": {
1414
"type": "xray",
15-
"alert_id": 1,
15+
"alter_id": 1,
1616
"auto_generate": true,
1717
"in_tags": [
1818
"p0",

docs/Doc_cn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Proxy-core(V2Ray 或 Xray)的API通信配置等
110110
```json
111111
{
112112
"type": "type of proxy",
113-
"alert_id": 1,
113+
"alter_id": 1,
114114
"auto_generate": true,
115115
"in_tags": [
116116
"p0",
@@ -134,9 +134,9 @@ Proxy-core(V2Ray 或 Xray)的API通信配置等
134134
- `v2ray` - [V2Ray-core](https://github.com/v2fly/v2ray-core)
135135
- `xray` - [Xray](https://github.com/XTLS/Xray-core)
136136

137-
> `alert_id`: string
137+
> `alter_id`: string
138138
139-
手动配置入站代理时分配给 VMess 用户的alert_id
139+
手动配置入站代理时分配给 VMess 用户的alter_id
140140

141141
> `auto_generate`: bool
142142
@@ -212,7 +212,7 @@ HTTP(S) 请求超时时间(秒)
212212
},
213213
"proxy": {
214214
"type": "xray",
215-
"alert_id": 1,
215+
"alter_id": 1,
216216
"auto_generate": true,
217217
"force_close_tls": false,
218218
"in_tags": [

docs/Doc_en.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The first element of `proxy.in_tags` will get users from the first element of `p
8989
```json
9090
{
9191
"type": "type of proxy",
92-
"alert_id": 1,
92+
"alter_id": 1,
9393
"auto_generate": true,
9494
"in_tags": [
9595
"p0",
@@ -110,9 +110,9 @@ The first element of `proxy.in_tags` will get users from the first element of `p
110110
Which proxy you are using. Now it supports
111111
- `v2ray` - [V2Ray-core](https://github.com/v2fly/v2ray-core)
112112

113-
> `alert_id`: string
113+
> `alter_id`: string
114114
115-
V2Ray AlertId you want to set for every user. Please make sure it is equal to your panel setting.
115+
V2Ray AlterId you want to set for every user. Please make sure it is equal to your panel setting.
116116

117117
> `auto_generate`: bool
118118

pkg/IPControl/getAliveIP_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var (
1515
},
1616
Proxy: structures.Proxy{
1717
Type: "v2ray",
18-
AlertID: 1,
18+
AlterID: 1,
1919
InTags: []string{"p0"},
2020
APIAddress: "127.0.0.1",
2121
APIPort: 10085,

pkg/SSPanelAPI/SSPanelAPI_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ var (
1717
},
1818
Proxy: structures.Proxy{
1919
Type: "xray",
20-
AlertID: 1,
20+
AlterID: 1,
2121
AutoGenerate: true,
2222
InTags: []string{"p0"},
2323
APIAddress: "127.0.0.1",
@@ -30,9 +30,6 @@ var (
3030
Timeout: 5,
3131
},
3232
}
33-
nodeInfo = &structures.NodeInfo{
34-
Id: 44,
35-
}
3633
)
3734

3835
func TestPostTraffic(t *testing.T) {

pkg/SSPanelAPI/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ func (sspCtl *SspController) Init(cfg *structures.BaseConfig, idIndex uint32) (e
1414
sspCtl.Key = cfg.Panel.Key
1515
sspCtl.NodeInfo.Id = cfg.Panel.NodeIDs[idIndex]
1616
sspCtl.NodeInfo.IdIndex = idIndex
17-
// 预先写入,如果没有获取到节点配置则使用配置文件的alertID
18-
sspCtl.NodeInfo.AlertID = cfg.Proxy.AlertID
17+
// 预先写入,如果没有获取到节点配置则使用配置文件的alterID
18+
sspCtl.NodeInfo.AlterID = cfg.Proxy.AlterID
1919
sspCtl.NodeInfo.Tag = cfg.Proxy.InTags[idIndex]
2020
sspCtl.NodeInfo.Cert = cfg.Proxy.Cert
2121

pkg/SSPanelAPI/node.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
/*
16-
[url, port, alertId, isTLS, transportMode] (.*?)(?=;)
16+
[url, port, alterId, isTLS, transportMode] (.*?)(?=;)
1717
path (?<=path=).*(?=\|)|(?<=path=).*
1818
host (?<=host=).*(?=\|)|(?<=host=).*
1919
*/
@@ -87,7 +87,7 @@ func getNodeInfo(node *SspController, closeTLS bool) (err error) {
8787
}
8888

8989
/*
90-
[url, port, alertId, isTLS, transportMode] (^|(?<=;))([^;]*)(?=;)
90+
[url, port, alterId, isTLS, transportMode] (^|(?<=;))([^;]*)(?=;)
9191
path (?<=path=).*?(?=\|)|(?<=path=).*
9292
host (?<=host=).*?(?=\|)|(?<=host=).*
9393
*/
@@ -119,7 +119,7 @@ func parseVmessRawInfo(node *structures.NodeInfo, closeTLS bool) (err error) {
119119
} else {
120120
node.ListenPort, _ = String2Uint32(mInsidePort.String())
121121
}
122-
node.AlertID, _ = String2Uint32(basicInfoArray[2])
122+
node.AlterID, _ = String2Uint32(basicInfoArray[2])
123123

124124
node.EnableTLS = false
125125
for _, transM := range []int{3, 4} {

pkg/SSPanelAPI/user.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func getUser(node *SspController) (userList *[]structures.UserInfo, err error) {
4848
user.Id = uint32(rtn.Get("data").GetIndex(u).Get("id").MustInt())
4949
user.Uuid = rtn.Get("data").GetIndex(u).Get("uuid").MustString()
5050
user.Password = rtn.Get("data").GetIndex(u).Get("passwd").MustString()
51-
user.AlertId = node.NodeInfo.AlertID
51+
user.AlterId = node.NodeInfo.AlterID
5252
user.Level = 0
5353
user.InTag = node.NodeInfo.Tag
5454
user.Tag = fmt.Sprintf("%s-%s", strconv.FormatUint(uint64(user.Id), 10), user.InTag)

pkg/V2boardAPI/init.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func (v2bCtl *V2bController) Init(cfg *structures.BaseConfig, idIndex uint32) (e
1818
v2bCtl.Key = cfg.Panel.Key
1919
v2bCtl.NodeInfo.Id = cfg.Panel.NodeIDs[idIndex]
2020
v2bCtl.NodeInfo.IdIndex = idIndex
21-
// 预先写入,如果没有获取到节点配置则使用配置文件的alertID
22-
v2bCtl.NodeInfo.AlertID = cfg.Proxy.AlertID
21+
// 预先写入,如果没有获取到节点配置则使用配置文件的alterID
22+
v2bCtl.NodeInfo.AlterID = cfg.Proxy.AlterID
2323
v2bCtl.NodeInfo.Tag = cfg.Proxy.InTags[idIndex]
2424
v2bCtl.NodeInfo.Cert = cfg.Proxy.Cert
2525
// Not force

0 commit comments

Comments
 (0)