changed version

This commit is contained in:
stratuma 2024-05-27 17:19:59 +02:00
parent d173cc8b9e
commit adc262a3ab
5 changed files with 16 additions and 18 deletions

View File

@ -9,7 +9,7 @@ export async function searchCrunchy(q: string) {
isProxyActive = result
})
var proxies;
var proxies
if (isProxyActive) {
const { data: prox } = await getProxies()

View File

@ -5,7 +5,7 @@
Crunchyroll <br />
Downloader
</div>
<div class="text-sm mt-1 text-gray-200"> v1.1.5 </div>
<div class="text-sm mt-1 text-gray-200"> v1.1.6 </div>
<div class="absolute right-0 bottom-0 text-xs text-gray-200"> Made by Stratum </div>
</div>
</template>

View File

@ -2,7 +2,7 @@
"name": "crunchyroll-downloader",
"author": "Stratum",
"description": "Crunchyroll Downloader",
"version": "1.1.5",
"version": "1.1.6",
"private": true,
"main": ".output/src/electron/background.js",
"repository": "https://github.com/stratuma/Crunchyroll-Downloader-v4.0",

View File

@ -176,15 +176,15 @@ export async function checkProxiesController(request: FastifyRequest, reply: Fas
const response: Response = await Promise.race([
fetch(p.url + 'health', { method: 'GET' }),
new Promise<Response>((_, reject) => setTimeout(() => reject(new Error('Timeout')), 500))
]);
])
if (response.ok) {
p.status = 'online';
p.status = 'online'
} else {
p.status = 'offline';
p.status = 'offline'
}
} catch (error) {
p.status = 'offline';
p.status = 'offline'
}
}

View File

@ -1,14 +1,14 @@
function getRandomInt(ca: BigInt) {
return BigInt(Math.floor(Math.random() * Number(ca)));
return BigInt(Math.floor(Math.random() * Number(ca)))
}
function randomHex(length: number) {
const characters = '0123456789ABCDEF';
let result = '';
const characters = '0123456789ABCDEF'
let result = ''
for (let i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * characters.length));
result += characters.charAt(Math.floor(Math.random() * characters.length))
}
return result;
return result
}
function getESN() {
@ -16,16 +16,14 @@ function getESN() {
}
export function encryptNetflixMSL(body: any) {
var headers = {
sender: getESN(),
handshake: true,
nonreplayable: 2,
capabilities: {"languages": [], "compressionalgos": []},
recipient: "Netflix",
capabilities: { languages: [], compressionalgos: [] },
recipient: 'Netflix',
renewable: true,
messageid: getRandomInt(BigInt(2) ** BigInt(52)),
timestamp: Date.now() / 1000
}
}
}