From f7d91e3fa2e1b6df0ce097588a52cb70ea3926d5 Mon Sep 17 00:00:00 2001 From: Eric Rodrigues Pires Date: Thu, 9 Jul 2026 20:18:59 -0300 Subject: [PATCH] Attempt to fix Docker build and downgrade russh --- .github/workflows/docker.yml | 6 ++ CHANGELOG.md | 1 + Cargo.lock | 76 ++++++++----------- Cargo.toml | 2 +- src/ssh/forwarding.rs | 20 ++--- src/ssh/mod.rs | 38 +++------- tests/integration/admin_interface.rs | 3 - tests/integration/admin_missing_pty.rs | 3 - .../admin_no_interface_if_forwarding.rs | 3 - .../admin_no_interface_if_proxying.rs | 3 - tests/integration/admin_remove_user.rs | 7 +- tests/integration/admin_window_change.rs | 3 - tests/integration/alias_aliasing_tunnel.rs | 3 - tests/integration/alias_http2.rs | 4 +- tests/integration/alias_http_aliases.rs | 7 +- .../integration/alias_ip_connections_limit.rs | 3 - .../alias_local_forward_existing_http.rs | 7 +- tests/integration/alias_pool_limit.rs | 4 +- tests/integration/alias_pool_timeout.rs | 4 +- .../integration/alias_rate_limit_download.rs | 3 - tests/integration/alias_rate_limit_upload.rs | 3 - .../alias_require_allowed_fingerprints.rs | 3 - tests/integration/alias_timeout.rs | 4 +- .../auth_prevent_unauthorized_actions.rs | 3 - .../integration/auth_self_hosted_login_api.rs | 4 +- .../config_authenticate_any_key_as_user.rs | 7 +- tests/integration/config_disable_aliasing.rs | 7 +- tests/integration/config_disable_http.rs | 7 +- tests/integration/config_disable_tcp.rs | 7 +- .../connection_deny_load_balancing.rs | 3 - .../integration/connection_load_balancing.rs | 5 -- .../http_addressing_profanities_domain.rs | 7 +- .../http_addressing_profanities_subdomain.rs | 7 +- tests/integration/http_force_https_by_user.rs | 9 +-- tests/integration/http_pool_limit.rs | 7 +- tests/integration/http_pool_timeout.rs | 7 +- tests/integration/http_redirects.rs | 7 +- tests/integration/http_rewrite_host.rs | 4 +- .../integration/http_simultaneous_requests.rs | 7 +- tests/integration/http_timeout.rs | 7 +- tests/integration/https_bind_all_hostnames.rs | 7 +- .../https_connect_ssh_on_https_port.rs | 7 +- .../https_force_random_subdomains.rs | 7 +- tests/integration/https_http11_fallback.rs | 3 - tests/integration/https_http2.rs | 4 +- .../https_multi_stream_download.rs | 4 +- .../integration/https_multi_stream_upload.rs | 4 +- ...https_random_subdomains_with_fixed_seed.rs | 7 +- ..._random_subdomains_with_fixed_seed_file.rs | 7 +- .../integration/https_rate_limit_download.rs | 7 +- tests/integration/https_rate_limit_upload.rs | 7 +- .../https_single_stream_download.rs | 4 +- .../integration/https_single_stream_upload.rs | 4 +- tests/integration/ipv6_blocklist_by_user.rs | 7 +- .../integration/lib_configure_from_scratch.rs | 4 +- tests/integration/quota_maximum_per_user.rs | 7 +- tests/integration/sni_aliasing.rs | 4 +- tests/integration/sni_aliasing_timeout.rs | 4 +- tests/integration/sni_proxy.rs | 4 +- tests/integration/sni_timeout.rs | 4 +- tests/integration/ssh_client_timeout.rs | 4 +- ...ssh_ignore_data_on_non_session_channels.rs | 3 - tests/integration/ssh_proxy_jump.rs | 12 +-- tests/integration/ssh_rate_limit_download.rs | 12 +-- tests/integration/ssh_rate_limit_upload.rs | 12 +-- .../integration/tcp_allow_requested_ports.rs | 3 - tests/integration/tcp_assign_random_port_0.rs | 3 - tests/integration/tcp_bind_random_ports.rs | 3 - tests/integration/tcp_ip_connections_limit.rs | 7 +- .../integration/tcp_multi_stream_download.rs | 4 +- tests/integration/tcp_multi_stream_upload.rs | 4 +- tests/integration/tcp_pool_timeout.rs | 7 +- tests/integration/tcp_rate_limit_download.rs | 3 - tests/integration/tcp_rate_limit_upload.rs | 3 - tests/integration/tcp_reject_low_ports.rs | 3 - .../integration/tcp_reject_port_above_max.rs | 3 - tests/integration/tcp_timeout.rs | 3 - .../integration/udp_allow_requested_ports.rs | 3 - tests/integration/udp_assign_random_port_0.rs | 3 - tests/integration/udp_bind_random_ports.rs | 3 - tests/integration/udp_ip_connections_limit.rs | 7 +- tests/integration/udp_multi_stream.rs | 4 +- tests/integration/udp_rate_limit.rs | 3 - tests/integration/udp_timeout.rs | 3 - tests/integration/websocket_connection.rs | 3 - tests/integration/websocket_timeout.rs | 3 - 86 files changed, 118 insertions(+), 424 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 27b2160..c0ab559 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,6 +49,10 @@ jobs: permissions: contents: read packages: write + env: + # The runner ships a v1-format /etc/containers/registries.conf, which the + # newer skopeo from nixpkgs-unstable rejects. Point it at our own v2 file. + CONTAINERS_REGISTRIES_CONF: ${{ github.workspace }}/registries.conf steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: @@ -85,6 +89,8 @@ jobs: with: nix_path: nixpkgs=channel:nixpkgs-unstable github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Write v2 `registries.conf` + run: printf 'unqualified-search-registries = ["docker.io"]\n' > "${CONTAINERS_REGISTRIES_CONF}" - name: Install skopeo run: | nix-env -iA skopeo -f '' diff --git a/CHANGELOG.md b/CHANGELOG.md index 92a1400..94cea00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Changed - Update dependencies. +- Downgrade russh to 0.61.2. ## 0.10.2 (2026-07-05) diff --git a/Cargo.lock b/Cargo.lock index 3c866fe..edf9700 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1086,9 +1086,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "5.0.0-rc.1" +version = "5.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c906a87e53a36ff795d72e06e8162a83c5436e3ea89e942a9cb9fc083f0a384f" +checksum = "4f359e08ca85e7bd759e1fd933ff2bccd81864c60a8fba0e259c7f822b0924bf" dependencies = [ "cfg-if", "cpufeatures 0.3.0", @@ -1355,9 +1355,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.17.0" +version = "0.17.0-rc.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0681a4fc24c767085329728d8dfba959af91228aa4610cca4f8ce317ba46ae0" +checksum = "54fb064faabbee66e1fc8e5c5a9458d4269dc2d8b638fe86a425adb2510d1a96" dependencies = [ "der", "digest 0.11.3", @@ -1380,9 +1380,9 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "3.0.0-rc.1" +version = "3.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1685663e23882cd8517dcbcb1c23a6ebff4433c22dfb681d760219b62cd1b849" +checksum = "b011170fe4f04665565b4110afef66774fe9ffff278f3eb5b81cc73d26e27d60" dependencies = [ "curve25519-dalek", "ed25519", @@ -1402,9 +1402,9 @@ checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" [[package]] name = "elliptic-curve" -version = "0.14.1" +version = "0.14.0-rc.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d65aa39b3a5c1c9c1b745c9a019234bb7a21b77abcb4f4d266d706e2d577d65" +checksum = "102d3643d30dd8b559613c5cced68317199597fffb278cdc88daa2ef7fafc935" dependencies = [ "base16ct", "crypto-bigint", @@ -1414,6 +1414,7 @@ dependencies = [ "group", "hkdf", "hybrid-array", + "once_cell", "pem-rfc7468", "pkcs8", "rand_core 0.10.1", @@ -3170,9 +3171,9 @@ dependencies = [ [[package]] name = "p256" -version = "0.14.0-rc.15" +version = "0.14.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bb40a5099e2c38a09dd29321a7a7f045f165a54317679c7cdfb0cbaf8f6b1e" +checksum = "41adc63effe99d48837a8cc0e6d7a77e32ae6a07f6000df466178dbc2193093e" dependencies = [ "ecdsa", "elliptic-curve", @@ -3183,9 +3184,9 @@ dependencies = [ [[package]] name = "p384" -version = "0.14.0-rc.15" +version = "0.14.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "492f329d7eb11d22dadc988626b9ea1f503b4ab043a8b1e4e2cc4ae45dabdd70" +checksum = "9bd5333afa5ae0347f39e6a0f2c9c155da431583fd71fe5555bd0521b4ccaf02" dependencies = [ "ecdsa", "elliptic-curve", @@ -3197,9 +3198,9 @@ dependencies = [ [[package]] name = "p521" -version = "0.14.0-rc.15" +version = "0.14.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff42e4ace5424e3b6d7cb82514be89866b85af87015f80341e37dcc21a66ce6e" +checksum = "a3a5297f53dc16d35909060ba3032cff7867e8809f01e273ff325579d5f0ceae" dependencies = [ "base16ct", "ecdsa", @@ -3542,15 +3543,11 @@ dependencies = [ [[package]] name = "primeorder" -version = "0.14.0-rc.15" +version = "0.14.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478aa2e499c7164b21b4c5e8610018e5b83a284da5f9e0896907dd4749cd76c9" +checksum = "7d2793f22b9b6fd11ef3ac1d59bf003c2573593e4968702341605c2748fd90bf" dependencies = [ "elliptic-curve", - "once_cell", - "primefield", - "serdect", - "wnaf", ] [[package]] @@ -3999,12 +3996,12 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "rfc6979" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a459cddafb3fe76b31fd8f1108007566c40301feb64dc7b54656eb7388172b" +checksum = "5236ce872cac07e0fb3969b0cbf468c7d2f37d432f1b627dcb7b8d34563fb0c3" dependencies = [ - "crypto-bigint", "hmac", + "subtle", ] [[package]] @@ -4042,9 +4039,9 @@ dependencies = [ [[package]] name = "russh" -version = "0.62.1" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20d2039c3e50abb1ec3bdadea27098679da12a33befa9ab4e62adad9a13ebcb2" +checksum = "bbf893f64684e58da8a68d56a5e84d1cf0440226274c515770fe267707a7d0b0" dependencies = [ "aes", "aws-lc-rs", @@ -4114,9 +4111,9 @@ dependencies = [ [[package]] name = "russh-cryptovec" -version = "0.62.0" +version = "0.61.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aec6cb630dbe85d72ffd7bcd95f07e1bd69f9f270ee8adfa1afe443a6331438" +checksum = "443f6bbcfacb34a1aab2b12b99bf08e0c63abdc5a0db261901365df9d57fff51" dependencies = [ "log", "nix", @@ -4751,15 +4748,17 @@ dependencies = [ [[package]] name = "ssh-cipher" -version = "0.3.0" +version = "0.3.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d801accda99469cde6d73da741422610fdf6508a72d9a69d1b55cb241c720597" +checksum = "10db6f219196a8528f9ec904d9d45cdad692d65b0e57e72be4dedd1c5fddce36" dependencies = [ "aead", "aes", "aes-gcm", + "cbc", "chacha20", "cipher", + "ctr", "ctutils", "des", "poly1305", @@ -4769,9 +4768,9 @@ dependencies = [ [[package]] name = "ssh-encoding" -version = "0.3.0" +version = "0.3.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b54d0ed0498daf3f78d82e00e28c8eec9d75a067c4cfbcc7a0f7d0f4077749e" +checksum = "7abf34aa716da5d5b4c496936d042ea282ab392092cd68a72ef6a8863ff8c96a" dependencies = [ "base64ct", "bytes", @@ -4784,9 +4783,9 @@ dependencies = [ [[package]] name = "ssh-key" -version = "0.7.0-rc.11" +version = "0.7.0-rc.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a32fae177b74a22aa9c5b01bf7e68b33545be32d9e381e248058d2adc15ce3" +checksum = "45735ce3dea95690e4a9e414c4cfde7f79835063c3dcd35881df85a84118e74b" dependencies = [ "argon2", "bcrypt-pbkdf", @@ -6188,17 +6187,6 @@ dependencies = [ "wasmparser", ] -[[package]] -name = "wnaf" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab12e7090f27e2ffd9322651492942d50c2926094af30601e1964337db39daf1" -dependencies = [ - "ff", - "group", - "hybrid-array", -] - [[package]] name = "writeable" version = "0.6.3" diff --git a/Cargo.toml b/Cargo.toml index c5c0757..0edb756 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,7 @@ reqwest = { version = "0.13.4", optional = true, default-features = false, featu "json", "rustls", ] } -russh = "0.62.1" +russh = "0.61.2" rustls = "0.23.40" rustls-acme = { version = "0.15.3", optional = true, default-features = false, features = [ "tokio", diff --git a/src/ssh/forwarding.rs b/src/ssh/forwarding.rs index 31cdc30..2cbee19 100644 --- a/src/ssh/forwarding.rs +++ b/src/ssh/forwarding.rs @@ -1229,7 +1229,7 @@ impl ForwardingHandlerStrategy for AliasForwardingHandler { "{} {} Cannot listen on port {} for alias {} ({})\r\n", Utc::now().to_rfc3339().dimmed(), " Error ".black().on_red().bold(), - &assigned_port, + assigned_port, address, error, ) @@ -1254,7 +1254,7 @@ impl ForwardingHandlerStrategy for AliasForwardingHandler { Utc::now().to_rfc3339().dimmed(), "Starting alias".green().bold(), address, - &assigned_port, + assigned_port, ) .into_bytes(), ); @@ -1636,7 +1636,7 @@ impl ForwardingHandlerStrategy for TcpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &port, + port, error, ) .into_bytes(), @@ -1688,7 +1688,7 @@ impl ForwardingHandlerStrategy for TcpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port, + assigned_port, error, ) .into_bytes(), @@ -1716,7 +1716,7 @@ impl ForwardingHandlerStrategy for TcpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port, + assigned_port, ) .into_bytes(), ); @@ -1753,7 +1753,7 @@ impl ForwardingHandlerStrategy for TcpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port.0, + assigned_port.0, ) .into_bytes(), ); @@ -2014,7 +2014,7 @@ impl ForwardingHandlerStrategy for UdpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &port, + port, error, ) .into_bytes(), @@ -2066,7 +2066,7 @@ impl ForwardingHandlerStrategy for UdpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port, + assigned_port, error, ) .into_bytes(), @@ -2094,7 +2094,7 @@ impl ForwardingHandlerStrategy for UdpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port, + assigned_port, ) .into_bytes(), ); @@ -2131,7 +2131,7 @@ impl ForwardingHandlerStrategy for UdpForwardingHandler { .domain .as_deref() .unwrap_or(""), - &assigned_port.0, + assigned_port.0, ) .into_bytes(), ); diff --git a/src/ssh/mod.rs b/src/ssh/mod.rs index 7e3e828..50f6ad9 100644 --- a/src/ssh/mod.rs +++ b/src/ssh/mod.rs @@ -40,9 +40,9 @@ use enumflags2::BitFlags; use ipnet::IpNet; use owo_colors::OwoColorize; use russh::{ - Channel, ChannelId, ChannelOpenFailure, MethodKind, MethodSet, + Channel, ChannelId, MethodKind, MethodSet, keys::{HashAlg, PublicKey, ssh_key::Fingerprint}, - server::{Auth, ChannelOpenHandle, Handler, Msg, Session}, + server::{Auth, Handler, Msg, Session}, }; #[cfg_attr(not(feature = "login"), allow(unused_imports))] use tokio::time::timeout; @@ -146,18 +146,14 @@ impl Handler for ServerHandler { async fn channel_open_session( &mut self, channel: Channel, - reply: ChannelOpenHandle, _session: &mut Session, - ) -> Result<(), Self::Error> { + ) -> Result { // Only the first session will receive data. Others are rejected. let Some(mut rx) = self.rx.take() else { if matches!(self.auth_data, AuthenticatedData::None { .. }) { return Err(russh::Error::Disconnect); } - reply - .reject(ChannelOpenFailure::AdministrativelyProhibited) - .await; - return Ok(()); + return Ok(false); }; self.channel_id = Some(channel.id()); let graceful_cancellation_token = CancellationToken::new(); @@ -192,8 +188,7 @@ impl Handler for ServerHandler { } }); self.open_session_join_handle = Some(DroppableHandle(join_handle)); - reply.accept().await; - Ok(()) + Ok(true) } // Return the default authentication method. @@ -948,7 +943,7 @@ impl Handler for ServerHandler { // Handle a local forwarding request (i.e. proxy tunnel for aliases). #[cfg_attr( not(coverage_nightly), - tracing::instrument(skip(self, reply, _session), fields(peer = %self.peer), level = "debug") + tracing::instrument(skip(self, _session), fields(peer = %self.peer), level = "debug") )] async fn channel_open_direct_tcpip( &mut self, @@ -957,9 +952,8 @@ impl Handler for ServerHandler { port_to_connect: u32, originator_address: &str, originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, - ) -> Result<(), Self::Error> { + ) -> Result { // Reject invalid ports if port_to_connect > u16::MAX.into() || originator_port > u16::MAX.into() { return Err(russh::Error::Disconnect); @@ -975,10 +969,8 @@ impl Handler for ServerHandler { ) .into_bytes(), ); - reply - .reject(ChannelOpenFailure::AdministrativelyProhibited) - .await; - return Ok(()); + + return Ok(false); } if let AuthenticatedData::Admin { admin_data, .. } = &mut self.auth_data { if admin_data.admin_interface.is_some() { @@ -991,10 +983,7 @@ impl Handler for ServerHandler { .into_bytes(), ); self.cancellation_token.cancel(); - reply - .reject(ChannelOpenFailure::AdministrativelyProhibited) - .await; - return Ok(()); + return Ok(false); } else { admin_data.is_forwarding = true; } @@ -1016,13 +1005,10 @@ impl Handler for ServerHandler { ) .await? { - reply.accept().await; + Ok(true) } else { - reply - .reject(ChannelOpenFailure::AdministrativelyProhibited) - .await; + Ok(false) } - Ok(()) } } diff --git a/tests/integration/admin_interface.rs b/tests/integration/admin_interface.rs index d2ba262..13947fb 100644 --- a/tests/integration/admin_interface.rs +++ b/tests/integration/admin_interface.rs @@ -2,7 +2,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use regex::Regex; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -632,14 +631,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/admin_missing_pty.rs b/tests/integration/admin_missing_pty.rs index becea01..929e69c 100644 --- a/tests/integration/admin_missing_pty.rs +++ b/tests/integration/admin_missing_pty.rs @@ -2,7 +2,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use regex::Regex; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -232,14 +231,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/admin_no_interface_if_forwarding.rs b/tests/integration/admin_no_interface_if_forwarding.rs index 3bc3072..42af112 100644 --- a/tests/integration/admin_no_interface_if_forwarding.rs +++ b/tests/integration/admin_no_interface_if_forwarding.rs @@ -2,7 +2,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use regex::Regex; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -238,14 +237,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/admin_no_interface_if_proxying.rs b/tests/integration/admin_no_interface_if_proxying.rs index bf340b0..2d0df4e 100644 --- a/tests/integration/admin_no_interface_if_proxying.rs +++ b/tests/integration/admin_no_interface_if_proxying.rs @@ -2,7 +2,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use russh::ChannelId; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -214,7 +213,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -222,7 +220,6 @@ impl russh::client::Handler for SshClient { sleep(Duration::from_secs(1)).await; channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/admin_remove_user.rs b/tests/integration/admin_remove_user.rs index 12423ba..412d42c 100644 --- a/tests/integration/admin_remove_user.rs +++ b/tests/integration/admin_remove_user.rs @@ -9,14 +9,11 @@ use hyper_util::{ server::conn::auto::Builder, }; use regex::Regex; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{self, Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use serde::Deserialize; use tokio::{ @@ -443,7 +440,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { #[derive(Debug, Deserialize)] @@ -472,7 +468,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/admin_window_change.rs b/tests/integration/admin_window_change.rs index 91a4b24..e82bca5 100644 --- a/tests/integration/admin_window_change.rs +++ b/tests/integration/admin_window_change.rs @@ -2,7 +2,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use regex::Regex; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -246,14 +245,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_aliasing_tunnel.rs b/tests/integration/alias_aliasing_tunnel.rs index 32d4a4d..82cb5ea 100644 --- a/tests/integration/alias_aliasing_tunnel.rs +++ b/tests/integration/alias_aliasing_tunnel.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -206,14 +205,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Poor man's VPN..."[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_http2.rs b/tests/integration/alias_http2.rs index 17b97b8..94906d9 100644 --- a/tests/integration/alias_http2.rs +++ b/tests/integration/alias_http2.rs @@ -8,7 +8,7 @@ use hyper::{StatusCode, body::Incoming, server::conn::http2::Builder, service::s use hyper_util::rt::{TokioExecutor, TokioIo}; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ ChannelId, @@ -211,7 +211,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -231,7 +230,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/alias_http_aliases.rs b/tests/integration/alias_http_aliases.rs index f4a92ab..06b1333 100644 --- a/tests/integration/alias_http_aliases.rs +++ b/tests/integration/alias_http_aliases.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, ChannelId, client::{self, Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -343,7 +340,6 @@ impl russh::client::Handler for SshClientProxy { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || StatusCode::NO_CONTENT)); @@ -354,7 +350,6 @@ impl russh::client::Handler for SshClientProxy { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/alias_ip_connections_limit.rs b/tests/integration/alias_ip_connections_limit.rs index 0df977f..b59ad44 100644 --- a/tests/integration/alias_ip_connections_limit.rs +++ b/tests/integration/alias_ip_connections_limit.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -240,7 +239,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -249,7 +247,6 @@ impl russh::client::Handler for SshClient { channel.eof().await.unwrap(); channel.close().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_local_forward_existing_http.rs b/tests/integration/alias_local_forward_existing_http.rs index e6e06e6..78df2bf 100644 --- a/tests/integration/alias_local_forward_existing_http.rs +++ b/tests/integration/alias_local_forward_existing_http.rs @@ -11,14 +11,11 @@ use hyper_util::{ }; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key, ssh_key::private::Ed25519Keypair}; use russh::{ Channel, client::{self, Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key, ssh_key::private::Ed25519Keypair}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -199,7 +196,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Connected via local forwarding!")); @@ -210,7 +206,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_pool_limit.rs b/tests/integration/alias_pool_limit.rs index eedeb2e..028a416 100644 --- a/tests/integration/alias_pool_limit.rs +++ b/tests/integration/alias_pool_limit.rs @@ -5,7 +5,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::ssh_key::private::Ed25519Keypair, }; use russh::{ @@ -224,7 +224,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -233,7 +232,6 @@ impl russh::client::Handler for SshClient { channel.eof().await.unwrap(); channel.close().await.unwrap(); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/alias_pool_timeout.rs b/tests/integration/alias_pool_timeout.rs index ca83ba1..8512ff9 100644 --- a/tests/integration/alias_pool_timeout.rs +++ b/tests/integration/alias_pool_timeout.rs @@ -8,7 +8,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::ssh_key::private::Ed25519Keypair, }; use russh::{ @@ -276,7 +276,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -285,7 +284,6 @@ impl russh::client::Handler for SshClient { channel.eof().await.unwrap(); channel.close().await.unwrap(); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/alias_rate_limit_download.rs b/tests/integration/alias_rate_limit_download.rs index 35ba2cb..ffe0348 100644 --- a/tests/integration/alias_rate_limit_download.rs +++ b/tests/integration/alias_rate_limit_download.rs @@ -5,7 +5,6 @@ use clap::Parser; use rand::{Rng, RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::ChannelMsg; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -187,7 +186,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -202,7 +200,6 @@ impl russh::client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_rate_limit_upload.rs b/tests/integration/alias_rate_limit_upload.rs index 8a3005c..a81be90 100644 --- a/tests/integration/alias_rate_limit_upload.rs +++ b/tests/integration/alias_rate_limit_upload.rs @@ -4,7 +4,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{Rng, RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -180,7 +179,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let mut data = vec![0u8; 55_000]; @@ -189,7 +187,6 @@ impl russh::client::Handler for SshClient { let mut stream = channel.into_stream(); stream.write_all(&data).await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_require_allowed_fingerprints.rs b/tests/integration/alias_require_allowed_fingerprints.rs index ccaa506..52ad452 100644 --- a/tests/integration/alias_require_allowed_fingerprints.rs +++ b/tests/integration/alias_require_allowed_fingerprints.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -216,7 +215,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -226,7 +224,6 @@ impl russh::client::Handler for SshClient { .unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/alias_timeout.rs b/tests/integration/alias_timeout.rs index 7611596..0f46289 100644 --- a/tests/integration/alias_timeout.rs +++ b/tests/integration/alias_timeout.rs @@ -5,7 +5,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, ChannelMsg, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::{key::PrivateKeyWithHashAlg, load_secret_key, ssh_key::private::Ed25519Keypair}, }; use sandhole::{ApplicationConfig, entrypoint}; @@ -276,7 +276,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -284,7 +283,6 @@ impl russh::client::Handler for SshClient { channel.data(&b"Hello, world!\n"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/auth_prevent_unauthorized_actions.rs b/tests/integration/auth_prevent_unauthorized_actions.rs index b2614fb..6e5e0f9 100644 --- a/tests/integration/auth_prevent_unauthorized_actions.rs +++ b/tests/integration/auth_prevent_unauthorized_actions.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -460,14 +459,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/auth_self_hosted_login_api.rs b/tests/integration/auth_self_hosted_login_api.rs index d133d7f..afd0521 100644 --- a/tests/integration/auth_self_hosted_login_api.rs +++ b/tests/integration/auth_self_hosted_login_api.rs @@ -9,7 +9,7 @@ use hyper_util::{ }; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ Disconnect, @@ -171,7 +171,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { #[derive(Debug, Deserialize)] @@ -200,7 +199,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/config_authenticate_any_key_as_user.rs b/tests/integration/config_authenticate_any_key_as_user.rs index 71fbc44..a6f83b9 100644 --- a/tests/integration/config_authenticate_any_key_as_user.rs +++ b/tests/integration/config_authenticate_any_key_as_user.rs @@ -12,14 +12,11 @@ use hyper_util::{ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use regex::Regex; +use russh::keys::{key::PrivateKeyWithHashAlg, ssh_key::private::Ed25519Keypair}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, ssh_key::private::Ed25519Keypair}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -239,7 +236,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Hopefully not a malicious service.")); @@ -250,7 +246,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/config_disable_aliasing.rs b/tests/integration/config_disable_aliasing.rs index c108337..cadf02e 100644 --- a/tests/integration/config_disable_aliasing.rs +++ b/tests/integration/config_disable_aliasing.rs @@ -10,14 +10,11 @@ use hyper_util::{ }; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key, ssh_key::private::Ed25519Keypair}; use russh::{ Channel, ChannelId, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key, ssh_key::private::Ed25519Keypair}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -320,7 +317,6 @@ impl russh::client::Handler for SshClientOne { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || StatusCode::NO_CONTENT)); @@ -331,7 +327,6 @@ impl russh::client::Handler for SshClientOne { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/config_disable_http.rs b/tests/integration/config_disable_http.rs index 99e458b..78fbad3 100644 --- a/tests/integration/config_disable_http.rs +++ b/tests/integration/config_disable_http.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -210,7 +207,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || StatusCode::NO_CONTENT)); @@ -221,7 +217,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/config_disable_tcp.rs b/tests/integration/config_disable_tcp.rs index 5bb40b0..ca52e6b 100644 --- a/tests/integration/config_disable_tcp.rs +++ b/tests/integration/config_disable_tcp.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -145,7 +142,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || StatusCode::NO_CONTENT)); @@ -156,7 +152,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/connection_deny_load_balancing.rs b/tests/integration/connection_deny_load_balancing.rs index 0da3c8e..1b96349 100644 --- a/tests/integration/connection_deny_load_balancing.rs +++ b/tests/integration/connection_deny_load_balancing.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -313,14 +312,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Data"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/connection_load_balancing.rs b/tests/integration/connection_load_balancing.rs index 2154357..f47ed34 100644 --- a/tests/integration/connection_load_balancing.rs +++ b/tests/integration/connection_load_balancing.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -163,14 +162,12 @@ impl russh::client::Handler for SshClientA { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"A"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } @@ -194,14 +191,12 @@ impl russh::client::Handler for SshClientB { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"B"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_addressing_profanities_domain.rs b/tests/integration/http_addressing_profanities_domain.rs index 63415c1..dd107ca 100644 --- a/tests/integration/http_addressing_profanities_domain.rs +++ b/tests/integration/http_addressing_profanities_domain.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -220,7 +217,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Hello from a safe space!")); @@ -231,7 +227,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_addressing_profanities_subdomain.rs b/tests/integration/http_addressing_profanities_subdomain.rs index 5f99a2f..8117a9f 100644 --- a/tests/integration/http_addressing_profanities_subdomain.rs +++ b/tests/integration/http_addressing_profanities_subdomain.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -225,7 +222,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Hello from a profane place!")); @@ -236,7 +232,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_force_https_by_user.rs b/tests/integration/http_force_https_by_user.rs index 2f44fae..9997345 100644 --- a/tests/integration/http_force_https_by_user.rs +++ b/tests/integration/http_force_https_by_user.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, ChannelId, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -322,7 +319,6 @@ impl russh::client::Handler for SshClientProxy { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -336,7 +332,6 @@ impl russh::client::Handler for SshClientProxy { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } @@ -369,7 +364,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -383,7 +377,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_pool_limit.rs b/tests/integration/http_pool_limit.rs index f329824..f14f1f9 100644 --- a/tests/integration/http_pool_limit.rs +++ b/tests/integration/http_pool_limit.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -221,7 +218,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -238,7 +234,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_pool_timeout.rs b/tests/integration/http_pool_timeout.rs index c760bcf..8b0675c 100644 --- a/tests/integration/http_pool_timeout.rs +++ b/tests/integration/http_pool_timeout.rs @@ -12,14 +12,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -274,7 +271,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -291,7 +287,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_redirects.rs b/tests/integration/http_redirects.rs index 0313daa..85b8687 100644 --- a/tests/integration/http_redirects.rs +++ b/tests/integration/http_redirects.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -202,7 +199,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "This is only accessible via HTTPS!")); @@ -213,7 +209,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_rewrite_host.rs b/tests/integration/http_rewrite_host.rs index 731b207..1bc7655 100644 --- a/tests/integration/http_rewrite_host.rs +++ b/tests/integration/http_rewrite_host.rs @@ -11,7 +11,7 @@ use hyper_util::{ }; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ ChannelId, @@ -200,7 +200,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -220,7 +219,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/http_simultaneous_requests.rs b/tests/integration/http_simultaneous_requests.rs index 1913d10..0367f9a 100644 --- a/tests/integration/http_simultaneous_requests.rs +++ b/tests/integration/http_simultaneous_requests.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -225,7 +222,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/fast", get(async || "Fast")).route( @@ -242,7 +238,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/http_timeout.rs b/tests/integration/http_timeout.rs index 4fbc83d..6877201 100644 --- a/tests/integration/http_timeout.rs +++ b/tests/integration/http_timeout.rs @@ -7,14 +7,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -214,7 +211,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Hello from foobar.tld!")); @@ -225,7 +221,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_bind_all_hostnames.rs b/tests/integration/https_bind_all_hostnames.rs index 1a16b48..15f8e46 100644 --- a/tests/integration/https_bind_all_hostnames.rs +++ b/tests/integration/https_bind_all_hostnames.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -208,7 +205,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Hello from foobar.tld!")); @@ -219,7 +215,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_connect_ssh_on_https_port.rs b/tests/integration/https_connect_ssh_on_https_port.rs index fdc1350..f44586d 100644 --- a/tests/integration/https_connect_ssh_on_https_port.rs +++ b/tests/integration/https_connect_ssh_on_https_port.rs @@ -9,14 +9,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -199,7 +196,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "We managed to beat port-blocking!")); @@ -210,7 +206,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_force_random_subdomains.rs b/tests/integration/https_force_random_subdomains.rs index 77459d1..6ea5cc9 100644 --- a/tests/integration/https_force_random_subdomains.rs +++ b/tests/integration/https_force_random_subdomains.rs @@ -10,14 +10,11 @@ use hyper_util::{ server::conn::auto::Builder, }; use regex::Regex; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -238,7 +235,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "This was a triumph.")); @@ -249,7 +245,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_http11_fallback.rs b/tests/integration/https_http11_fallback.rs index 8798434..4e67ee7 100644 --- a/tests/integration/https_http11_fallback.rs +++ b/tests/integration/https_http11_fallback.rs @@ -7,7 +7,6 @@ use http::header::{COOKIE, HOST}; use http_body_util::BodyExt; use hyper::{StatusCode, body::Incoming, server::conn::http1::Builder, service::service_fn}; use hyper_util::rt::{TokioExecutor, TokioIo}; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -195,7 +194,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -218,7 +216,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_http2.rs b/tests/integration/https_http2.rs index d0862d2..45f244a 100644 --- a/tests/integration/https_http2.rs +++ b/tests/integration/https_http2.rs @@ -8,7 +8,7 @@ use hyper::{StatusCode, body::Incoming, server::conn::http2::Builder, service::s use hyper_util::rt::{TokioExecutor, TokioIo}; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ ChannelId, @@ -212,7 +212,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -232,7 +231,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/https_multi_stream_download.rs b/tests/integration/https_multi_stream_download.rs index 7def781..298acae 100644 --- a/tests/integration/https_multi_stream_download.rs +++ b/tests/integration/https_multi_stream_download.rs @@ -19,7 +19,7 @@ use hyper_util::{ use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -242,7 +242,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let data = self.0.clone(); @@ -267,7 +266,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_multi_stream_upload.rs b/tests/integration/https_multi_stream_upload.rs index c421cc9..ad5c858 100644 --- a/tests/integration/https_multi_stream_upload.rs +++ b/tests/integration/https_multi_stream_upload.rs @@ -17,7 +17,7 @@ use hyper_util::{ use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -225,7 +225,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -246,7 +245,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_random_subdomains_with_fixed_seed.rs b/tests/integration/https_random_subdomains_with_fixed_seed.rs index 1d66e96..3cbe9c9 100644 --- a/tests/integration/https_random_subdomains_with_fixed_seed.rs +++ b/tests/integration/https_random_subdomains_with_fixed_seed.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -227,7 +224,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", head(async || "I'm always at the same subdomain!")); @@ -238,7 +234,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_random_subdomains_with_fixed_seed_file.rs b/tests/integration/https_random_subdomains_with_fixed_seed_file.rs index 7f95a38..4f2e9c4 100644 --- a/tests/integration/https_random_subdomains_with_fixed_seed_file.rs +++ b/tests/integration/https_random_subdomains_with_fixed_seed_file.rs @@ -9,14 +9,11 @@ use hyper_util::{ server::conn::auto::Builder, }; use rand::{rng, seq::IndexedRandom}; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -253,7 +250,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", head(async || "I'm always at the same subdomain!")); @@ -264,7 +260,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_rate_limit_download.rs b/tests/integration/https_rate_limit_download.rs index 08262f9..d06e3ce 100644 --- a/tests/integration/https_rate_limit_download.rs +++ b/tests/integration/https_rate_limit_download.rs @@ -18,14 +18,11 @@ use hyper_util::{ }; use rand::Rng; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -210,7 +207,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", post(async |_body: Bytes| StatusCode::NO_CONTENT)); @@ -221,7 +217,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_rate_limit_upload.rs b/tests/integration/https_rate_limit_upload.rs index 26cd5f7..4e5ea58 100644 --- a/tests/integration/https_rate_limit_upload.rs +++ b/tests/integration/https_rate_limit_upload.rs @@ -13,14 +13,11 @@ use hyper_util::{ }; use rand::Rng; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use rustls::{ RootCertStore, pki_types::{CertificateDer, pem::PemObject}, @@ -207,7 +204,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let mut data = vec![0u8; 55_000]; @@ -221,7 +217,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_single_stream_download.rs b/tests/integration/https_single_stream_download.rs index 04e62f2..d0255cd 100644 --- a/tests/integration/https_single_stream_download.rs +++ b/tests/integration/https_single_stream_download.rs @@ -19,7 +19,7 @@ use hyper_util::{ use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -231,7 +231,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let data = self.0.clone(); @@ -256,7 +255,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/https_single_stream_upload.rs b/tests/integration/https_single_stream_upload.rs index 9119ea1..0d26995 100644 --- a/tests/integration/https_single_stream_upload.rs +++ b/tests/integration/https_single_stream_upload.rs @@ -17,7 +17,7 @@ use hyper_util::{ use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -214,7 +214,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -235,7 +234,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/ipv6_blocklist_by_user.rs b/tests/integration/ipv6_blocklist_by_user.rs index ecbcf74..c61dd45 100644 --- a/tests/integration/ipv6_blocklist_by_user.rs +++ b/tests/integration/ipv6_blocklist_by_user.rs @@ -8,14 +8,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, ChannelId, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -298,7 +295,6 @@ impl russh::client::Handler for SshClientProxy { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || StatusCode::NO_CONTENT)); @@ -309,7 +305,6 @@ impl russh::client::Handler for SshClientProxy { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/lib_configure_from_scratch.rs b/tests/integration/lib_configure_from_scratch.rs index d382243..ff81869 100644 --- a/tests/integration/lib_configure_from_scratch.rs +++ b/tests/integration/lib_configure_from_scratch.rs @@ -2,7 +2,7 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{rng, seq::IndexedRandom}; -use russh::client::{AuthResult, ChannelOpenHandle}; +use russh::client::AuthResult; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -202,14 +202,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/quota_maximum_per_user.rs b/tests/integration/quota_maximum_per_user.rs index 49c0f7e..b578cde 100644 --- a/tests/integration/quota_maximum_per_user.rs +++ b/tests/integration/quota_maximum_per_user.rs @@ -7,14 +7,11 @@ use hyper_util::{ rt::{TokioExecutor, TokioIo}, server::conn::auto::Builder, }; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ net::TcpStream, @@ -218,7 +215,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route("/", get(async || "Max quota shenanigans.")); @@ -229,7 +225,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/sni_aliasing.rs b/tests/integration/sni_aliasing.rs index 6015e13..f5a8b1d 100644 --- a/tests/integration/sni_aliasing.rs +++ b/tests/integration/sni_aliasing.rs @@ -10,7 +10,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::ssh_key::private::Ed25519Keypair, }; use russh::{ @@ -252,7 +252,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -281,7 +280,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/sni_aliasing_timeout.rs b/tests/integration/sni_aliasing_timeout.rs index afb57a9..adfd9b5 100644 --- a/tests/integration/sni_aliasing_timeout.rs +++ b/tests/integration/sni_aliasing_timeout.rs @@ -9,7 +9,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::ssh_key::private::Ed25519Keypair, }; use russh::{ @@ -235,7 +235,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -270,7 +269,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/sni_proxy.rs b/tests/integration/sni_proxy.rs index 83c45d3..0f5c355 100644 --- a/tests/integration/sni_proxy.rs +++ b/tests/integration/sni_proxy.rs @@ -8,7 +8,7 @@ use hyper::{StatusCode, body::Incoming, server::conn::http1::Builder, service::s use hyper_util::rt::TokioIo; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ ChannelId, @@ -215,7 +215,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -244,7 +243,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/sni_timeout.rs b/tests/integration/sni_timeout.rs index 1d449d7..5fe56b4 100644 --- a/tests/integration/sni_timeout.rs +++ b/tests/integration/sni_timeout.rs @@ -6,7 +6,7 @@ use hyper::{body::Incoming, server::conn::http2::Builder, service::service_fn}; use hyper_util::rt::{TokioExecutor, TokioIo}; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ ChannelId, @@ -189,7 +189,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -224,7 +223,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } diff --git a/tests/integration/ssh_client_timeout.rs b/tests/integration/ssh_client_timeout.rs index c9f3014..cbdab55 100644 --- a/tests/integration/ssh_client_timeout.rs +++ b/tests/integration/ssh_client_timeout.rs @@ -7,7 +7,7 @@ use std::{ use clap::Parser; use russh::{ Channel, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, keys::{key::PrivateKeyWithHashAlg, load_secret_key}, }; use sandhole::{ApplicationConfig, entrypoint}; @@ -199,14 +199,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/ssh_ignore_data_on_non_session_channels.rs b/tests/integration/ssh_ignore_data_on_non_session_channels.rs index 45431e6..cd825a6 100644 --- a/tests/integration/ssh_ignore_data_on_non_session_channels.rs +++ b/tests/integration/ssh_ignore_data_on_non_session_channels.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -142,7 +141,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -157,7 +155,6 @@ impl russh::client::Handler for SshClient { } channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/ssh_proxy_jump.rs b/tests/integration/ssh_proxy_jump.rs index 4d88dd9..dbf4581 100644 --- a/tests/integration/ssh_proxy_jump.rs +++ b/tests/integration/ssh_proxy_jump.rs @@ -10,7 +10,7 @@ use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, MethodSet, - client::{self, ChannelOpenHandle, Msg}, + client::{self, Msg}, keys::ssh_key::private::Ed25519Keypair, server::{self, Auth, Server}, }; @@ -268,7 +268,6 @@ impl client::Handler for SshClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = self.server.new_client( @@ -304,7 +303,6 @@ impl client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } @@ -349,15 +347,13 @@ impl server::Handler for HoneypotHandler { async fn channel_open_session( &mut self, channel: russh::Channel, - reply: russh::server::ChannelOpenHandle, _session: &mut server::Session, - ) -> Result<(), Self::Error> { + ) -> Result { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; - Ok(()) + Ok(true) } } @@ -380,7 +376,6 @@ impl client::Handler for ProxyClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = Honeypot.new_client( @@ -404,7 +399,6 @@ impl client::Handler for ProxyClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/ssh_rate_limit_download.rs b/tests/integration/ssh_rate_limit_download.rs index ed587eb..cb9f5b7 100644 --- a/tests/integration/ssh_rate_limit_download.rs +++ b/tests/integration/ssh_rate_limit_download.rs @@ -10,7 +10,7 @@ use rand::{Rng, RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, ChannelMsg, MethodSet, - client::{self, ChannelOpenHandle, Msg}, + client::{self, Msg}, keys::ssh_key::private::Ed25519Keypair, server::{self, Auth, Server}, }; @@ -205,7 +205,6 @@ impl client::Handler for SshClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = self.server.new_client( @@ -241,7 +240,6 @@ impl client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } @@ -286,9 +284,8 @@ impl server::Handler for HoneypotHandler { async fn channel_open_session( &mut self, mut channel: russh::Channel, - reply: russh::server::ChannelOpenHandle, _session: &mut server::Session, - ) -> Result<(), Self::Error> { + ) -> Result { tokio::spawn(async move { let mut expected_len = 55_000; while let Some(msg) = channel.wait().await { @@ -301,8 +298,7 @@ impl server::Handler for HoneypotHandler { } } }); - reply.accept().await; - Ok(()) + Ok(true) } } @@ -325,7 +321,6 @@ impl client::Handler for ProxyClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = Honeypot.new_client( @@ -349,7 +344,6 @@ impl client::Handler for ProxyClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/ssh_rate_limit_upload.rs b/tests/integration/ssh_rate_limit_upload.rs index 367a3ff..14fdb16 100644 --- a/tests/integration/ssh_rate_limit_upload.rs +++ b/tests/integration/ssh_rate_limit_upload.rs @@ -10,7 +10,7 @@ use rand::{Rng, RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; use russh::{ Channel, MethodSet, - client::{self, ChannelOpenHandle, Msg}, + client::{self, Msg}, keys::ssh_key::private::Ed25519Keypair, server::{self, Auth, Server}, }; @@ -202,7 +202,6 @@ impl client::Handler for SshClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = self.server.new_client( @@ -238,7 +237,6 @@ impl client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } @@ -283,9 +281,8 @@ impl server::Handler for HoneypotHandler { async fn channel_open_session( &mut self, channel: russh::Channel, - reply: russh::server::ChannelOpenHandle, _session: &mut server::Session, - ) -> Result<(), Self::Error> { + ) -> Result { let mut data = vec![0u8; 55_000]; rand::rng().fill_bytes(&mut data); tokio::spawn(async move { @@ -293,8 +290,7 @@ impl server::Handler for HoneypotHandler { stream.write_all(&data).await.unwrap(); stream.flush().await.unwrap(); }); - reply.accept().await; - Ok(()) + Ok(true) } } @@ -317,7 +313,6 @@ impl client::Handler for ProxyClient { connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut client::Session, ) -> Result<(), Self::Error> { let handler = Honeypot.new_client( @@ -341,7 +336,6 @@ impl client::Handler for ProxyClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_allow_requested_ports.rs b/tests/integration/tcp_allow_requested_ports.rs index 9b99a41..b2e42d9 100644 --- a/tests/integration/tcp_allow_requested_ports.rs +++ b/tests/integration/tcp_allow_requested_ports.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -235,14 +234,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_assign_random_port_0.rs b/tests/integration/tcp_assign_random_port_0.rs index f9e5317..0f9c671 100644 --- a/tests/integration/tcp_assign_random_port_0.rs +++ b/tests/integration/tcp_assign_random_port_0.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -140,7 +139,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -150,7 +148,6 @@ impl russh::client::Handler for SshClient { .unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_bind_random_ports.rs b/tests/integration/tcp_bind_random_ports.rs index 66bd903..8fc643f 100644 --- a/tests/integration/tcp_bind_random_ports.rs +++ b/tests/integration/tcp_bind_random_ports.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -168,14 +167,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_ip_connections_limit.rs b/tests/integration/tcp_ip_connections_limit.rs index 0a8f104..c290f3c 100644 --- a/tests/integration/tcp_ip_connections_limit.rs +++ b/tests/integration/tcp_ip_connections_limit.rs @@ -4,14 +4,11 @@ use std::{ }; use clap::Parser; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ io::AsyncReadExt, @@ -163,7 +160,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -172,7 +168,6 @@ impl russh::client::Handler for SshClient { channel.eof().await.unwrap(); channel.close().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_multi_stream_download.rs b/tests/integration/tcp_multi_stream_download.rs index ab8903a..a479047 100644 --- a/tests/integration/tcp_multi_stream_download.rs +++ b/tests/integration/tcp_multi_stream_download.rs @@ -6,7 +6,7 @@ use clap::Parser; use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -180,7 +180,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -203,7 +202,6 @@ impl russh::client::Handler for SshClient { stream.write_all(&len_buf[..]).await.unwrap(); stream.flush().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_multi_stream_upload.rs b/tests/integration/tcp_multi_stream_upload.rs index d5c7608..b55d593 100644 --- a/tests/integration/tcp_multi_stream_upload.rs +++ b/tests/integration/tcp_multi_stream_upload.rs @@ -6,7 +6,7 @@ use clap::Parser; use rand::Rng; use russh::{ Channel, ChannelMsg, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -173,7 +173,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let bytes = self.0.clone(); @@ -192,7 +191,6 @@ impl russh::client::Handler for SshClient { .unwrap(); } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_pool_timeout.rs b/tests/integration/tcp_pool_timeout.rs index f556ee0..38861fa 100644 --- a/tests/integration/tcp_pool_timeout.rs +++ b/tests/integration/tcp_pool_timeout.rs @@ -4,14 +4,11 @@ use std::{ }; use clap::Parser; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ io::AsyncReadExt, @@ -174,7 +171,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -183,7 +179,6 @@ impl russh::client::Handler for SshClient { channel.eof().await.unwrap(); channel.close().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_rate_limit_download.rs b/tests/integration/tcp_rate_limit_download.rs index 32bb292..264a6c6 100644 --- a/tests/integration/tcp_rate_limit_download.rs +++ b/tests/integration/tcp_rate_limit_download.rs @@ -5,7 +5,6 @@ use clap::Parser; use rand::Rng; use russh::ChannelMsg; -use russh::client::ChannelOpenHandle; use russh::{ Channel, client::{Msg, Session}, @@ -154,7 +153,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -169,7 +167,6 @@ impl russh::client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_rate_limit_upload.rs b/tests/integration/tcp_rate_limit_upload.rs index cb3b548..fb2479d 100644 --- a/tests/integration/tcp_rate_limit_upload.rs +++ b/tests/integration/tcp_rate_limit_upload.rs @@ -4,7 +4,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::Rng; -use russh::client::ChannelOpenHandle; use russh::{ Channel, client::{Msg, Session}, @@ -149,7 +148,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let mut data = vec![0u8; 55_000]; @@ -158,7 +156,6 @@ impl russh::client::Handler for SshClient { let mut stream = channel.into_stream(); stream.write_all(&data).await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_reject_low_ports.rs b/tests/integration/tcp_reject_low_ports.rs index 4b9fdb1..65f4b56 100644 --- a/tests/integration/tcp_reject_low_ports.rs +++ b/tests/integration/tcp_reject_low_ports.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -129,14 +128,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_reject_port_above_max.rs b/tests/integration/tcp_reject_port_above_max.rs index f624bfb..4331efa 100644 --- a/tests/integration/tcp_reject_port_above_max.rs +++ b/tests/integration/tcp_reject_port_above_max.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -233,14 +232,12 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { channel.data(&b"Hello, world!"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/tcp_timeout.rs b/tests/integration/tcp_timeout.rs index 9daaa79..57e32e4 100644 --- a/tests/integration/tcp_timeout.rs +++ b/tests/integration/tcp_timeout.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -139,7 +138,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -148,7 +146,6 @@ impl russh::client::Handler for SshClient { channel.data(&b"Two\n"[..]).await.unwrap(); channel.eof().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_allow_requested_ports.rs b/tests/integration/udp_allow_requested_ports.rs index a03b8d7..f4b4758 100644 --- a/tests/integration/udp_allow_requested_ports.rs +++ b/tests/integration/udp_allow_requested_ports.rs @@ -3,7 +3,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; use rand::{RngExt, SeedableRng}; use rand_chacha::ChaCha20Rng; -use russh::client::ChannelOpenHandle; use russh::keys::ssh_key::private::Ed25519Keypair; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ @@ -246,7 +245,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -258,7 +256,6 @@ impl russh::client::Handler for SshClient { } channel.data(&b"\x00\x04Pong"[..]).await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_assign_random_port_0.rs b/tests/integration/udp_assign_random_port_0.rs index 3fdfa31..73bcd70 100644 --- a/tests/integration/udp_assign_random_port_0.rs +++ b/tests/integration/udp_assign_random_port_0.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -152,7 +151,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -164,7 +162,6 @@ impl russh::client::Handler for SshClient { } channel.data(&b"\x00\x04Pong"[..]).await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_bind_random_ports.rs b/tests/integration/udp_bind_random_ports.rs index 06a3290..e7c744b 100644 --- a/tests/integration/udp_bind_random_ports.rs +++ b/tests/integration/udp_bind_random_ports.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -184,7 +183,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -196,7 +194,6 @@ impl russh::client::Handler for SshClient { } channel.data(&b"\x00\x04Pong"[..]).await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_ip_connections_limit.rs b/tests/integration/udp_ip_connections_limit.rs index 516cad8..402a994 100644 --- a/tests/integration/udp_ip_connections_limit.rs +++ b/tests/integration/udp_ip_connections_limit.rs @@ -4,14 +4,11 @@ use std::{ }; use clap::Parser; +use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, client::{Msg, Session}, }; -use russh::{ - client::ChannelOpenHandle, - keys::{key::PrivateKeyWithHashAlg, load_secret_key}, -}; use sandhole::{ApplicationConfig, entrypoint}; use tokio::{ io::{AsyncReadExt, AsyncWriteExt}, @@ -198,7 +195,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -211,7 +207,6 @@ impl russh::client::Handler for SshClient { stream.write_all(&b"\x00\x02OK"[..]).await.unwrap(); stream.flush().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_multi_stream.rs b/tests/integration/udp_multi_stream.rs index 9faf018..fea4998 100644 --- a/tests/integration/udp_multi_stream.rs +++ b/tests/integration/udp_multi_stream.rs @@ -5,7 +5,7 @@ use clap::Parser; use rand::Rng; use russh::{ Channel, Preferred, - client::{ChannelOpenHandle, Msg, Session}, + client::{Msg, Session}, }; use russh::{ client::Config, @@ -184,7 +184,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -199,7 +198,6 @@ impl russh::client::Handler for SshClient { stream.write_all(&n.to_be_bytes()[..]).await.unwrap(); stream.flush().await.unwrap(); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_rate_limit.rs b/tests/integration/udp_rate_limit.rs index 6944d1f..5c0e813 100644 --- a/tests/integration/udp_rate_limit.rs +++ b/tests/integration/udp_rate_limit.rs @@ -5,7 +5,6 @@ use clap::Parser; use rand::Rng; use russh::ChannelMsg; -use russh::client::ChannelOpenHandle; use russh::{ Channel, client::{Msg, Session}, @@ -176,7 +175,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -193,7 +191,6 @@ impl russh::client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/udp_timeout.rs b/tests/integration/udp_timeout.rs index c67740c..7e1bdff 100644 --- a/tests/integration/udp_timeout.rs +++ b/tests/integration/udp_timeout.rs @@ -1,7 +1,6 @@ use std::{sync::Arc, time::Duration}; use clap::Parser; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -188,7 +187,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { tokio::spawn(async move { @@ -213,7 +211,6 @@ impl russh::client::Handler for SshClient { } } }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/websocket_connection.rs b/tests/integration/websocket_connection.rs index 98696be..9549244 100644 --- a/tests/integration/websocket_connection.rs +++ b/tests/integration/websocket_connection.rs @@ -12,7 +12,6 @@ use hyper::body::Incoming; use hyper::service::service_fn; use hyper_util::rt::{TokioExecutor, TokioIo}; use hyper_util::server::conn::auto::Builder; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -155,7 +154,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -177,7 +175,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } diff --git a/tests/integration/websocket_timeout.rs b/tests/integration/websocket_timeout.rs index 88ae5d7..d981cac 100644 --- a/tests/integration/websocket_timeout.rs +++ b/tests/integration/websocket_timeout.rs @@ -12,7 +12,6 @@ use hyper::body::Incoming; use hyper::service::service_fn; use hyper_util::rt::{TokioExecutor, TokioIo}; use hyper_util::server::conn::auto::Builder; -use russh::client::ChannelOpenHandle; use russh::keys::{key::PrivateKeyWithHashAlg, load_secret_key}; use russh::{ Channel, @@ -156,7 +155,6 @@ impl russh::client::Handler for SshClient { _connected_port: u32, _originator_address: &str, _originator_port: u32, - reply: ChannelOpenHandle, _session: &mut Session, ) -> Result<(), Self::Error> { let router = Router::new().route( @@ -177,7 +175,6 @@ impl russh::client::Handler for SshClient { .await .expect("Invalid request"); }); - reply.accept().await; Ok(()) } } -- 2.54.0