From e623784f8bdac48232542b2647ee655f7e138dc9 Mon Sep 17 00:00:00 2001 From: Nipoto Date: Wed, 31 Jan 2024 18:01:04 +0330 Subject: [PATCH] =?UTF-8?q?=D8=A7=D9=85=DA=A9=D8=A7=D9=86=20=DA=A9=D9=86?= =?UTF-8?q?=D8=AA=D8=B1=D9=84=20allowInsecure=20=D9=81=D8=B1=D8=A7=D9=87?= =?UTF-8?q?=D9=85=20=D8=B4=D8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/style.css | 2 +- assets/js/script.js | 23 +++++++++++++++++++++++ index.html | 15 ++++++++++----- 3 files changed, 34 insertions(+), 6 deletions(-) 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 @@ - + IRCF | ابزار فرگمنت @@ -84,6 +84,11 @@

اینترنت برای همه؛ یا هیچ‌کس!

TLS +
مقادیر فرگمنت
- - - + + +
مقدار Concurrency
@@ -191,7 +196,7 @@
--> - +