[server][status]- 优化command executor的代码

This commit is contained in:
zeaslity
2023-02-22 10:17:20 +08:00
parent 86b59181e5
commit 24033bacc1
5 changed files with 95 additions and 25 deletions

View File

@@ -14,7 +14,9 @@ public class ProxyNodeSet {
public static ProxyNode phoenix2;
public static ProxyNode london2;
// 开发使用
public static ProxyNode chengduAgent;
public static ProxyNode tokyoDev;
static {
@@ -92,7 +94,7 @@ public class ProxyNodeSet {
.agentName("London-amd64-02")
.build();
chengduAgent = ProxyNode
tokyoDev = ProxyNode
.builder()
.location("Tokyo")
.num(99)
@@ -103,6 +105,18 @@ public class ProxyNodeSet {
.agentTopicName("Tokyo-amd64-07-f66a41")
.build();
chengduAgent = ProxyNode
.builder()
.location("Chengdu")
.num(90)
.publicIPv4("183.220.9.13")
.proxyNodeType(ProxyNodeType.EXTERNAL)
.name("chengdu-agent")
.agentName("Chengdu-amd64-77")
.agentTopicName("Chengdu-amd64-77-remote")
.build();
ProxyNodeMap.put(chengdu.getNum(), chengdu);
ProxyNodeMap.put(hongkong.getNum(), hongkong);
ProxyNodeMap.put(shanghai.getNum(), shanghai);
@@ -111,6 +125,7 @@ public class ProxyNodeSet {
ProxyNodeMap.put(phoenix2.getNum(), phoenix2);
ProxyNodeMap.put(london2.getNum(), london2);
ProxyNodeMap.put(chengduAgent.getNum(), chengduAgent);
ProxyNodeMap.put(tokyoDev.getNum(), tokyoDev);
}

View File

@@ -41,7 +41,7 @@ public class XrayConfigDistribute {
static {
ArrayList<String> zero = new ArrayList<>(
/*ArrayList<String> zero = new ArrayList<>(
List.of(
"if",
"[",
@@ -56,7 +56,7 @@ public class XrayConfigDistribute {
";",
"fi"
)
);
);*/
ArrayList<String> first = new ArrayList<>(
@@ -92,13 +92,12 @@ public class XrayConfigDistribute {
"|",
"grep",
"-c",
"active,(running)"
"active (running)"
)
);
updateXrayCommandList.add(zero);
updateXrayCommandList.add(first);
updateXrayCommandList.add(second);
updateXrayCommandList.add(third);
@@ -166,10 +165,10 @@ public class XrayConfigDistribute {
}
// 修改命令中的时间
String s = updateXrayCommandList
.get(1)
.get(0)
.get(2);
updateXrayCommandList
.get(1)
.get(0)
.set(
2,
s.replace(
@@ -180,7 +179,7 @@ public class XrayConfigDistribute {
// 修改命令中的下载url
updateXrayCommandList
.get(2)
.get(1)
.set(
1,
realUrl