From 9e7d0621f3db1e265cbc529dca4270af012d1c1a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 13:39:26 +0000 Subject: [PATCH 1/2] Allow overriding the build secret at runtime Store the build secret on PsyNet and add SetBuildSecret/GetBuildSecret, mirroring SetVersion/GetVersion, so callers can update it after a game patch without waiting for a new release. Document the PsyBuildSecret header and the version overrides in the README. Closes #23 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WssehDH7cG5ZuoFFptPrgJ --- README.md | 10 ++++++++++ psynet.go | 16 +++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a429df3..6b5ae7c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,14 @@ Comprehensive examples are available in the [`examples`](examples) directory. go get github.com/dank/rlapi ``` +### Game Version +The SDK ships with the game version, feature set and build secret of the latest known build. These change with every game update, so they can be overridden without waiting for a new release: +```go +psynet := rlapi.NewPsyNet() +psynet.SetVersion("", "") +psynet.SetBuildSecret("") +``` + ### Authentication Rocket League authentication always goes through [Epic Online Services (EOS)](https://dev.epicgames.com/docs/web-api-ref/authentication), either via the Epic Games Store (EGS) or by exchanging a Steam session ticket for an EOS token. @@ -86,6 +94,7 @@ _(Values may be outdated)_ | PsySig | ✅ | ✅ | | Base64-encoded HMAC signature of the body | | PsyBuildID | ✅ | ✅ | 151471783 | Varies by build | | PsyEnvironment | ✅ | ✅ | Prod | Varies by build | +| PsyBuildSecret | ✅ | | | Varies by build | | FeatureSet | ✅ | | PrimeUpdate55_1 | Varies by build | | User-Agent | | ✅ | RL Win/250811.43331.492665 gzip | Varies by build | | User-Agent | ✅ | | RL Win/250811.43331.492665 gzip (x86_64-pc-win32) curl-7.67.0 Schannel | Varies by build | @@ -110,6 +119,7 @@ The base URL for HTTP requests is: `https://api.rlpp.psynet.gg/rpc/`. PsyRequestID: PsyNetMessage_X_0 PsyBuildID: 151471783 PsyEnvironment: Prod +PsyBuildSecret: User-Agent: User-Agent: RL Win/250811.43331.492665 gzip (x86_64-pc-win32) curl-7.67.0 Schannel PsySig: Content-Type: application/x-www-form-urlencoded diff --git a/psynet.go b/psynet.go index a106c1e..c2700c8 100644 --- a/psynet.go +++ b/psynet.go @@ -44,6 +44,7 @@ type PsyNet struct { gameVersion string featureSet string buildID string + buildSecret string } type PsyRequest struct { @@ -74,6 +75,7 @@ func NewPsyNet() *PsyNet { gameVersion: gameVersion, featureSet: featureSet, buildID: strconv.Itoa(int(decodeBuildID(gameVersion))), + buildSecret: buildSecret, } } @@ -86,6 +88,7 @@ func NewPsyNetWithLogger(logger *slog.Logger) *PsyNet { gameVersion: gameVersion, featureSet: featureSet, buildID: strconv.Itoa(int(decodeBuildID(gameVersion))), + buildSecret: buildSecret, } } @@ -94,6 +97,7 @@ func (p *PsyNet) SetLogger(logger *slog.Logger) { } // SetVersion overrides the default game version and feature set. +// The build secret usually changes alongside them, see SetBuildSecret. func (p *PsyNet) SetVersion(gameVersion, featureSet string) { p.gameVersion = gameVersion p.featureSet = featureSet @@ -105,6 +109,16 @@ func (p *PsyNet) GetVersion() (gameVersion, featureSet string) { return p.gameVersion, p.featureSet } +// SetBuildSecret overrides the default PsyBuildSecret sent with HTTP requests. +func (p *PsyNet) SetBuildSecret(buildSecret string) { + p.buildSecret = buildSecret +} + +// GetBuildSecret returns the current build secret. +func (p *PsyNet) GetBuildSecret() string { + return p.buildSecret +} + func (p *PsyNet) establishSocket(url string, playerID PlayerID, psyToken string, sessionID string) (*PsyNetRPC, error) { p.logger.Debug("establishing websocket connection", slog.String("url", url)) @@ -144,7 +158,7 @@ func (p *PsyNet) postJSON(path []string, params interface{}, result interface{}) req.Header.Set("PsyEnvironment", "Prod") req.Header.Set("PsyRequestID", p.requestID.getID()) req.Header.Set("PsySig", generatePsySig(body)) - req.Header.Set("PsyBuildSecret", buildSecret) + req.Header.Set("PsyBuildSecret", p.buildSecret) resp, err := p.client.Do(req) if err != nil { From d2299e9068529c7f250ae6bf0b61882caed3360e Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 25 Sep 2026 13:45:18 +0000 Subject: [PATCH 2/2] Address review: drop SetVersion note, add Oxford comma Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01WssehDH7cG5ZuoFFptPrgJ --- README.md | 2 +- psynet.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 6b5ae7c..3a98c74 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ go get github.com/dank/rlapi ``` ### Game Version -The SDK ships with the game version, feature set and build secret of the latest known build. These change with every game update, so they can be overridden without waiting for a new release: +The SDK ships with the game version, feature set, and build secret of the latest known build. These change with every game update, so they can be overridden without waiting for a new release: ```go psynet := rlapi.NewPsyNet() psynet.SetVersion("", "") diff --git a/psynet.go b/psynet.go index c2700c8..b963f05 100644 --- a/psynet.go +++ b/psynet.go @@ -97,7 +97,6 @@ func (p *PsyNet) SetLogger(logger *slog.Logger) { } // SetVersion overrides the default game version and feature set. -// The build secret usually changes alongside them, see SetBuildSecret. func (p *PsyNet) SetVersion(gameVersion, featureSet string) { p.gameVersion = gameVersion p.featureSet = featureSet