Skip to content

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

Merged
samlaf merged 1 commit into
mainfrom
rpc-ip-listen-addr
Jul 7, 2026
Merged

feat: add --rpc-ip to set the public RPC listen address#434
samlaf merged 1 commit into
mainfrom
rpc-ip-listen-addr

Conversation

@samlaf

@samlaf samlaf commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.

Base automatically changed from audit-may-2026 to main July 7, 2026 04:47
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.
@samlaf samlaf force-pushed the rpc-ip-listen-addr branch from f6e87f5 to e2c5421 Compare July 7, 2026 13:33
@samlaf samlaf requested a review from matthias-wright July 7, 2026 13:46
@samlaf samlaf merged commit 5dc22d8 into main Jul 7, 2026
4 checks passed
@samlaf samlaf deleted the rpc-ip-listen-addr branch July 7, 2026 13:50
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