Relay Package
WebSocket-to-UDP relay package for NQ (NetQuake) dedicated game servers.
Import path: github.com/0xBrsm/NexQuake/nexus/nqrelay
Module: github.com/0xBrsm/NexQuake/nexus (src/nexus/go.mod)
Versioned with: NexQuake commits/tags (not a separate module)
Full API documentation is in the Go source — run go doc ./... or visit
pkg.go.dev.
Vendoring checklist
- Frame format is fixed: 2-byte big-endian port header + payload. Keep client and relay in sync.
- Port
0is the control channel. Define your own payload semantics inHandleControlFrame. - Override
Upgrader.CheckOriginfor production deployments. - Set
IsAllowedPortto restrict clients to specific UDP destinations. - Keep
sourceKeystable across reconnects if deterministic virtual-IP identity matters.