diff --git a/app/main/handlers/utils/network.js b/app/main/handlers/utils/network.js index 46a8992dbf..35c138c64d 100644 --- a/app/main/handlers/utils/network.js +++ b/app/main/handlers/utils/network.js @@ -84,24 +84,25 @@ async function getAvailableOSSDomain() { } /**获取校验url */ -const getCheckTextUrl=async()=>{ - let url='' +const getCheckTextUrl = async () => { + const domain = await getAvailableOSSDomain(); + let url = '' switch (process.platform) { case "darwin": if (process.arch === "arm64") { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_darwin_arm64.sha256.txt` + url = `https://${domain}/yak/${version}/yak_darwin_arm64.sha256.txt` } else { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_darwin_amd64.sha256.txt` + url = `https://${domain}/yak/${version}/yak_darwin_amd64.sha256.txt` } break case "win32": - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_windows_amd64.exe.sha256.txt` + url = `https://${domain}/yak/${version}/yak_windows_amd64.exe.sha256.txt` break case "linux": if (process.arch === "arm64") { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_linux_arm64.sha256.txt` + url = `https://${domain}.com/yak/${version}/yak_linux_arm64.sha256.txt` } else { - url = `https://aliyun-oss.yaklang.com/yak/${version}/yak_linux_amd64.sha256.txt` + url = `https://${domain}.com/yak/${version}/yak_linux_amd64.sha256.txt` } break default: