mirror of
https://github.com/aramperes/onetun.git
synced 2025-09-10 06:34:03 -04:00
Split dependencies that are only used for the binary version of onetun
This commit is contained in:
parent
1c1399d5ff
commit
f85692950f
3 changed files with 17 additions and 4 deletions
|
@ -17,12 +17,14 @@ use crate::wg::WireGuardTunnel;
|
|||
|
||||
pub mod config;
|
||||
pub mod events;
|
||||
#[cfg(feature = "pcap")]
|
||||
pub mod pcap;
|
||||
pub mod tunnel;
|
||||
pub mod virtual_device;
|
||||
pub mod virtual_iface;
|
||||
pub mod wg;
|
||||
|
||||
#[cfg(feature = "bin")]
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let config = Config::from_args().with_context(|| "Failed to read config")?;
|
||||
|
@ -126,6 +128,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
futures::future::pending().await
|
||||
}
|
||||
|
||||
#[cfg(feature = "bin")]
|
||||
fn init_logger(config: &Config) -> anyhow::Result<()> {
|
||||
let mut builder = pretty_env_logger::formatted_timed_builder();
|
||||
builder.parse_filters(&config.log);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue