Skip to content

Commit

Permalink
رفع یک سری از اشکالات
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Jan 15, 2024
1 parent 414c970 commit 253631c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
6 changes: 5 additions & 1 deletion assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,11 @@ p {
display: inline-block;
height: 26px;
float: left;
margin: 0 7px 0px 0;
margin: 0 7px 0 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.switch input {
opacity: 0;
Expand Down
10 changes: 7 additions & 3 deletions assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,22 +127,24 @@ $(document).on('keyup', '#defConfig', function(e) {
/*if ( ! protocols.includes(protocol) ) {
return false;
}*/
$('#uuid').val(getHashId(config));
$('#port').val(getAddress(config)[1]);
let defConfig = parser(protocol, config);
$('#sni').val(defConfig.host);
if ( (protocol === 'vmess' && defConfig.tls === "tls") || (protocol === 'vless' && defConfig.security === "tls") ) {
$('#tls').prop('checked', true);
$('#packets').val('tlshello');
$('#length').val('10-20');
$('#interval').val('10-20');
if ( typeof defConfig.host === "undefined" || typeof defConfig.host !== "undefined" && defConfig.host === "") {
$('#sni').val(defConfig.sni);
}
}
else {
$('#tls').prop('checked', false);
$('#packets').val('1-1');
$('#length').val('3-5');
$('#interval').val('5');
}
$('#sni').val(defConfig.host);
if ( protocol === 'vmess' ) {
$('#cleanIp').val(defConfig.add);
}
Expand All @@ -161,6 +163,7 @@ $(document).on('keyup', '#defConfig', function(e) {
else {
path = path.replace('/?ed=2048', '')
}
$('#uuid').val(getHashId(defConfig.id));
$('#path').val(path);
});

Expand All @@ -183,11 +186,13 @@ $(document).on('click', '#tls', function(e) {
$('#packets').val('tlshello');
$('#length').val('10-20');
$('#interval').val('10-20');
$('#sni').attr('placeholder', 'SNI');
}
else {
$('#packets').val('1-1');
$('#length').val('3-5');
$('#interval').val('5');
$('#sni').attr('placeholder', 'Host');
}
});

Expand Down Expand Up @@ -267,7 +272,6 @@ $(document).on('click', '#getFile', function(e) {
data.outbounds[0].settings.vnext[0].port = Number(port);
data.outbounds[0].settings.vnext[0].users[0].id = uuid;
data.outbounds[0].settings.vnext[0].address = cleanIp;

if ( tls ) {
data.outbounds[1].settings.fragment.packets = 'tlshello';
data.outbounds[1].settings.fragment.length = '10-20';
Expand Down
6 changes: 3 additions & 3 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.5.7" rel="stylesheet" />
<link href="./assets/css/style.css?v1.5.8" rel="stylesheet" />
<title>IRCF | ابزار فرگمنت</title>
<meta name="description" content="آی پی سالم و تمیز برای کلودفلر (کلادفلر) جهت دسترسی به اینترنت آزاد" />
<meta name="keywords" content="کلودفلر, کلادفلر, cloudflare, cf, آی پی تمیز, آی پی سالم, اسکن آی پی" />
Expand Down Expand Up @@ -75,7 +75,7 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
</div>
<div class="xsWidth">
<input class="form-control dirLeft" placeholder="CleanIP (default: zula.ir)" id="cleanIp" />
<input class="form-control dirLeft" placeholder="Host" id="sni" />
<input class="form-control dirLeft" placeholder="SNI" id="sni" />
<input class="form-control dirLeft" placeholder="PATH" id="path" />
</div>
<div class="clearfix"></div>
Expand Down Expand Up @@ -188,7 +188,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.5.7"></script>
<script src="./assets/js/script.js?v1.5.8"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit 253631c

Please sign in to comment.