mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-08-07 21:19:51 +00:00
move system_config to dns::system
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
pub mod config;
|
||||
mod node;
|
||||
mod node_mgr;
|
||||
pub mod config;
|
||||
mod peer_mgr;
|
||||
pub mod server;
|
||||
pub mod system;
|
||||
mod utils;
|
||||
pub mod zone;
|
||||
|
||||
@@ -10,11 +10,9 @@ pub mod client_instance;
|
||||
pub mod runner;
|
||||
#[cfg(feature = "magic-dns")]
|
||||
pub mod server_instance;
|
||||
#[cfg(feature = "magic-dns")]
|
||||
pub mod system_config;
|
||||
|
||||
#[cfg(all(test, feature = "tun", feature = "magic-dns"))]
|
||||
mod tests;
|
||||
pub mod tests;
|
||||
|
||||
pub static MAGIC_DNS_INSTANCE_ADDR: &str = "tcp://127.0.0.1:49813";
|
||||
pub static MAGIC_DNS_FAKE_IP: &str = "100.100.100.101";
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
use super::{
|
||||
config::{GeneralConfigBuilder, RunConfigBuilder},
|
||||
server::Server,
|
||||
system_config::{OSConfig, SystemConfig},
|
||||
MAGIC_DNS_INSTANCE_ADDR,
|
||||
};
|
||||
use crate::dns::system::{OSConfig, SystemConfig};
|
||||
use crate::{
|
||||
common::{
|
||||
ifcfg::{IfConfiger, IfConfiguerTrait},
|
||||
@@ -495,14 +495,14 @@ fn get_system_config(
|
||||
) -> Result<Option<Box<dyn SystemConfig>>, anyhow::Error> {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use super::system_config::windows::WindowsDNSManager;
|
||||
use crate::dns::system::windows::WindowsDNSManager;
|
||||
let tun_name = _tun_name.ok_or_else(|| anyhow::anyhow!("No tun name"))?;
|
||||
return Ok(Some(Box::new(WindowsDNSManager::new(tun_name)?)));
|
||||
}
|
||||
|
||||
#[cfg(all(target_os = "macos", not(feature = "macos-ne")))]
|
||||
{
|
||||
use super::system_config::darwin::DarwinConfigurator;
|
||||
use crate::dns::system_config::darwin::DarwinConfigurator;
|
||||
return Ok(Some(Box::new(DarwinConfigurator::new())));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user