diff options
| author | David Lönnhager <david.l@mullvad.net> | 2024-02-07 17:50:24 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2024-02-07 17:50:24 +0100 |
| commit | 0d4ee241b523a7d024cb2aebfcbbf3924a8f3bb5 (patch) | |
| tree | c095e7b898d4d736322d267965948b30fde3bf50 /test/test-rpc/src/lib.rs | |
| parent | 20d9c98f5ec44166b461730fec9ca292b622265f (diff) | |
| parent | eed7234599253f3d742be8bb4b6b1ecbf1299dc3 (diff) | |
| download | mullvadvpn-0d4ee241b523a7d024cb2aebfcbbf3924a8f3bb5.tar.xz mullvadvpn-0d4ee241b523a7d024cb2aebfcbbf3924a8f3bb5.zip | |
Merge branch 'testing-add-socks-server'
Diffstat (limited to 'test/test-rpc/src/lib.rs')
| -rw-r--r-- | test/test-rpc/src/lib.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test-rpc/src/lib.rs b/test/test-rpc/src/lib.rs index 5919a894d1..d2bee40dbb 100644 --- a/test/test-rpc/src/lib.rs +++ b/test/test-rpc/src/lib.rs @@ -53,6 +53,8 @@ pub enum Error { InvalidUrl, #[error(display = "Timeout")] Timeout, + #[error(display = "TCP forward error")] + TcpForward, } /// Response from am.i.mullvad.net @@ -148,6 +150,16 @@ mod service { /// Perform DNS resolution. async fn resolve_hostname(hostname: String) -> Result<Vec<SocketAddr>, Error>; + /// Start forwarding TCP bound to the given address. Return an ID that can be used with + /// `stop_tcp_forward`, and the address that the listening socket was actually bound to. + async fn start_tcp_forward( + bind_addr: SocketAddr, + via_addr: SocketAddr, + ) -> Result<(net::SockHandleId, SocketAddr), Error>; + + /// Stop forwarding TCP that was previously started with `start_tcp_forward`. + async fn stop_tcp_forward(id: net::SockHandleId) -> Result<(), Error>; + /// Restart the Mullvad VPN application. async fn restart_mullvad_daemon() -> Result<(), Error>; |
