cloud: refresh cached cloudflared binary (#2125)

This commit is contained in:
bolagnaise
2026-08-20 07:53:22 +10:00
committed by GitHub
parent c74f5c82c0
commit 06c989b631

View File

@@ -6,13 +6,13 @@ import { httpFetch } from '../../../server/src/fetch/http-fetch';
export async function installCloudflared() {
const pluginVolume = process.env.SCRYPTED_PLUGIN_VOLUME;
const version = 5;
const version = 6;
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`, `${process.platform}-${process.arch}`);
const bin = path.join(cloudflareD, cloudflared.bin);
if (!fs.existsSync(bin)) {
for (let i = 0; i <= version; i++) {
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`);
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${i}`);
rmSync(cloudflareD, {
force: true,
recursive: true,