Skip to content

Commit

Permalink
Merge pull request #1011 from NordSecurity/teliod_features
Browse files Browse the repository at this point in the history
[LLT-5834] Add direct connections to teliod features
  • Loading branch information
tomasz-grz authored Dec 5, 2024
2 parents c22d98d + bcef2e4 commit c60eede
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Empty file added .unreleased/teliod_features
Empty file.
11 changes: 9 additions & 2 deletions clis/teliod/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use std::{fs, net::IpAddr, sync::Arc};
use telio::{
crypto::SecretKey,
device::{Device, DeviceConfig, Error as DeviceError},
telio_model::{config::Config as MeshMap, features::Features},
ffi::defaults_builder::FeaturesDefaultsBuilder,
telio_model::config::Config as MeshMap,
telio_utils::select,
telio_wg::AdapterType,
};
Expand Down Expand Up @@ -51,8 +52,14 @@ fn telio_task(
interface_config: &InterfaceConfig,
) -> Result<(), TeliodError> {
debug!("Initializing telio device");

// Create default features with direct connections enabled
let features = Arc::new(FeaturesDefaultsBuilder::new())
.enable_direct()
.build();

let mut telio = Device::new(
Features::default(),
features,
// TODO: replace this with some real event handling
move |event| info!("Incoming event: {:?}", event),
None,
Expand Down

0 comments on commit c60eede

Please sign in to comment.