diff --git a/app/assets/js/authmanager.js b/app/assets/js/authmanager.js index 5a24f30..952ac80 100644 --- a/app/assets/js/authmanager.js +++ b/app/assets/js/authmanager.js @@ -142,7 +142,7 @@ function mojangErrorDisplayable(errorCode) { exports.addMojangAccount = async function(username, password) { try { const response = await MojangRestAPI.authenticate(username, password, ConfigManager.getClientToken()) - console.log(response) + if(response.responseStatus === RestResponseStatus.SUCCESS) { const session = response.data diff --git a/app/assets/js/processbuilder.js b/app/assets/js/processbuilder.js index 7954e06..6a973f7 100644 --- a/app/assets/js/processbuilder.js +++ b/app/assets/js/processbuilder.js @@ -102,10 +102,10 @@ class ProcessBuilder { }) const authArgs = [ "-Dminecraft.api.env=custom", - "-Dminecraft.api.auth.host=https://auth.oier.ovh", - "-Dminecraft.api.account.host=https://auth.oier.ovh/user", - "-Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil", - "-Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil" + "-Dminecraft.api.auth.host=https://auth.oier.ovh/api/yggdrasil/authserver", + "-Dminecraft.api.account.host=https://auth.oier.ovh/api/yggdrasil/user", + "-Dminecraft.api.session.host=https://auth.oier.ovh/api/yggdrasil/sessionserver", + "-Dminecraft.api.services.host=https://auth.oier.ovh/api/yggdrasil/services" ] args = authArgs.concat(args) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 1a1c176..2a8a0bd 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -145,11 +145,12 @@ document.getElementById('avatarOverlay').onclick = async e => { function updateSelectedAccount(authUser){ let username = Lang.queryJS('landing.selectedAccount.noAccountSelected') if(authUser != null){ + loggerLanding.info('Auth user', authUser) if(authUser.displayName != null){ username = authUser.displayName } if(authUser.uuid != null){ - document.getElementById('avatarContainer').style.backgroundImage = `url('https://mc-heads.net/body/${authUser.uuid}/right')` + document.getElementById('avatarContainer').style.backgroundImage = `url('https://auth.oier.ovh/avatar/player/${authUser.displayName}')` } } user_text.innerHTML = username @@ -245,7 +246,6 @@ const refreshServerStatus = async (fade = false) => { try { const servStat = await getServerStatus(47, serv.hostname, serv.port) - console.log(servStat) pLabel = Lang.queryJS('landing.serverStatus.players') pVal = servStat.players.online + '/' + servStat.players.max diff --git a/app/assets/js/scripts/settings.js b/app/assets/js/scripts/settings.js index 81a65a7..d4ca2f5 100644 --- a/app/assets/js/scripts/settings.js +++ b/app/assets/js/scripts/settings.js @@ -640,7 +640,7 @@ function populateAuthAccounts(){ const accHtml = `
diff --git a/electron-builder.yml b/electron-builder.yml index 5e63239..06447c3 100644 --- a/electron-builder.yml +++ b/electron-builder.yml @@ -2,13 +2,13 @@ appId: 'patatalauncher' productName: 'PatataLauncher' artifactName: '${productName}-${version}.${ext}' -copyright: 'Copyleft 2024 Daniel Scalzi' +copyright: 'Copyright 2024 Daniel Scalzi' asar: true compression: 'maximum' files: - - '!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.nvmrc,.eslintrc.json}' + - '!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.nvmrc,.eslintrc.json,authlib-injector-1.2.5.jar,patches,.gitea}' extraResources: - 'libraries' diff --git a/patches/helios-core+2.2.1.patch b/patches/helios-core+2.2.1.patch index 29b7028..ef7c712 100644 --- a/patches/helios-core+2.2.1.patch +++ b/patches/helios-core+2.2.1.patch @@ -1,26 +1,30 @@ diff --git a/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.d.ts b/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.d.ts -index 49f2b19..cf661ce 100644 +index 49f2b19..794b2f6 100644 --- a/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.d.ts +++ b/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.d.ts -@@ -44,7 +44,7 @@ export interface UpptimeSummary { +@@ -44,8 +44,8 @@ export interface UpptimeSummary { export declare class MojangRestAPI { private static readonly logger; private static readonly TIMEOUT; - static readonly AUTH_ENDPOINT = "https://authserver.mojang.com"; +- static readonly STATUS_ENDPOINT = "https://raw.githubusercontent.com/AventiumSoftworks/helios-status-page/master/history/summary.json"; + static readonly AUTH_ENDPOINT = "https://auth.oier.ovh/api/yggdrasil/authserver"; - static readonly STATUS_ENDPOINT = "https://raw.githubusercontent.com/AventiumSoftworks/helios-status-page/master/history/summary.json"; ++ static readonly STATUS_ENDPOINT = "https:/patatapack.oier.ovh/status.json"; private static authClient; private static statusClient; + static readonly MINECRAFT_AGENT: Agent; diff --git a/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.js b/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.js -index 3fbc718..ba38f57 100644 +index 3fbc718..3f2009c 100644 --- a/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.js +++ b/node_modules/helios-core/dist/mojang/rest/MojangRestAPI.js -@@ -38,7 +38,7 @@ var MojangStatusColor; +@@ -38,8 +38,8 @@ var MojangStatusColor; class MojangRestAPI { static logger = LoggerUtil_1.LoggerUtil.getLogger('Mojang'); static TIMEOUT = 2500; - static AUTH_ENDPOINT = 'https://authserver.mojang.com'; +- static STATUS_ENDPOINT = 'https://raw.githubusercontent.com/AventiumSoftworks/helios-status-page/master/history/summary.json'; + static AUTH_ENDPOINT = 'https://auth.oier.ovh/api/yggdrasil/authserver'; - static STATUS_ENDPOINT = 'https://raw.githubusercontent.com/AventiumSoftworks/helios-status-page/master/history/summary.json'; ++ static STATUS_ENDPOINT = 'https:/patatapack.oier.ovh/status.json'; static authClient = got_1.default.extend({ prefixUrl: MojangRestAPI.AUTH_ENDPOINT, + responseType: 'json',