Skip to content

feat: add --rpc-ip to set the public RPC listen address#434

Open
samlaf wants to merge 1 commit into
audit-may-2026from
rpc-ip-listen-addr
Open

feat: add --rpc-ip to set the public RPC listen address#434
samlaf wants to merge 1 commit into
audit-may-2026from
rpc-ip-listen-addr

Conversation

@samlaf

@samlaf samlaf commented Jul 1, 2026

Copy link
Copy Markdown

The public RPC listener was hardcoded to 0.0.0.0. Deployments that front it with nginx want it bound to 127.0.0.1 so it isn't reachable off-box; the default stays 0.0.0.0 for direct/local setups and the testnet. Add --rpc-ip (mirrors --prom-ip; default 0.0.0.0), parse it to an IpAddr, and thread it into the public server. The admin RPC stays localhost-only.

Consolidate RpcServerBuilder's constructors while here: new()/new_localhost() delegate to a single new_with_listen_addr(), keeping the server hardening (http-only, batch cap, request timeout) in one place rather than duplicated.

The in-code RunFlags builders (testnet + e2e bins) set rpc_ip to 0.0.0.0, preserving their current behavior.

The public RPC listener was hardcoded to 0.0.0.0. Deployments that front it
with nginx want it bound to 127.0.0.1 so it isn't reachable off-box; the
default stays 0.0.0.0 for direct/local setups and the testnet. Add --rpc-ip
(mirrors --prom-ip; default 0.0.0.0), parse it to an IpAddr, and thread it
into the public server. The admin RPC stays localhost-only.

Consolidate RpcServerBuilder's constructors while here: new()/new_localhost()
delegate to a single new_with_listen_addr(), keeping the server hardening
(http-only, batch cap, request timeout) in one place rather than duplicated.

The in-code RunFlags builders (testnet + e2e bins) set rpc_ip to 0.0.0.0,
preserving their current behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant