Add WebSocket support for TrueNAS JSON-RPC 2.0 API#1538
Add WebSocket support for TrueNAS JSON-RPC 2.0 API#1538jaycollett wants to merge 1 commit intolinuxserver:2.xfrom
Conversation
TrueNAS is deprecating the REST API (api/v2.0/) in version 26.04, requiring migration to JSON-RPC 2.0 over WebSocket. This commit adds: - phrity/websocket dependency for WebSocket communication - TrueNASWebSocketClient helper class that handles: - Connection to ws(s)://host/api/current - Authentication via auth.login_with_api_key - JSON-RPC 2.0 request/response formatting - TLS verification toggle - Proper connection cleanup Refs: linuxserver#1530
|
This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Please actually merge this. |
|
This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions. |
|
What needs to be done to get someone to review this? Is this project still maintained? |
|
App changes need to be submitted here: https://github.com/linuxserver/heimdall-apps This is still maintained but new features aren't really being added, the apps repo is monitored by a couple community users who are able to approve PR's. |
|
It was submitted there, but it seems to require a change in both: linuxserver/Heimdall-Apps#889 |
Summary
TrueNAS is deprecating the REST API (
api/v2.0/) in version 26.04, requiring migration to JSON-RPC 2.0 over WebSocket. This PR adds the core WebSocket infrastructure needed to support TrueNAS CORE and SCALE apps.Changes
phrity/websocketdependency for WebSocket communicationTrueNASWebSocketClienthelper class that handles:ws(s)://host/api/currentauth.login_with_api_keyTechnical Details
The WebSocket client uses the
phrity/websocketv3.x library with proper SSL context configuration:Companion PR
This PR provides the core infrastructure. The TrueNAS app updates are in:
Both PRs need to be merged for full functionality. Existing TrueNAS apps will continue to work with REST API until the companion PR is merged.
References
Backward Compatibility
Test Plan