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:
Diffstat (limited to 'web/assets/js')
-rw-r--r--web/assets/js/model/outbound.js10
-rw-r--r--web/assets/js/model/xray.js14
2 files changed, 12 insertions, 12 deletions
diff --git a/web/assets/js/model/outbound.js b/web/assets/js/model/outbound.js
index 75d3b878..5aad52dd 100644
--- a/web/assets/js/model/outbound.js
+++ b/web/assets/js/model/outbound.js
@@ -476,7 +476,7 @@ class Outbound extends CommonClass {
if(data.length !=2) return null;
switch(data[0].toLowerCase()){
case Protocols.VMess:
- return this.fromVmessLink(JSON.parse(atob(data[1])));
+ return this.fromVmessLink(JSON.parse(Base64.decode(data[1])));
case Protocols.VLESS:
case Protocols.Trojan:
case 'ss':
@@ -493,8 +493,8 @@ class Outbound extends CommonClass {
if (network === 'tcp') {
stream.tcp = new TcpStreamSettings(
json.type,
- json.host ? json.host.split(','): [],
- json.path ? json.path.split(','): []);
+ json.host ?? '',
+ json.path ?? '');
} else if (network === 'kcp') {
stream.kcp = new KcpStreamSettings();
stream.type = json.type;
@@ -505,7 +505,7 @@ class Outbound extends CommonClass {
stream.network = 'http'
stream.http = new HttpStreamSettings(
json.path,
- json.host ? json.host.split(',') : []);
+ json.host);
} else if (network === 'quic') {
stream.quic = new QuicStreamSettings(
json.host ? json.host : 'none',
@@ -570,7 +570,7 @@ class Outbound extends CommonClass {
let sni=url.searchParams.get('sni') ?? '';
let sid=url.searchParams.get('sid') ?? '';
let spx=url.searchParams.get('spx') ?? '';
- stream.tls = new RealityStreamSettings(pbk, fp, sni, sid, spx);
+ stream.reality = new RealityStreamSettings(pbk, fp, sni, sid, spx);
}
let data = link.split('?');
diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js
index 9478312e..e0c8a912 100644
--- a/web/assets/js/model/xray.js
+++ b/web/assets/js/model/xray.js
@@ -602,7 +602,7 @@ class XtlsStreamSettings extends XrayCommonClass {
alpn=[ALPN_OPTION.H2,ALPN_OPTION.HTTP1],
settings=new XtlsStreamSettings.Settings()) {
super();
- this.server = serverName;
+ this.sni = serverName;
this.certs = certificates;
this.alpn = alpn;
this.settings = settings;
@@ -636,7 +636,7 @@ class XtlsStreamSettings extends XrayCommonClass {
toJson() {
return {
- serverName: this.server,
+ serverName: this.sni,
certificates: XtlsStreamSettings.toJsonArray(this.certs),
alpn: this.alpn,
settings: this.settings,
@@ -1081,7 +1081,7 @@ class Inbound extends XrayCommonClass {
get serverName() {
if (this.stream.isTls) return this.stream.tls.sni;
- if (this.stream.isXtls) return this.stream.xtls.server;
+ if (this.stream.isXtls) return this.stream.xtls.sni;
if (this.stream.isReality) return this.stream.reality.serverNames;
return "";
}
@@ -1326,8 +1326,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.xtls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (!ObjectUtil.isEmpty(this.stream.xtls.server)){
- params.set("sni", this.stream.xtls.server);
+ if (!ObjectUtil.isEmpty(this.stream.xtls.sni)){
+ params.set("sni", this.stream.xtls.sni);
}
params.set("flow", flow);
}
@@ -1533,8 +1533,8 @@ class Inbound extends XrayCommonClass {
if(this.stream.xtls.settings.allowInsecure){
params.set("allowInsecure", "1");
}
- if (this.stream.xtls.settings.serverName !== ''){
- params.set("sni", this.stream.xtls.settings.serverName);
+ if (!ObjectUtil.isEmpty(this.stream.xtls.sni)){
+ params.set("sni", this.stream.xtls.sni);
}
params.set("flow", flow);
}