Skip to content

Commit

Permalink
امکان کنترل allowInsecure فراهم شد
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Jan 31, 2024
1 parent 0f8a456 commit e623784
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
23 changes: 23 additions & 0 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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();
Expand All @@ -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;
Expand Down
15 changes: 10 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link href="./assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="./assets/css/bootstrap-rtl.min.css" rel="stylesheet" />
<link href="./assets/css/vazir.css" rel="stylesheet" />
<link href="./assets/css/style.css?v1.6" rel="stylesheet" />
<link href="./assets/css/style.css?v1.7" rel="stylesheet" />
<title>IRCF | ابزار فرگمنت</title>
<meta name="description" content="آی پی سالم و تمیز برای کلودفلر (کلادفلر) جهت دسترسی به اینترنت آزاد" />
<meta name="keywords" content="کلودفلر, کلادفلر, cloudflare, cf, آی پی تمیز, آی پی سالم, اسکن آی پی" />
Expand Down Expand Up @@ -84,6 +84,11 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<span class="slider round"></span>
<strong>TLS</strong>
</label>
<label class="switch">
<input type="checkbox" id="insecure" checked />
<span class="slider round"></span>
<strong id="secureLabel" title="Allow Insecure">Insecure</strong>
</label>
<label class="switch">
<input type="checkbox" id="early" />
<span class="slider round"></span>
Expand All @@ -96,9 +101,9 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
</label>
<div class="orClass"><small>مقادیر فرگمنت</small></div>
<div class="xsWidth">
<input class="form-control dirLeft" placeholder="Packets" id="packets" value="tlshello" />
<input class="form-control dirLeft" placeholder="Length" id="length" value="10-20" />
<input class="form-control dirLeft" placeholder="Interval" id="interval" value="10-20" />
<input class="form-control dirLeft" placeholder="Packets" title="Packets" id="packets" value="tlshello" />
<input class="form-control dirLeft" placeholder="Length" title="Length" id="length" value="10-20" />
<input class="form-control dirLeft" placeholder="Interval" title="Interval" id="interval" value="10-20" />
</div>
<div class="muxForm none" id="muxForm">
<div class="orClass"><small>مقدار Concurrency</small></div>
Expand Down Expand Up @@ -191,7 +196,7 @@ <h4 class="modal-title">دونیت</h4>
</div>-->
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
<script src="./assets/js/script.js?v1.6"></script>
<script src="./assets/js/script.js?v1.7"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit e623784

Please sign in to comment.