Skip to content

Commit 4a5c0a1

Browse files
authored
josh-proxy.rs: bind dualstacked (josh-project#1285)
Binding on 0.0.0.0 will cause josh to only listen on IPv4, while specifying `[::]` will bind on *both* IPv4 and IPv6.
1 parent 1586eab commit 4a5c0a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

josh-proxy/src/bin/josh-proxy.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,7 @@ fn trace_http_response_code(trace_span: Span, http_status: StatusCode) {
14261426

14271427
#[tokio::main]
14281428
async fn run_proxy() -> josh::JoshResult<i32> {
1429-
let addr = format!("0.0.0.0:{}", ARGS.port).parse()?;
1429+
let addr = format!("[::]:{}", ARGS.port).parse()?;
14301430
let upstream = match (&ARGS.remote.http, &ARGS.remote.ssh) {
14311431
(Some(http), None) => JoshProxyUpstream::Http(http.clone()),
14321432
(None, Some(ssh)) => JoshProxyUpstream::Ssh(ssh.clone()),

0 commit comments

Comments
 (0)