diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-04-05 00:39:20 +0200 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-04-07 15:52:22 +0200 |
| commit | 9938127079922a261ecce358f67299dfe92214e8 (patch) | |
| tree | 2cd0929794ea4f8fe414109f92e9d430557de223 | |
| parent | ecfe6fc8dfd2c82799981e482a3e3c743a28c472 (diff) | |
| download | mullvadvpn-9938127079922a261ecce358f67299dfe92214e8.tar.xz mullvadvpn-9938127079922a261ecce358f67299dfe92214e8.zip | |
Add function to obtain actual bind address of server endpoint
| -rw-r--r-- | mullvad-masque-proxy/src/server/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mullvad-masque-proxy/src/server/mod.rs b/mullvad-masque-proxy/src/server/mod.rs index fef323cdf6..5431daaaa7 100644 --- a/mullvad-masque-proxy/src/server/mod.rs +++ b/mullvad-masque-proxy/src/server/mod.rs @@ -72,6 +72,10 @@ impl Server { }) } + pub fn local_addr(&self) -> io::Result<SocketAddr> { + self.endpoint.local_addr() + } + pub async fn run(self) -> Result<()> { while let Some(new_connection) = self.endpoint.accept().await { tokio::spawn(Self::handle_incoming_connection( |
