Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Diana-Cl authored Dec 10, 2024
1 parent de2fba3 commit 4ee5c77
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// <!--GAMFC-->Last update 2024-12-09 13:10:03 UTC - We are all REvil, Version base on commit 112bf5775be29ab396ba494357eee47c93e58d93<!--GAMFC-END-->.
// <!--GAMFC-->Last update 2024-12-10 01:58:26 UTC - We are all REvil, version base on commit cfbe5e3cd129d66cf45a5d1248d286d5e9f16345<!--GAMFC-END-->.
// @ts-ignore
import { connect } from 'cloudflare:sockets';

// How to generate your own UUID:
// To generate your own UUID: https://www.uuidgenerator.net/
// [Windows] Press "Win + R", input cmd and run: Powershell -NoExit -Command "[guid]::NewGuid()"
let userID = '10e894da-61b1-4998-ac2b-e9ccb6af9d30';

let proxyIP = 'turk.radicalization.ir';
let proxyIP = 'turk.radicalization.ir';// OR use 'nima.nscl.ir Find proxyIP: https://github.com/NiREvil/vless/blob/main/sub/ProxyIP.md


if (!isValidUUID(userID)) {
Expand Down Expand Up @@ -599,12 +599,24 @@ async function handleUDPOutBound(webSocket, vlessResponseHeader, log) {
* @param {string | null} hostName
* @returns {string}
*/

/**
*
* Refactored by REvil
*
* [js-sha256]{@link https://github.com/emn178/js-sha256}
* @version 0.14.0 ()
* @description This code is based on the js-sha256 project, with the addition of the SHA-224 hash algorithm implementation.
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2024
* @license MIT
*/
function getVLESSConfig(userID, hostName) {
const protocol = "vless";
const vlessMain =
`${protocol}` +
`://${userID}@${hostName}:443`+
`?encryption=none&security=tls&sni=${hostName}&fp=randomized&type=ws&host=${hostName}&path=%2F%3Fed%3D2560#${hostName}`;
`?encryption=none&security=tls&sni=${hostName}&fp=chrome&type=ws&host=${hostName}&alpn=http%2F1.1&path=%2Fassets%2Fimages#${hostName}`;

return `
################################################################
Expand All @@ -630,6 +642,9 @@ clash-meta
headers:
host: ${hostName}
---------------------------------------------------------------
Telegram channel: https://t.me/F_NiREvil
Our github account: https://github.com/NiREvil
---------------------------------------------------------------
################################################################
`;
}

0 comments on commit 4ee5c77

Please sign in to comment.