Skip to content

Commit

Permalink
josh-proxy.rs: bind dualstacked (#1285)
Browse files Browse the repository at this point in the history
Binding on 0.0.0.0 will cause josh to only listen on IPv4, while
specifying `[::]` will bind on *both* IPv4 and IPv6.
  • Loading branch information
flokli authored Oct 20, 2023
1 parent 1586eab commit 4a5c0a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion josh-proxy/src/bin/josh-proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@ fn trace_http_response_code(trace_span: Span, http_status: StatusCode) {

#[tokio::main]
async fn run_proxy() -> josh::JoshResult<i32> {
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()),
Expand Down

0 comments on commit 4a5c0a1

Please sign in to comment.