Skip to content

Commit

Permalink
Set tunnel name to wg0-mullvad for wireguard-go
Browse files Browse the repository at this point in the history
  • Loading branch information
dlon committed Aug 31, 2024
1 parent b0c1bcc commit 175686b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Line wrap the file at 100 chars. Th

### Fixed
- macOS and Linux: Fix potential crash when disconnecting with DAITA enabled.
- Set tunnel name to `wg0-mullvad` when userspace WireGuard is enabled.

#### macOS
- Exclude programs when executed using a relative path from a shell.
Expand Down
3 changes: 3 additions & 0 deletions talpid-tunnel/src/tun_provider/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use std::{
};
use tun::{platform, Configuration, Device};

const MULLVAD_INTERFACE_NAME: &str = "wg0-mullvad";

/// Errors that can occur while setting up a tunnel device.
#[derive(Debug, thiserror::Error)]
pub enum Error {
Expand Down Expand Up @@ -129,6 +131,7 @@ impl TunnelDevice {
#[allow(unused_mut)]
pub fn new() -> Result<Self, NetworkInterfaceError> {
let mut config = Configuration::default();
config.name(MULLVAD_INTERFACE_NAME);

#[cfg(target_os = "linux")]
config.platform(|config| {
Expand Down
2 changes: 1 addition & 1 deletion talpid-wireguard/src/wireguard_kernel/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ pub enum Error {
NetworkManager(#[source] nm_tunnel::Error),
}

pub(crate) const MULLVAD_INTERFACE_NAME: &str = "wg0-mullvad";
const MULLVAD_INTERFACE_NAME: &str = "wg0-mullvad";

#[derive(Debug)]
pub struct Handle {
Expand Down

0 comments on commit 175686b

Please sign in to comment.