diff --git a/src/cliproxy/binary/downloader.ts b/src/cliproxy/binary/downloader.ts index 8ef38ac0..9ab46e60 100644 --- a/src/cliproxy/binary/downloader.ts +++ b/src/cliproxy/binary/downloader.ts @@ -180,7 +180,7 @@ export function fetchJson(url: string, verbose = false): Promise { const options = { headers: { - 'User-Agent': 'CCS-CLIProxyAPI-Updater/1.0', + 'User-Agent': 'CCS-CLIProxyPlus-Updater/1.0', Accept: 'application/vnd.github.v3+json', }, }; diff --git a/src/cliproxy/binary/installer.ts b/src/cliproxy/binary/installer.ts index e640a043..864d55d0 100644 --- a/src/cliproxy/binary/installer.ts +++ b/src/cliproxy/binary/installer.ts @@ -32,7 +32,7 @@ export async function downloadAndInstall( fs.mkdirSync(config.binPath, { recursive: true }); const archivePath = path.join(config.binPath, `cliproxy-archive.${platform.extension}`); - const spinner = new ProgressIndicator(`Downloading CLIProxyAPI v${config.version}`); + const spinner = new ProgressIndicator(`Downloading CLIProxy Plus v${config.version}`); spinner.start(); try { @@ -64,7 +64,7 @@ export async function downloadAndInstall( spinner.update('Extracting binary'); await extractArchive(archivePath, config.binPath, platform.extension, verbose); - spinner.succeed('CLIProxyAPI ready'); + spinner.succeed('CLIProxy Plus ready'); fs.unlinkSync(archivePath); const binaryPath = path.join(config.binPath, getExecutableName()); @@ -74,7 +74,7 @@ export async function downloadAndInstall( } writeInstalledVersion(config.binPath, config.version); - console.log(ok(`CLIProxyAPI v${config.version} installed successfully`)); + console.log(ok(`CLIProxy Plus v${config.version} installed successfully`)); } catch (error) { spinner.fail('Installation failed'); throw error; diff --git a/src/cliproxy/binary/lifecycle.ts b/src/cliproxy/binary/lifecycle.ts index aed9ef3c..30156777 100644 --- a/src/cliproxy/binary/lifecycle.ts +++ b/src/cliproxy/binary/lifecycle.ts @@ -22,15 +22,15 @@ async function handleAutoUpdate(config: BinaryManagerConfig, verbose: boolean): if (!updateResult.hasUpdate) return; const proxyRunning = await isCliproxyRunning(CLIPROXY_DEFAULT_PORT); - const updateMsg = `CLIProxyAPI update available: v${updateResult.currentVersion} -> v${updateResult.latestVersion}`; + const updateMsg = `CLIProxy Plus update available: v${updateResult.currentVersion} -> v${updateResult.latestVersion}`; if (proxyRunning) { console.log(info(updateMsg)); console.log(info('Run "ccs cliproxy stop" then restart to apply update')); - log('Skipping update: CLIProxyAPI is currently running', verbose); + log('Skipping update: CLIProxy Plus is currently running', verbose); } else { console.log(info(updateMsg)); - console.log(info('Updating CLIProxyAPI...')); + console.log(info('Updating CLIProxy Plus...')); deleteBinary(config.binPath, verbose); config.version = updateResult.latestVersion; await downloadAndInstall(config, verbose); diff --git a/src/cliproxy/platform-detector.ts b/src/cliproxy/platform-detector.ts index 004f835a..1d8333b2 100644 --- a/src/cliproxy/platform-detector.ts +++ b/src/cliproxy/platform-detector.ts @@ -57,7 +57,7 @@ export function detectPlatform(version: string = CLIPROXY_FALLBACK_VERSION): Pla } const extension: ArchiveExtension = os === 'windows' ? 'zip' : 'tar.gz'; - const binaryName = `CLIProxyAPI_${version}_${os}_${arch}.${extension}`; + const binaryName = `CLIProxyAPIPlus_${version}_${os}_${arch}.${extension}`; return { os, @@ -70,11 +70,11 @@ export function detectPlatform(version: string = CLIPROXY_FALLBACK_VERSION): Pla /** * Get executable name based on platform * @returns Binary executable name (with .exe on Windows) - * Note: The actual binary inside the archive is named 'cli-proxy-api' + * Note: The actual binary inside the archive is named 'cli-proxy-api-plus' */ export function getExecutableName(): string { const platform = detectPlatform(); - return platform.os === 'windows' ? 'cli-proxy-api.exe' : 'cli-proxy-api'; + return platform.os === 'windows' ? 'cli-proxy-api-plus.exe' : 'cli-proxy-api-plus'; } /** @@ -83,7 +83,7 @@ export function getExecutableName(): string { */ export function getArchiveBinaryName(): string { const platform = detectPlatform(); - return platform.os === 'windows' ? 'cli-proxy-api.exe' : 'cli-proxy-api'; + return platform.os === 'windows' ? 'cli-proxy-api-plus.exe' : 'cli-proxy-api-plus'; } /** @@ -93,7 +93,7 @@ export function getArchiveBinaryName(): string { */ export function getDownloadUrl(version: string = CLIPROXY_FALLBACK_VERSION): string { const platform = detectPlatform(version); - const baseUrl = `https://github.com/router-for-me/CLIProxyAPI/releases/download/v${version}`; + const baseUrl = `https://github.com/router-for-me/CLIProxyAPIPlus/releases/download/v${version}`; return `${baseUrl}/${platform.binaryName}`; } @@ -103,7 +103,7 @@ export function getDownloadUrl(version: string = CLIPROXY_FALLBACK_VERSION): str * @returns Full URL to checksums.txt */ export function getChecksumsUrl(version: string = CLIPROXY_FALLBACK_VERSION): string { - return `https://github.com/router-for-me/CLIProxyAPI/releases/download/v${version}/checksums.txt`; + return `https://github.com/router-for-me/CLIProxyAPIPlus/releases/download/v${version}/checksums.txt`; } /**