simplex-chat / simplex-chat/simplex-chat

[Feature]: Optional bind address for CLI websocket server (-p flag)

Open
#6,608 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement terminal
Dominant language
Haskell
Stars
19.5k
Forks
1.4k
Avg merge
1d 20h
Merged PRs (30d)
71

Description

Is there an existing issue for this?
  • I have searched the existing issues
Platform

Linux

App version

v6.4.8.0

Feature

When running simplex-chat CLI in a Docker container with the -p flag for websocket server mode, the server binds to 127.0.0.1, making it inaccessible from outside the container.

Current workaround: Using socat to forward traffic from 0.0.0.0 to the localhost-bound websocket server.

Proposal: An optional flag (e.g., --ws-host) to specify the bind address for the websocket server. The default would remain 127.0.0.1 for security, with users explicitly opting in to bind to other addresses.

I've traced the code to runLocalTCPServer in simplexmq where the bind address is hardcoded. Happy to submit a PR if this approach is acceptable.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at runLocalTCPServer in simplexmq, where the issue says the websocket bind address is hardcoded, and trace how websocket server mode and the CLI -p flag reach it. Define the optional bind-address flag while preserving 127.0.0.1 by default, then verify that an explicitly supplied address allows access from outside a Docker container.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.