diff --git a/web/assets/css/custom.css b/web/assets/css/custom.css index ec082646..14e87353 100644 --- a/web/assets/css/custom.css +++ b/web/assets/css/custom.css @@ -208,7 +208,8 @@ .ant-card-dark .ant-calendar-year-select, .ant-card-dark .ant-calendar-date, .ant-card-dark .ant-collapse>.ant-collapse-item>.ant-collapse-header, -.ant-card-dark .ant-empty-normal { +.ant-card-dark .ant-empty-normal, +.ant-card-dark .ant-checkbox+span { color: hsla(0,0%,100%,.65); } @@ -308,7 +309,8 @@ border-color: #593815; } -.ant-card-dark .ant-table-row-expand-icon { +.ant-card-dark .ant-table-row-expand-icon, +.ant-card-dark .ant-checkbox-inner { background: none; } @@ -316,12 +318,17 @@ background-color: #0c61b0; } -.ant-card-dark .ant-btn { +.ant-card-dark .ant-btn, +.ant-card-dark .ant-radio-button-wrapper { color: hsla(0,0%,100%,.65); background: none; border: 1px solid hsla(0,0%,100%,.65); } +.ant-card-dark .ant-radio-button-wrapper:hover { + color: #177ddc; +} + .ant-card-dark .ant-btn-primary { color: hsla(0,0%,100%,.65); background-color: #073763; diff --git a/web/assets/js/model/xray.js b/web/assets/js/model/xray.js index da300a63..f91b684a 100644 --- a/web/assets/js/model/xray.js +++ b/web/assets/js/model/xray.js @@ -95,7 +95,6 @@ const UTLS_FINGERPRINT = { const ALPN_OPTION = { H2: "h2", HTTP1: "http/1.1", - BOTH: "h2,http/1.1", }; Object.freeze(Protocols); @@ -1092,7 +1091,6 @@ class Inbound extends XrayCommonClass { const type = this.stream.network; const params = new Map(); params.set("type", this.stream.network); - params.set("security", this.stream.security); switch (type) { case "tcp": const tcp = this.stream.tcp; @@ -1139,8 +1137,12 @@ class Inbound extends XrayCommonClass { } if (this.tls) { + params.set("security", "tls"); params.set("fp" , this.stream.tls.settings[0]['fingerprint']); - params.set("alpn", this.stream.tls.alpn[0]); + params.set("alpn", this.stream.tls.alpn); + if(this.stream.tls.settings[0].allowInsecure){ + params.set("allowInsecure", "1"); + } if (!ObjectUtil.isEmpty(this.stream.tls.server)) { address = this.stream.tls.server; } @@ -1153,6 +1155,11 @@ class Inbound extends XrayCommonClass { } if (this.xtls) { + params.set("security", "tls"); + params.set("alpn", this.stream.tls.alpn); + if(this.stream.tls.settings[0].allowInsecure){ + params.set("allowInsecure", "1"); + } if (!ObjectUtil.isEmpty(this.stream.tls.server)) { address = this.stream.tls.server; } @@ -1188,7 +1195,6 @@ class Inbound extends XrayCommonClass { const type = this.stream.network; const params = new Map(); params.set("type", this.stream.network); - params.set("security", this.stream.security); switch (type) { case "tcp": const tcp = this.stream.tcp; @@ -1235,8 +1241,12 @@ class Inbound extends XrayCommonClass { } if (this.tls) { + params.set("security", "tls"); params.set("fp" , this.stream.tls.settings[0]['fingerprint']); - params.set("alpn", this.stream.tls.alpn[0]); + params.set("alpn", this.stream.tls.alpn); + if(this.stream.tls.settings[0].allowInsecure){ + params.set("allowInsecure", "1"); + } if (!ObjectUtil.isEmpty(this.stream.tls.server)) { address = this.stream.tls.server; } @@ -1246,6 +1256,11 @@ class Inbound extends XrayCommonClass { } if (this.xtls) { + params.set("security", "tls"); + params.set("alpn", this.stream.tls.alpn); + if(this.stream.tls.settings[0].allowInsecure){ + params.set("allowInsecure", "1"); + } if (!ObjectUtil.isEmpty(this.stream.tls.server)) { address = this.stream.tls.server; } diff --git a/web/html/xui/form/tls_settings.html b/web/html/xui/form/tls_settings.html index 83c4c536..16e94584 100644 --- a/web/html/xui/form/tls_settings.html +++ b/web/html/xui/form/tls_settings.html @@ -40,6 +40,11 @@ + + + [[ key ]] + +