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-12-10 20:13:48 +0300
committerAlireza Ahmadi <alireza7@gmail.com>2023-12-11 17:15:06 +0300
commitaf54b34f3a4035cebecf9e614142b6ad5ac06c40 (patch)
tree28b4092f19afd27154236f60b955f7dfc20a0b35 /web/assets/js
parent24ef7498422bedc73661ea9ebd1300ec12ac681d (diff)
v2.0.0
Diffstat (limited to 'web/assets/js')
-rw-r--r--web/assets/js/model/dbinbound.js2
-rw-r--r--web/assets/js/model/xray.js28
2 files changed, 14 insertions, 16 deletions
diff --git a/web/assets/js/model/dbinbound.js b/web/assets/js/model/dbinbound.js
index a7157f49..d8d0b94f 100644
--- a/web/assets/js/model/dbinbound.js
+++ b/web/assets/js/model/dbinbound.js
@@ -137,7 +137,7 @@ class DBInbound {
}
}
- genInboundLinks() {
+ genInboundLinks(remarkModel) {
const inbound = this.toInbound();
return inbound.genInboundLinks(this.remark,remarkModel);
}
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index f0f3c1db..9478312e 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -477,7 +477,7 @@ class TlsStreamSettings extends XrayCommonClass {
alpn=[ALPN_OPTION.HTTP1,ALPN_OPTION.H2],
settings=new TlsStreamSettings.Settings()) {
super();
- this.server = serverName;
+ this.sni = serverName;
this.minVersion = minVersion;
this.maxVersion = maxVersion;
this.cipherSuites = cipherSuites;
@@ -519,7 +519,7 @@ class TlsStreamSettings extends XrayCommonClass {
toJson() {
return {
- serverName: this.server,
+ serverName: this.sni,
minVersion: this.minVersion,
maxVersion: this.maxVersion,
cipherSuites: this.cipherSuites,
@@ -1080,7 +1080,7 @@ class Inbound extends XrayCommonClass {
}
get serverName() {
- if (this.stream.isTls) return this.stream.tls.server;
+ if (this.stream.isTls) return this.stream.tls.sni;
if (this.stream.isXtls) return this.stream.xtls.server;
if (this.stream.isReality) return this.stream.reality.serverNames;
return "";
@@ -1233,7 +1233,7 @@ class Inbound extends XrayCommonClass {
if (security === 'tls') {
if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
- obj.sni = this.stream.tls.server;
+ obj.sni = this.stream.tls.sni;
}
if (!ObjectUtil.isEmpty(this.stream.tls.settings.fingerprint)){
obj.fp = this.stream.tls.settings.fingerprint;
@@ -1311,8 +1311,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (!ObjectUtil.isEmpty(this.stream.tls.server)){
- params.set("sni", this.stream.tls.server);
+ if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
+ params.set("sni", this.stream.tls.sni);
}
if (type == "tcp" && !ObjectUtil.isEmpty(flow)) {
params.set("flow", flow);
@@ -1425,8 +1425,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (!ObjectUtil.isEmpty(this.stream.tls.server)){
- params.set("sni", this.stream.tls.server);
+ if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
+ params.set("sni", this.stream.tls.sni);
}
}
}
@@ -1506,8 +1506,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.tls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (!ObjectUtil.isEmpty(this.stream.tls.server)){
- params.set("sni", this.stream.tls.server);
+ if (!ObjectUtil.isEmpty(this.stream.tls.sni)){
+ params.set("sni", this.stream.tls.sni);
}
}
}
@@ -1601,7 +1601,7 @@ class Inbound extends XrayCommonClass {
if(this.clients){
let links = [];
this.clients.forEach((client) => {
- genAllLinks(remark,remarkModel,client).forEach(l => {
+ this.genAllLinks(remark,remarkModel,client).forEach(l => {
links.push(l.link);
})
});
@@ -1797,8 +1797,7 @@ Inbound.VLESSSettings = class extends Inbound.Settings {
Protocols.VLESS,
json.clients.map(client => Inbound.VLESSSettings.VLESS.fromJson(client)),
json.decryption || 'none',
- json.fallbacks.map(fallback => Inbound.VLESSSettings.Fallback.fromJson(fallback)),
- );
+ Inbound.VLESSSettings.Fallback.fromJson(json.fallbacks),);
}
toJson() {
@@ -1925,8 +1924,7 @@ Inbound.TrojanSettings = class extends Inbound.Settings {
return new Inbound.TrojanSettings(
Protocols.TROJAN,
json.clients.map(client => Inbound.TrojanSettings.Trojan.fromJson(client)),
- json.fallbacks.map(fallback => Inbound.TrojanSettings.Fallback.fromJson(fallback))
- );
+ Inbound.TrojanSettings.Fallback.fromJson(json.fallbacks),);
}
toJson() {