Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormhsanaei <ho3ein.sanaei@gmail.com>2024-06-18 15:24:09 +0300
committermhsanaei <ho3ein.sanaei@gmail.com>2024-06-18 15:37:44 +0300
commit5d007435ab88e019b313f89b7baed3be6c96a295 (patch)
treef3cd42b7a90158d5c9415754a20bd16f684cd581 /web/assets/js/model
parent9c05aa514b2738310352ebb9dcb6fb98cad50d76 (diff)
some changes
undo secret key gen for wireguard
Diffstat (limited to 'web/assets/js/model')
-rw-r--r--web/assets/js/model/outbound.js1
-rw-r--r--web/assets/js/model/xray.js10
2 files changed, 6 insertions, 5 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index ee954fc1..9b9a8146 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -1084,6 +1084,7 @@ Outbound.WireguardSettings = class extends CommonClass {
super();
this.mtu = mtu;
this.secretKey = secretKey;
+ this.pubKey = secretKey.length>0 ? Wireguard.generateKeypair(secretKey).publicKey : '';
this.address = address instanceof Array ? address.join(',') : address;
this.workers = workers;
this.domainStrategy = domainStrategy;
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index acbe4034..7a8b25b9 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1391,7 +1391,7 @@ class Inbound extends XrayCommonClass {
type: 'none',
tls: security,
};
- let network = this.stream.network;
+ const network = this.stream.network;
if (network === 'tcp') {
const tcp = this.stream.tcp;
obj.type = tcp.type;
@@ -1402,11 +1402,11 @@ class Inbound extends XrayCommonClass {
if (host) obj.host = host;
}
} else if (network === 'kcp') {
- let kcp = this.stream.kcp;
+ const kcp = this.stream.kcp;
obj.type = kcp.type;
obj.path = kcp.seed;
} else if (network === 'ws') {
- let ws = this.stream.ws;
+ const ws = this.stream.ws;
obj.path = ws.path;
obj.host = ws.host?.length>0 ? ws.host : this.getHeader(ws, 'host');
} else if (network === 'http') {
@@ -1424,11 +1424,11 @@ class Inbound extends XrayCommonClass {
obj.type = 'multi'
}
} else if (network === 'httpupgrade') {
- let httpupgrade = this.stream.httpupgrade;
+ const httpupgrade = this.stream.httpupgrade;
obj.path = httpupgrade.path;
obj.host = httpupgrade.host?.length>0 ? httpupgrade.host : this.getHeader(httpupgrade, 'host');
} else if (network === 'splithttp') {
- let splithttp = this.stream.splithttp;
+ const splithttp = this.stream.splithttp;
obj.path = splithttp.path;
obj.host = splithttp.host?.length>0 ? splithttp.host : this.getHeader(splithttp, 'host');
}