a bunch of really (not)good tests

This commit is contained in:
zedddie 2026-03-15 21:17:05 +01:00 committed by tuturuu
parent 2db5e1d3ac
commit 43ec0ddbca
No known key found for this signature in database
GPG key ID: B352C3C2894405A7
4 changed files with 246 additions and 7 deletions

4
src/lib.rs Normal file
View file

@ -0,0 +1,4 @@
pub mod sniffing;
pub mod config;
pub mod geoparsers;
pub mod startup;

View file

@ -1,9 +1,9 @@
mod config;
mod geoparsers;
pub mod sniffing;
mod startup;
// mod config;
// mod geoparsers;
// pub mod sniffing;
// mod startup;
use startup::init;
use nsc::startup::init;
use std::io::Read;

View file

@ -3,7 +3,7 @@ use tun::Error;
// Here we will recieve bytes and try to get their destanation & apply Rules for them.
use crate::config::Config;
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum Protocol {
TCP,
UDP,
@ -12,7 +12,7 @@ pub enum Protocol {
type Ipv4 = [u8; 4];
type Ipv6 = [u8; 16];
type Port = u16;
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum PacketInfo {
// <https://www.geeksforgeeks.org/computer-networks/what-is-ipv4/>
V4 {