aboutsummaryrefslogblamecommitdiff
path: root/src/main.rs
blob: bf8248d136832217db45eb7a9a6033c7785f58d1 (plain) (tree)
1
2
3
4
5
6
7
8
9
             
                
           
                 
              
             
       
 
             
           
                       
 

                 

                             



                                                  

                                                               
 
mod messages;
mod environment;
mod consul;
mod consul_actor;
mod igd_actor;
mod diplonat;
mod fw;

use iptables;
use log::*;
use diplonat::Diplonat;

#[tokio::main]
async fn main() {
  pretty_env_logger::init();
  info!("Starting Diplonat");

  let ipt = iptables::new(false).unwrap();
  fw::setup(&ipt).expect("iptables setup failed");

  let mut diplo = Diplonat::new().await.expect("Setup failed");
  diplo.listen().await.expect("A runtime error occured");
}