diff options
Diffstat (limited to 'test/test-runner/src/main.rs')
| -rw-r--r-- | test/test-runner/src/main.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/test-runner/src/main.rs b/test/test-runner/src/main.rs index 1c2c301b27..74f7761cc2 100644 --- a/test/test-runner/src/main.rs +++ b/test/test-runner/src/main.rs @@ -10,6 +10,7 @@ use tarpc::context; use tarpc::server::Channel; use test_rpc::{ mullvad_daemon::{ServiceStatus, SOCKET_PATH}, + net::SockHandleId, package::Package, transport::GrpcForwarder, AppTrace, Service, @@ -22,6 +23,7 @@ use tokio::{ use tokio_util::codec::{Decoder, LengthDelimitedCodec}; mod app; +mod forward; mod logging; mod net; mod package; @@ -167,6 +169,23 @@ impl Service for TestServer { .collect()) } + async fn start_tcp_forward( + self, + _: context::Context, + bind_addr: SocketAddr, + via_addr: SocketAddr, + ) -> Result<(SockHandleId, SocketAddr), test_rpc::Error> { + forward::start_server(bind_addr, via_addr).await + } + + async fn stop_tcp_forward( + self, + _: context::Context, + id: SockHandleId, + ) -> Result<(), test_rpc::Error> { + forward::stop_server(id) + } + async fn get_interface_ip( self, _: context::Context, |
