Skip to main content

Recording and replay

The recorder plugin is active on every proxy connection.

const recorder = connection.pluginManager.getPlugin("recorder");
if (!recorder) throw new Error("Recorder plugin is unavailable");

Record packets​

A normal recording stores client-to-server packets for replay. It ignores keep_alive by default.

recorder.startRecording({
fileName: "farm-route",
ignorePackets: ["keep_alive", "position"],
});

recorder.stopRecording();

A debug recording stores both directions. It truncates oversized decoded packets, so use it to inspect traffic rather than replay it.

recorder.startDebugRecording({ fileName: "login-debug" });
recorder.stopDebugRecording();

getRecordingId() and getDebugRecordingId() return the active recording id when one exists.

Replay​

await recorder.startReplay("farm-route");
recorder.stopReplay();

Replay only sends recorded client-to-server packets. It keeps keep-alive and proxy command packets flowing while it runs.

The recorder keeps older recording files working. Files without a direction field are treated as client-to-server recordings.