Skip to content

Change default socket addresses to localhost #209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ cargo run -- [OPTIONS]
- `--builder-url <URL>`: URL of the builder execution engine (required)
- `--builder-jwt-token <TOKEN>`: JWT token for builder authentication (required)
- `--builder-jwt-path <PATH>`: Path to the builder JWT secret file (required if `--builder-jwt-token` is not provided)
- `--rpc-host <HOST>`: Host to run the server on (default: 0.0.0.0)
- `--rpc-host <HOST>`: Host to run the server on (default: 127.0.0.1)
- `--rpc-port <PORT>`: Port to run the server on (default: 8081)
- `--tracing`: Enable tracing (default: false)
- `--log-level <LEVEL>`: Log level (default: info)
- `--log-format <FORMAT>`: Log format (default: text)
- `--metrics`: Enable metrics (default: false)
- `--metrics-host <METRICS_HOST>`: Host to run the metrics server on (default: 127.0.0.1)
- `--debug-host <HOST>`: Host to run the server on (default: 127.0.0.1)
- `--debug-server-port <PORT>`: Port to run the debug server on (default: 5555)

Expand Down
4 changes: 2 additions & 2 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Args {
pub max_unsafe_interval: u64,

/// Host to run the server on
#[arg(long, env, default_value = "0.0.0.0")]
#[arg(long, env, default_value = "127.0.0.1")]
pub rpc_host: String,

/// Port to run the server on
Expand All @@ -52,7 +52,7 @@ pub struct Args {
pub metrics: bool,

/// Host to run the metrics server on
#[arg(long, env, default_value = "0.0.0.0")]
#[arg(long, env, default_value = "127.0.0.1")]
pub metrics_host: String,

/// Port to run the metrics server on
Expand Down
2 changes: 1 addition & 1 deletion src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ pub mod tests {

use super::*;

const AUTH_ADDR: &str = "0.0.0.0";
const AUTH_ADDR: &str = "127.0.0.1";
const SECRET: &str = "f79ae8046bc11c9927afe911db7143c51a806c4a537cc08e0d37140b0192f430";

pub fn get_available_port() -> u16 {
Expand Down
2 changes: 1 addition & 1 deletion src/health.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ mod tests {
+ 'static,
{
{
let listener = TcpListener::bind("0.0.0.0:0").await?;
let listener = TcpListener::bind("127.0.0.1:0").await?;
let addr = listener.local_addr()?;

let handle = tokio::spawn(async move {
Expand Down
4 changes: 2 additions & 2 deletions src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mod tests {
// None,
));

let temp_listener = TcpListener::bind("0.0.0.0:0").await?;
let temp_listener = TcpListener::bind("127.0.0.1:0").await?;
let server_addr = temp_listener.local_addr()?;
drop(temp_listener);

Expand Down Expand Up @@ -247,7 +247,7 @@ mod tests {

impl MockHttpServer {
async fn serve() -> eyre::Result<Self> {
let listener = TcpListener::bind("0.0.0.0:0").await?;
let listener = TcpListener::bind("127.0.0.1:0").await?;
let addr = listener.local_addr()?;
let requests = Arc::new(Mutex::new(vec![]));

Expand Down
Loading