Skip to content

Commit

Permalink
added: Early Data
Browse files Browse the repository at this point in the history
  • Loading branch information
ircfspace committed Jan 10, 2024
1 parent 424e392 commit 964b026
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
21 changes: 21 additions & 0 deletions assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,27 @@ img[alt="loader"] {
.minWidth input:last-child {
border-radius: 0 3px 3px 0;
}
.xsWidth {
float: right;
width: 100%;
margin: -10px 0 0 0;
}
.xsWidth input,
.xsWidth select {
width: 33%;
float: left;
border-radius: 0;
}
.xsWidth select:first-child,
.xsWidth input:first-child {
border-radius: 3px 0 0 3px;
border-right: transparent;
}
.xsWidth select:last-child,
.xsWidth input:last-child {
border-left: transparent;
border-radius: 0 3px 3px 0;
}

footer {
padding: 10px 0;
Expand Down
8 changes: 7 additions & 1 deletion assets/js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ $(document).on('click', '#getFile', function(e) {
}
}
let tls = $('#tls').val();
let early = $('#early').val();
let cleanIp = $('#cleanIp').val();
if ( cleanIp === '' ) {
cleanIp = 'zula.ir';
Expand All @@ -46,7 +47,12 @@ $(document).on('click', '#getFile', function(e) {
data.outbounds[0].streamSettings.network = network;
data.outbounds[0].streamSettings.tlsSettings.serverName = sni;
data.outbounds[0].streamSettings.wsSettings.headers.Host = sni;
data.outbounds[0].streamSettings.wsSettings.path = path+'/?ed=2048';
if ( early === 'on' ) {
data.outbounds[0].streamSettings.wsSettings.path = path+'/?ed=2048';
}
else {
data.outbounds[0].streamSettings.wsSettings.path = path;
}
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;
Expand Down
10 changes: 7 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.0" rel="stylesheet" />
<link href="./assets/css/style.css?v1.1" rel="stylesheet" />
<title>IRCF | ابزار فرگمنت</title>
<meta name="description" content="آی پی سالم و تمیز برای کلودفلر (کلادفلر) جهت دسترسی به اینترنت آزاد" />
<meta name="keywords" content="کلودفلر, کلادفلر, cloudflare, cf, آی پی تمیز, آی پی سالم, اسکن آی پی" />
Expand Down Expand Up @@ -70,8 +70,12 @@ <h1>اینترنت برای همه؛ یا هیچ‌کس!</h1>
<input class="form-control dirLeft" placeholder="SNI" id="sni" />
<input class="form-control dirLeft" placeholder="PORT" id="port" type="number" />
</div>
<div class="minWidth">
<div class="xsWidth">
<input class="form-control dirLeft" placeholder="PATH" id="path" />
<select class="form-control dirLeft" id="early">
<option value="on">Early Data</option>
<option value="off">Off</option>
</select>
<select class="form-control dirLeft" id="tls">
<option value="tls">TLS</option>
<option value="none">No TLS</option>
Expand Down Expand Up @@ -162,7 +166,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.0"></script>
<script src="./assets/js/script.js?v1.1"></script>
</footer>
</div>
</div>
Expand Down

0 comments on commit 964b026

Please sign in to comment.