diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ff1e75..23ea665 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix: Farming Simulator handle possible missing mod attribute (By @yellowfromseegg #723) * Fix: BeamMP would not match on given port (#730) * Fix: version field would sometimes be a Number type (#735) +* Feat: Squad - Replace Valve protocol with EOS protocol (By @k3ithos #731) ## 5.3.1 * Fix: HTTP requests would end up making more retries than needed due to got's internal retry mechanism (#690, thanks @RattleSN4K3) diff --git a/GAMES_LIST.md b/GAMES_LIST.md index 184f03c..9f6c6eb 100644 --- a/GAMES_LIST.md +++ b/GAMES_LIST.md @@ -278,7 +278,7 @@ | sotf | Sons Of The Forest | [Valve Protocol](#valve) | | soulmask | Soulmask | [Valve Protocol](#valve) | | spaceengineers | Space Engineers | [Valve Protocol](#valve) | -| squad | Squad | [Valve Protocol](#valve) | +| squad | Squad | [EOS Protocol](#epic) | | ssl | SCP: Secret Labratory | [Notes](#ssl) | | sstse | Serious Sam: The Second Encounter | | | stalker | S.T.A.L.K.E.R. | | diff --git a/lib/games.js b/lib/games.js index 536df0e..a9f26d0 100644 --- a/lib/games.js +++ b/lib/games.js @@ -2825,8 +2825,7 @@ export const games = { release_year: 2020, options: { port: 7787, - port_query: 27165, - protocol: 'valve' + protocol: 'squad' } }, swb: { diff --git a/protocols/index.js b/protocols/index.js index 34c8498..66efb97 100644 --- a/protocols/index.js +++ b/protocols/index.js @@ -49,6 +49,7 @@ import samp from './samp.js' import satisfactory from './satisfactory.js' import savage2 from './savage2.js' import soldat from './soldat.js' +import squad from './squad.js' import starmade from './starmade.js' import starsiege from './starsiege.js' import teamspeak2 from './teamspeak2.js' @@ -79,6 +80,6 @@ export { armagetron, ase, asa, assettocorsa, battlefield, brokeprotocol, brokeprotocolmaster, buildandshoot, cs2d, discord, doom3, eco, epic, factorio, farmingsimulator, ffow, fivem, gamespy1, gamespy2, gamespy3, geneshift, goldsrc, gtasao, hawakening, hawakeningmaster, hexen2, jc2mp, kspdmp, mafia2mp, mafia2online, minecraft, minecraftbedrock, minecraftvanilla, minetest, mumble, mumbleping, nadeo, openttd, palworld, quake1, quake2, quake3, renegadex, renegadexmaster, renown, rfactor, ragemp, samp, - satisfactory, soldat, savage2, starmade, starsiege, teamspeak2, teamspeak3, terraria, toxikk, tribes1, tribes1master, unreal2, ut3, valve, + satisfactory, soldat, savage2, squad, starmade, starsiege, teamspeak2, teamspeak3, terraria, toxikk, tribes1, tribes1master, unreal2, ut3, valve, vcmp, ventrilo, warsow, eldewrito, beammpmaster, beammp, dayz, theisleevrima, xonotic, altvmp, vintagestorymaster, vintagestory, sdtd, scpsl } diff --git a/protocols/squad.js b/protocols/squad.js new file mode 100644 index 0000000..eb3fc60 --- /dev/null +++ b/protocols/squad.js @@ -0,0 +1,20 @@ +import Epic from './epic.js' + +export default class squad extends Epic { + constructor () { + super() + + // OAuth2 credentials extracted by intercepting Squad traffic. + this.clientId = 'xyza7891J7d3GU8ZIwCoC5xdBsdoqVWA' + this.clientSecret = '4SLVBqAm09q776SIlQRTD6moM/bnGAWhDSqOxJAIS0s' + this.deploymentId = '5dee4062a90b42cd98fcad618b6636c2' + this.authByExternalToken = true + } + + async run (state) { + await super.run(state) + state.name = state.raw.attributes.SERVERNAME_s + state.password = state.raw.attributes.PASSWORD_b + state.version = state.raw.attributes.GAMEVERSION_s + } +}