Signal: add REST API support for containerized deployments#6
Open
BingqingLyu wants to merge 1 commit into
Open
Signal: add REST API support for containerized deployments#6BingqingLyu wants to merge 1 commit into
BingqingLyu wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bbernhard/signal-cli-rest-apiDocker image uses REST + WebSocket endpoints that don't exist in the current implementation, causing 404 errors and failed connections.client-adapter.ts) with a new container client (client-container.ts) that routes between native JSON-RPC and container REST modes. Includes auto-detection,channels.signal.apiModeconfig, WebSocket event streaming, and base64 attachment encoding for the container/v2/sendendpoint.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
bbernhard/signal-cli-rest-apiDocker containers out of the box.channels.signal.apiModeconfig option ("auto"|"native"|"container"). Default"auto"auto-detects the mode./v2/send) + WebSocket (/v1/receive/{account}) instead of JSON-RPC + SSE.Security Impact (required)
NoNoYes— container mode uses different endpoints (/v2/send,/v1/receive,/v1/about,/v1/typing-indicator,/v1/receipts,/v1/reactions) on the same configuredhttpUrlNoNohttpUrl. No new external network access.Repro + Verification
Environment
Steps
bbernhard/signal-cli-rest-apicontainerchannels.signal.httpUrlpointing to the containerExpected
Actual (before)
/api/v1/eventsand/api/v1/rpc, reconnect loopEvidence
pnpm build && pnpm check && pnpm testall passHuman Verification (required)
pnpm build,pnpm tsgo(0 errors),pnpm check(0 errors),pnpm test src/signal(186 tests pass)Compatibility / Migration
YesYes— new optionalchannels.signal.apiModefield (default"auto", no action needed)NoFailure Recovery (if this breaks)
channels.signal.apiMode: "native"to force legacy modesrc/signal/client-container.ts,src/signal/client-adapter.tsRisks and Mitigations
apiMode: "native"or"container"