mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(gui-client/linux): fix DNS (#4802)
Make the GUI use systemd-resolved to retrieve the system's resolvers. This allows the IPC service to set up sentinels for those resolvers and control the system's DNS. Closes #3812
This commit is contained in:
@@ -7,12 +7,8 @@ mod imp {
|
||||
use anyhow::Result;
|
||||
use std::net::IpAddr;
|
||||
|
||||
// TODO: The code here will depend on the chosen DNS control method.
|
||||
// So that will need to be threaded in here somehow.
|
||||
#[allow(clippy::unnecessary_wraps)]
|
||||
pub fn get() -> Result<Vec<IpAddr>> {
|
||||
tracing::error!("Resolvers module not yet implemented for Linux, returning empty Vec");
|
||||
Ok(Vec::default())
|
||||
firezone_headless_client::imp::get_system_default_resolvers_systemd_resolved()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ fn get_system_default_resolvers_network_manager() -> Result<Vec<IpAddr>> {
|
||||
}
|
||||
|
||||
/// Returns the DNS servers listed in `resolvectl dns`
|
||||
fn get_system_default_resolvers_systemd_resolved() -> Result<Vec<IpAddr>> {
|
||||
pub fn get_system_default_resolvers_systemd_resolved() -> Result<Vec<IpAddr>> {
|
||||
// Unfortunately systemd-resolved does not have a machine-readable
|
||||
// text output for this command: <https://github.com/systemd/systemd/issues/29755>
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user