Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
azavaxhuman committed Apr 11, 2024
1 parent a12cb47 commit 884a38d
Showing 1 changed file with 66 additions and 5 deletions.
71 changes: 66 additions & 5 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function protocolDetails() {
tcp: 1,
ws: 2,
H2: 3,
QUIC: 4,
grpc: 5,
tcpudp: 7,
tcpS: 8,
Expand Down Expand Up @@ -121,7 +122,7 @@ function protocolDetails() {
h == 0 ? (document.getElementById('headerOnOffDiv').style.display = 'none') : (document.getElementById('headerOnOffDiv').style.display = 'block')


if (t == 5 || t == 3) {
if (t == 5 || t == 3 || t == 4) {

document.getElementById('acceptProxyProtocols').style.display = 'none'

Expand Down Expand Up @@ -176,7 +177,7 @@ function protocolDetails() {

document.getElementById('protocolDetails').style.display = 'block'
document.getElementById('http_header_Fields').style.display = h === 0 ? 'none' : 'block';
if (s == 5 || t == 5 || t == 3) {
if (s == 5 || t == 5 || t == 3 || t==4 ) {
document.getElementById('divheader').style.display = 'none';


Expand Down Expand Up @@ -207,6 +208,7 @@ function protocolDetails() {
<option value="tcp">TCP</option>
<option value="ws">WS(Websocket)</option>
<option value="grpc">GRPC</option>
<option value="QUIC">QUIC</option>
<option value="H2" >H2</option>
</select>
</div>`;
Expand All @@ -224,6 +226,7 @@ function protocolDetails() {
<option value="tcp">TCP</option>
<option value="ws">WS(Websocket)</option>
<option value="grpc">GRPC</option>
</select>
</div>`;

Expand Down Expand Up @@ -254,7 +257,7 @@ function protocolDetails() {



if (pt == 11 || pt == 15 || pt == 13) {
if (pt == 11 || pt == 15 || pt == 13 || pt == 14 ) {

if (pt == 11) {
var newText1 = `<div id="idsecurity">
Expand All @@ -281,10 +284,22 @@ function protocolDetails() {
<option value="reality" id="reality">reality</option>
</select>
</div>`;

idsecurity.innerHTML = newText2;
document.querySelector('select[name="security"]').value = security;
}
else if (pt == 14) {

var newText6 = `<div id="idsecurity">
<label for="security">Security</label>
<select name="security" >
<option value="tls" id="tls">tls</option>
</select>
</div>`;
security = 'tls';
idsecurity.innerHTML = newText6;
document.querySelector('select[name="security"]').value = security;
}
else if (pt == 13) {

var newText4 = `<div id="idsecurity">
Expand Down Expand Up @@ -673,8 +688,54 @@ function BuildTLS(
}${sniftext}
}`
}
if ( s==1 && t==4 && protocol=="vless") {
final.value = `{
"tag": "${tag}",
"listen": "0.0.0.0",
"port": ${port},
"protocol": "${protocol}",
"settings": {
"clients": [],
"decryption": "none",
"fallbacks": []
}${sniftext}
,
"streamSettings": {
"network": "quic",
"quicSettings": {
"header": {
"type": "none"
},
"key": "BIFbn9m9qW",
"security": "none"
},
"security": "tls",
"tlsSettings": {
"alpn": [
"h2",
"http/1.1"
],
"certificates": [
{
"certificateFile": "${pubkey}",
"keyFile": "${pvkey}",
"ocspStapling": 3600
}
],
"cipherSuites": "",
"maxVersion": "1.3",
"minVersion": "1.2",
"rejectUnknownSni": false,
"serverName": "${sni}"
}
}
}`



if (s > 0) {

}
if (s > 0 && t !=4) {
final.value =
`{
"tag": "${tag}",
Expand Down

0 comments on commit 884a38d

Please sign in to comment.