diff --git a/assets/css/style.css b/assets/css/style.css index 595080c..e4be9b4 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -345,7 +345,7 @@ p { display: inline-block; height: 26px; float: left; - margin: 0 7px 0 0; + margin: 0 7px 5px 0; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; diff --git a/assets/js/script.js b/assets/js/script.js index bdda79a..7f37f27 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -167,6 +167,27 @@ $(document).on('keyup', '#defConfig', function(e) { else { $('#cleanIp').val(defConfig.address); } + if ( typeof defConfig.allowInsecure !== "undefined" ) { + if ( protocol === 'vmess' ) { + if ( !defConfig.allowInsecure ) { + $('#insecure').prop('checked', false); + } + else { + $('#insecure').prop('checked', true); + } + } + else { + if ( defConfig.allowInsecure !== "1" ) { + $('#insecure').prop('checked', false); + } + else { + $('#insecure').prop('checked', true); + } + } + } + else { + $('#insecure').prop('checked', true); + } let path = setPath(defConfig.path); let early = $('#early').is(':checked'); if ( early ) { @@ -256,6 +277,7 @@ function generateJson() { let path = setPath($('#path').val()); let tls = $('#tls').is(':checked'); let mux = $('#mux').is(':checked'); + let insecure = $('#insecure').is(':checked'); let concurrency = $('#concurrency').val(); let packets = $('#packets').val(); let length = $('#length').val(); @@ -282,6 +304,7 @@ function generateJson() { data.outbounds[0].mux.concurrency = Number(-1); } data.outbounds[0].streamSettings.network = "ws"; + data.outbounds[0].streamSettings.tlsSettings.allowInsecure = (insecure ? true : false); data.outbounds[0].streamSettings.tlsSettings.serverName = sni; data.outbounds[0].streamSettings.wsSettings.headers.Host = sni; data.outbounds[0].streamSettings.wsSettings.path = path; diff --git a/index.html b/index.html index 8dc51c5..38cfdd2 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ - +