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>2023-06-14 16:36:56 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2023-06-14 16:36:56 +0300
commitc0f1a926e588303051a6a3e977ed2948e6dfd764 (patch)
tree8fba0c1e8a798db483f831e9937d1971933a9d3c /web/assets/js
parent970dd0915e060345076a0bcad1435931c3551679 (diff)
update - security "none"
security set to none when tls, reality, xtls are not set its because when there is no security none on trojan link some app like v2rayn set tls for your config
Diffstat (limited to 'web/assets/js')
-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) {