Skip to content

Commit

Permalink
make Caddy server happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 25, 2024
1 parent 91effcd commit 9d40330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ pub(crate) async fn create_ws_stream<S: AsyncRead + AsyncWrite + Unpin>(
let tunnel_path = config.tunnel_path.extract().first().ok_or(err)?.trim_matches('/');

let b64_dst = dst_addr.as_ref().map(|dst_addr| addess_to_b64str(dst_addr, false));
let host = client.server_domain.as_ref().unwrap_or(&client.server_host);

let uri = format!("ws://{}/{}/", client.server_host, tunnel_path);
let uri = format!("ws://{}/{}/", host, tunnel_path);

let uri = WeirdUri::new(&uri, b64_dst, udp_tunnel, client.client_id.clone());

Expand Down

0 comments on commit 9d40330

Please sign in to comment.