|
@@ -635,7 +635,7 @@ class TlsStreamSettings extends XrayCommonClass {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!ObjectUtil.isEmpty(json.settings)) {
|
|
if (!ObjectUtil.isEmpty(json.settings)) {
|
|
|
- settings = new TlsStreamSettings.Settings(json.settings.allowInsecure, json.settings.fingerprint, json.settings.echConfigList);
|
|
|
|
|
|
|
+ settings = new TlsStreamSettings.Settings(json.settings.fingerprint, json.settings.echConfigList);
|
|
|
}
|
|
}
|
|
|
return new TlsStreamSettings(
|
|
return new TlsStreamSettings(
|
|
|
json.serverName,
|
|
json.serverName,
|
|
@@ -738,25 +738,21 @@ TlsStreamSettings.Cert = class extends XrayCommonClass {
|
|
|
|
|
|
|
|
TlsStreamSettings.Settings = class extends XrayCommonClass {
|
|
TlsStreamSettings.Settings = class extends XrayCommonClass {
|
|
|
constructor(
|
|
constructor(
|
|
|
- allowInsecure = false,
|
|
|
|
|
fingerprint = UTLS_FINGERPRINT.UTLS_CHROME,
|
|
fingerprint = UTLS_FINGERPRINT.UTLS_CHROME,
|
|
|
echConfigList = '',
|
|
echConfigList = '',
|
|
|
) {
|
|
) {
|
|
|
super();
|
|
super();
|
|
|
- this.allowInsecure = allowInsecure;
|
|
|
|
|
this.fingerprint = fingerprint;
|
|
this.fingerprint = fingerprint;
|
|
|
this.echConfigList = echConfigList;
|
|
this.echConfigList = echConfigList;
|
|
|
}
|
|
}
|
|
|
static fromJson(json = {}) {
|
|
static fromJson(json = {}) {
|
|
|
return new TlsStreamSettings.Settings(
|
|
return new TlsStreamSettings.Settings(
|
|
|
- json.allowInsecure,
|
|
|
|
|
json.fingerprint,
|
|
json.fingerprint,
|
|
|
json.echConfigList,
|
|
json.echConfigList,
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
toJson() {
|
|
toJson() {
|
|
|
return {
|
|
return {
|
|
|
- allowInsecure: this.allowInsecure,
|
|
|
|
|
fingerprint: this.fingerprint,
|
|
fingerprint: this.fingerprint,
|
|
|
echConfigList: this.echConfigList
|
|
echConfigList: this.echConfigList
|
|
|
};
|
|
};
|
|
@@ -1417,9 +1413,6 @@ class Inbound extends XrayCommonClass {
|
|
|
if (this.stream.tls.alpn.length > 0) {
|
|
if (this.stream.tls.alpn.length > 0) {
|
|
|
obj.alpn = this.stream.tls.alpn.join(',');
|
|
obj.alpn = this.stream.tls.alpn.join(',');
|
|
|
}
|
|
}
|
|
|
- if (this.stream.tls.settings.allowInsecure) {
|
|
|
|
|
- obj.allowInsecure = this.stream.tls.settings.allowInsecure;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return 'vmess://' + Base64.encode(JSON.stringify(obj, null, 2));
|
|
return 'vmess://' + Base64.encode(JSON.stringify(obj, null, 2));
|
|
@@ -1480,9 +1473,6 @@ class Inbound extends XrayCommonClass {
|
|
|
if (this.stream.isTls) {
|
|
if (this.stream.isTls) {
|
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
|
- if (this.stream.tls.settings.allowInsecure) {
|
|
|
|
|
- params.set("allowInsecure", "1");
|
|
|
|
|
- }
|
|
|
|
|
if (!ObjectUtil.isEmpty(this.stream.tls.sni)) {
|
|
if (!ObjectUtil.isEmpty(this.stream.tls.sni)) {
|
|
|
params.set("sni", this.stream.tls.sni);
|
|
params.set("sni", this.stream.tls.sni);
|
|
|
}
|
|
}
|
|
@@ -1583,9 +1573,6 @@ class Inbound extends XrayCommonClass {
|
|
|
if (this.stream.isTls) {
|
|
if (this.stream.isTls) {
|
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
|
- if (this.stream.tls.settings.allowInsecure) {
|
|
|
|
|
- params.set("allowInsecure", "1");
|
|
|
|
|
- }
|
|
|
|
|
if (this.stream.tls.settings.echConfigList?.length > 0) {
|
|
if (this.stream.tls.settings.echConfigList?.length > 0) {
|
|
|
params.set("ech", this.stream.tls.settings.echConfigList);
|
|
params.set("ech", this.stream.tls.settings.echConfigList);
|
|
|
}
|
|
}
|
|
@@ -1662,9 +1649,6 @@ class Inbound extends XrayCommonClass {
|
|
|
if (this.stream.isTls) {
|
|
if (this.stream.isTls) {
|
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
params.set("fp", this.stream.tls.settings.fingerprint);
|
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
params.set("alpn", this.stream.tls.alpn);
|
|
|
- if (this.stream.tls.settings.allowInsecure) {
|
|
|
|
|
- params.set("allowInsecure", "1");
|
|
|
|
|
- }
|
|
|
|
|
if (this.stream.tls.settings.echConfigList?.length > 0) {
|
|
if (this.stream.tls.settings.echConfigList?.length > 0) {
|
|
|
params.set("ech", this.stream.tls.settings.echConfigList);
|
|
params.set("ech", this.stream.tls.settings.echConfigList);
|
|
|
}
|
|
}
|