From 4a5c0a13e455061bb535f890181e00cdb13b3779 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 20 Oct 2023 13:56:18 +0100 Subject: [PATCH] josh-proxy.rs: bind dualstacked (#1285) Binding on 0.0.0.0 will cause josh to only listen on IPv4, while specifying `[::]` will bind on *both* IPv4 and IPv6. --- josh-proxy/src/bin/josh-proxy.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/josh-proxy/src/bin/josh-proxy.rs b/josh-proxy/src/bin/josh-proxy.rs index 6fac078c..839fb271 100644 --- a/josh-proxy/src/bin/josh-proxy.rs +++ b/josh-proxy/src/bin/josh-proxy.rs @@ -1426,7 +1426,7 @@ fn trace_http_response_code(trace_span: Span, http_status: StatusCode) { #[tokio::main] async fn run_proxy() -> josh::JoshResult { - let addr = format!("0.0.0.0:{}", ARGS.port).parse()?; + let addr = format!("[::]:{}", ARGS.port).parse()?; let upstream = match (&ARGS.remote.http, &ARGS.remote.ssh) { (Some(http), None) => JoshProxyUpstream::Http(http.clone()), (None, Some(ssh)) => JoshProxyUpstream::Ssh(ssh.clone()),