diff --git a/launcher/electron/utils.ts b/launcher/electron/utils.ts index 3fa5927..357b8ec 100644 --- a/launcher/electron/utils.ts +++ b/launcher/electron/utils.ts @@ -1,6 +1,6 @@ import * as fs from 'fs' import * as path from 'path' -import * as http from 'http' +import * as https from 'https' import { createHash } from 'crypto' import fetch from 'electron-fetch' @@ -19,13 +19,15 @@ export function download(address: string, filepath: string) { fs.writeFileSync(filepath, '') } const file = fs.createWriteStream(filepath) - http.get(address, res => { - res.pipe(file) - file.on('finish', () => { - file.close() - resolve() + https + .get(address, res => { + res.pipe(file) + file.on('finish', () => { + file.close() + resolve() + }) }) - }).on('error', err => reject(err)) + .on('error', err => reject(err)) }) } diff --git a/launcher/package.json b/launcher/package.json index 37656c3..8430207 100644 --- a/launcher/package.json +++ b/launcher/package.json @@ -3,7 +3,7 @@ "description": "A Minecraft launcher with auto-update feature to facilitate playing modded minecraft", "author": "Kensa", "private": true, - "version": "2.4.3", + "version": "2.4.4", "main": "dist-electron/electron.js", "scripts": { "dev": "vite",