From 52ecdc8a164754cfadb1c4516c84b71e7f1652bb Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Sat, 1 Aug 2026 16:00:00 +0800 Subject: [PATCH] Revert "fix: remove hardcoded windows proxy fallback that causes 500 error when proxy is unavailable" This reverts commit 62ecf5642b03e9b69e0752d39cb1e827a443a49a. --- CloudServer/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CloudServer/server.js b/CloudServer/server.js index b2ffe6f..e5b47b0 100644 --- a/CloudServer/server.js +++ b/CloudServer/server.js @@ -2473,9 +2473,9 @@ app.post('/api/tts/generate', express.json(), async (req, res) => { try { let proxyUrl = process.env.HTTP_PROXY || process.env.http_proxy || process.env.HTTPS_PROXY || process.env.https_proxy || process.env.ALL_PROXY || process.env.all_proxy; - - // Remove the forced win32 proxy logic so it won't crash when running on Windows without a proxy - + if (!proxyUrl && os.platform() === 'win32') { + proxyUrl = 'http://127.0.0.1:7890'; + } console.log(`[TTS] Sending request for text: "${text}" with model "${model}"${proxyUrl ? ` via proxy: ${proxyUrl}` : ''}`); const requestBody = JSON.stringify({