diff --git a/Cargo.lock b/Cargo.lock index a40648b..37e6a28 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1614,7 +1614,7 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "wstunnel" -version = "7.9.1" +version = "7.9.2" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 2de4a56..9242686 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wstunnel" -version = "7.9.1" +version = "7.9.2" edition = "2021" repository = "https://github.com/erebe/wstunnel.git" diff --git a/src/tcp.rs b/src/tcp.rs index f4ceed9..83fbf79 100644 --- a/src/tcp.rs +++ b/src/tcp.rs @@ -112,6 +112,7 @@ pub async fn connect_with_http_proxy( info!("Connected to http proxy {}:{}", proxy_host, proxy_port); let authorization = if let Some((user, password)) = proxy.password().map(|p| (proxy.username(), p)) { + let user = urlencoding::decode(user).with_context(|| format!("Cannot urldecode proxy user: {}", user))?; let password = urlencoding::decode(password).with_context(|| format!("Cannot urldecode proxy password: {}", password))?; let creds = base64::engine::general_purpose::STANDARD.encode(format!("{}:{}", user, password));