Repository navigation
lib-pixelstreamingsignalling-ue5.7-0.5.1
·
134 commits
to master
since this release
@epicgames-ps/lib-pixelstreamingsignalling-ue5.6
0.5.1
Patch Changes
- 2d098e4: Leave the previous streamer when an SFU subscribes to another.
SFUConnection.subscribeoverwrotesubscribedStreamerwithout unsubscribing from the old streamer, so the old streamer kept forwarding to the SFU and kept the SFU's listeners. When that old streamer later disconnected, it detached the SFU from the streamer it was actually on and dropped the SFU's players.PlayerConnectionalready unsubscribes first; the SFU now does the same. - 281e6cc: Bound what the signalling server writes to its log. Every message a player sent was written to the log file whole, and the daily file had no size limit, so a client could make the log grow as fast as it could send. Log text and protocol messages longer than 16 KiB are now cut to that length, with their full length noted, and the log files are limited in size and number: by default 14 files of 100 MB, set with
logMaxSizeandlogMaxFilesinInitLogging, or--log_max_sizeand--log_max_filesin wilbur. Files are now kept by count rather than for 14 days. - 01fd040: Stop malformed messages from crashing the signalling server. A message whose JSON is
nullthrew from the protocol's message handler, and since that handler runs inside the websocket's message event, any client could take the process down with one frame. Such a message is now rejected and logged, like unparseable JSON. A streamer'sdisconnectPlayerwith a reason over 123 bytes, or one that is not a string, madewsthrow in the same way; the reason is now dropped and the player is still disconnected. A non-string endpoint id from a streamer was stored as its id and broke the next streamer registration; it is now treated as no id. - 6d53a43: Limit websocket messages on the streamer, player and SFU ports to 1 MiB. ws accepts up to 100 MiB in one message by default, and signalling messages are a few kilobytes. A connection that sends more is closed with code 1009. Setting
maxPayloadinstreamerWsOptions,playerWsOptionsorsfuWsOptionsoverrides the limit for that port. - Updated dependencies [01fd040]
- @epicgames-ps/lib-pixelstreamingcommon-ue5.7@0.1.6
0.5.0
Minor Changes
- 818a5d1: Allow TURN credentials to be issued per connection rather than shared by every session.
peerOptionsis static, so a credential written there is sent to every peer that ever connects and cannot be changed without a redeploy — the weakness noted in tip 3 of the security guidelines.IServerConfig.peerOptionsProvideris consulted once per connecting peer and returns the peer options for that peer, falling back topeerOptionsif it throws. On top of it the signalling server adds--turn_secret(or--turn_secret_file) and--turn_ttl, which give everyturn:/turns:entry a time limited username and credential in the form coturn'suse-auth-secretmode expects. Default behaviour is unchanged when no secret is supplied. SeeDocs/Security-Guidelines.md.
Patch Changes
- 65793ed: Stop an unsubscribed player from crashing the signalling server. When a player sends a message without being subscribed,
sendToStreamerforce-subscribes it to the first available streamer and then forwards throughthis.subscribedStreamer!.subscribe()can decline — most commonly becausemaxSubscribersis already reached — and reports that only by leavingsubscribedStreamerunset, so the non-null assertions throw a TypeError out of a websocket message handler and take the process down, disconnecting every other player. It now checks the subscription took, and disconnects just that player if it did not. - 1b9c43c: Add an optional server-side keepalive that disconnects players whose connection has died without a clean close. Previously
KeepaliveMonitorwas only used on the client, so a player whose socket dropped silently (sleeping laptop, lost Wi-Fi, killed tab) stayed subscribed until the OS TCP keepalive reaped it, which could hold amaxSubscribersslot in the meantime. The newIServerConfig.playerKeepaliveTimeoutcontrols this; the signalling server exposes it as--player_keepalive_timeout <milliseconds>(default 30000, 0 disables).
0.4.0
Minor Changes
- 568133c: Add extension points so consumers can plug in their own authentication and authorization without the library shipping an auth scheme. Connections now expose the HTTP upgrade
request(IStreamer.request/IPlayer.request) so identity attached during averifyClientcheck survives to later decisions, andIServerConfig.authorizeStreamerIdlets a consumer authorize, override (e.g. namespace per tenant), or reject the id a streamer registers as — the seam for preventing streamer-id squatting. Default behaviour is unchanged when these are not supplied. SeeDocs/Security-Guidelines.md.
Patch Changes
- 1d54751: Enforce streamer/player subscription when routing signalling messages. Previously
StreamerConnection.forwardMessage,StreamerConnection.onDisconnectPlayerRequestandSFUConnection.sendToPlayerresolved their target via the global player registry without checking that the player was subscribed to the sending streamer/SFU. On a signalling server shared by multiple streamers this let one streamer send forgedoffer/answer/iceCandidatemessages to, or disconnect, players belonging to another streamer. These paths now drop messages for players that are not in the streamer'ssubscribersset. SFU connections now register themselves as a subscriber of their upstream streamer so messages destined for the SFU continue to be forwarded.
0.3.0
Minor Changes
- b0550d4: Add CORS support to the signalling web server. A new
IWebServerConfig.corsoption registers thecorsExpress middleware before the rate limiter and any route handlers, so that custom frontends hosted on a different origin can call the REST API (--rest_api) or any other route mounted on the app. Wilbur exposes this through a--corsCLI flag (default off) plus--cors_allowed_origins,--cors_allowed_methods,--cors_allowed_headers, and--cors_credentials. All four sub-options accept comma-separated values and read matchingcors*keys fromconfig.json. When--corsis set without an explicit origin list, all origins are allowed. - 9308aa4: Make the REST API reachable when Wilbur is started with
--rest_apibut without--serve. Previously the Express app that hosts the/api/*routes was only bound to an HTTP listener inside theservebranch, so with--serve=false --rest_api=truethe listener never started and requests were answered by the WebSocket upgrade handler on the player port (426 Upgrade Required). The HTTP listener now starts wheneverrest_apiorserveis set. Static file serving and the homepage route are gated by a newIWebServerConfig.serveStaticflag (the port listener runs independently of static serving), and the rate limiter is registered before any route handlers so the homepage and any downstream-registered routes are all rate-limited. Wilbur logs at startup which mode it is running in.
Patch Changes
- c3e46a8: - Addressing security issues raised by dependabot. (glob, js-yaml, playwright)
- Added lint npm script to the root project. Running
npm run lintwill now run linting over all packages.
- Added lint npm script to the root project. Running
- 5696f2e: Make
npm run lintwork regardless of the directory it's invoked from. Each workspace'seslint.config.mjsnow pinsparserOptions.tsconfigRootDirtoimport.meta.dirname, soparserOptions.projectresolves relative to the config file's own directory rather than whichever CWDtypescript-eslinthappens to pick by default. Previously the six workspace configs prefixedprojectwith the workspace directory (e.g.'Common/tsconfig.cjs.json'), which only worked under one specifictypescript-eslintversion's resolution behavior and broke CI when run from within the workspace. - Updated dependencies [c3e46a8]
- Updated dependencies [5696f2e]
- @epicgames-ps/lib-pixelstreamingcommon-ue5.7@0.1.5
0.2.1
Patch Changes
- 812a419: - Addressing security issues raised by dependabot. (glob, js-yaml, playwright)
- Added lint npm script to the root project. Running
npm run lintwill now run linting over all packages.
- Added lint npm script to the root project. Running
- Updated dependencies [812a419]
- @epicgames-ps/lib-pixelstreamingcommon-ue5.7@0.1.4
0.2.0
Minor Changes
-
05bebea: Add: Ability to access player id on the frontend.
QoL: Remove player id stripping from the signalling library.It is useful to be able to use the player id as a unique identifier that is common between UE side stats and frontend side stats; however, the player id is not actually exposed to TS/JS because the SS strips it out of signalling messages.
This change is a backport of "Exposed playerid" (#728)