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
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/assets/js/model/xray.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 12857d64..64931758 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -1358,7 +1358,7 @@ class Inbound extends XrayCommonClass {
}
}
- if (this.xtls) {
+ else if (this.xtls) {
params.set("security", "xtls");
params.set("alpn", this.stream.xtls.alpn);
if(this.stream.xtls.settings.allowInsecure){
@@ -1373,7 +1373,7 @@ class Inbound extends XrayCommonClass {
params.set("flow", this.settings.vlesses[clientIndex].flow);
}
- if (this.reality) {
+ else if (this.reality) {
params.set("security", "reality");
params.set("fp", this.stream.reality.settings.fingerprint);
params.set("pbk", this.stream.reality.settings.publicKey);
@@ -1394,6 +1394,10 @@ class Inbound extends XrayCommonClass {
}
}
+ else {
+ params.set("security", "none");
+ }
+
const link = `vless://${uuid}@${address}:${port}`;
const url = new URL(link);
for (const [key, value] of params) {
@@ -1479,7 +1483,7 @@ class Inbound extends XrayCommonClass {
}
}
- if (this.reality) {
+ else if (this.reality) {
params.set("security", "reality");
params.set("fp", this.stream.reality.settings.fingerprint);
params.set("pbk", this.stream.reality.settings.publicKey);
@@ -1497,7 +1501,7 @@ class Inbound extends XrayCommonClass {
}
}
- if (this.xtls) {
+ else if (this.xtls) {
params.set("security", "xtls");
params.set("alpn", this.stream.xtls.alpn);
if(this.stream.xtls.settings.allowInsecure){
@@ -1512,6 +1516,10 @@ class Inbound extends XrayCommonClass {
params.set("flow", this.settings.trojans[clientIndex].flow);
}
+ else {
+ params.set("security", "none");
+ }
+
const link = `trojan://${settings.trojans[clientIndex].password}@${address}:${this.port}`;
const url = new URL(link);
for (const [key, value] of params) {