wss://api.yourdomain.com/v1/aimjunkies-streamPersistent Full-Duplex WebSocket Stream
Establishes a persistent bi-directional connection between AimJunkies and your proprietary keygen server. Enforces immediate handshake authentication, sub-15ms push delivery, and telemetry keepalive.
| Name | Location | Type | Description |
|---|---|---|---|
| action* | frame | string | Set to "AUTH" for connection authentication, or "PING" for round-trip latency keepalive. |
| token* | frame | string | Your Root Master Security Token (aj_master_sec_sample_99a8b7c6d5e4f3a2b1c0). |
| timestamp* | frame | integer | Epoch millisecond timestamp used for anti-replay verification. |
import { WebSocketServer, WebSocket } from 'ws';
const wss = new WebSocketServer({ port: 8081 });
const MASTER_TOKEN = process.env.AIMJUNKIES_MASTER_TOKEN || 'aj_master_sec_sample_99a8b7c6d5e4f3a2b1c0';
wss.on('connection', (ws: WebSocket) => {
let authenticated = false;
ws.on('message', (raw: string) => {
const packet = JSON.parse(raw.toString());
// 1. Verify Mutual Handshake
if (packet.action === 'AUTH') {
if (packet.token === MASTER_TOKEN) {
authenticated = true;
return ws.send(JSON.stringify({ status: 'AUTHENTICATED', orgId: 'org_developer_hub' }));
}
return ws.close(4001, 'Unauthorized Master Token');
}
if (!authenticated) return ws.close(4002, 'Unauthenticated stream');
// 2. Handle Push Events
if (packet.event === 'ORDER_FULFILLMENT') {
ws.send(JSON.stringify({
status: 'SUCCESS',
orderId: packet.orderId,
licenseKey: 'SAMPLE-KEY-99A1-B882-C773',
instructions: 'Run loader as Admin.'
}));
}
});
});{
"status": "AUTHENTICATED",
"orgId": "org_developer_hub",
"operationalStatus": "OPERATIONAL",
"latencyMs": 12
}