diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..8389b33 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,31 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "lanparty-client-core" +version = "0.1.0" + +[[package]] +name = "lanparty-client-win" +version = "0.1.0" + +[[package]] +name = "lanparty-ctrl" +version = "0.1.0" + +[[package]] +name = "lanparty-gateway" +version = "0.1.0" + +[[package]] +name = "lanparty-obs" +version = "0.1.0" + +[[package]] +name = "lanparty-proto" +version = "0.1.0" + +[[package]] +name = "lanparty-relay" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..3cd6483 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,22 @@ +[workspace] +resolver = "3" +members = [ + "crates/lanparty-client-core", + "crates/lanparty-client-win", + "crates/lanparty-ctrl", + "crates/lanparty-gateway", + "crates/lanparty-obs", + "crates/lanparty-proto", + "crates/lanparty-relay", +] + +[workspace.package] +version = "0.1.0" +edition = "2024" + +[workspace.dependencies] +anyhow = "1" +bytes = "1" +serde = { version = "1", features = ["derive"] } +thiserror = "2" +tracing = "0.1" diff --git a/README.md b/README.md new file mode 100644 index 0000000..d2c2038 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# softlan-vpn + +Monorepo for a Layer 2 over QUIC LAN party bridge. + +## Workspace crates + +- `lanparty-proto`: shared frame format, MAC validation, MTU helpers. +- `lanparty-ctrl`: control-plane messages (join/hello/role/version). +- `lanparty-obs`: shared diagnostics/logging event models. +- `lanparty-client-core`: platform-agnostic client session state. +- `lanparty-client-win`: Windows TAP + route/metric handling binary. +- `lanparty-gateway`: Linux AF_PACKET gateway binary. +- `lanparty-relay`: public QUIC relay binary. + +## Build + +```bash +cargo check --workspace +``` diff --git a/crates/lanparty-client-core/Cargo.toml b/crates/lanparty-client-core/Cargo.toml new file mode 100644 index 0000000..a3f4355 --- /dev/null +++ b/crates/lanparty-client-core/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-client-core" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-client-core/src/lib.rs b/crates/lanparty-client-core/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/lanparty-client-core/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/lanparty-client-win/Cargo.toml b/crates/lanparty-client-win/Cargo.toml new file mode 100644 index 0000000..9371c81 --- /dev/null +++ b/crates/lanparty-client-win/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-client-win" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-client-win/src/main.rs b/crates/lanparty-client-win/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/lanparty-client-win/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/lanparty-ctrl/Cargo.toml b/crates/lanparty-ctrl/Cargo.toml new file mode 100644 index 0000000..52092ee --- /dev/null +++ b/crates/lanparty-ctrl/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-ctrl" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-ctrl/src/lib.rs b/crates/lanparty-ctrl/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/lanparty-ctrl/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/lanparty-gateway/Cargo.toml b/crates/lanparty-gateway/Cargo.toml new file mode 100644 index 0000000..c96d654 --- /dev/null +++ b/crates/lanparty-gateway/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-gateway" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-gateway/src/main.rs b/crates/lanparty-gateway/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/lanparty-gateway/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/crates/lanparty-obs/Cargo.toml b/crates/lanparty-obs/Cargo.toml new file mode 100644 index 0000000..d47bd59 --- /dev/null +++ b/crates/lanparty-obs/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-obs" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-obs/src/lib.rs b/crates/lanparty-obs/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/lanparty-obs/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/lanparty-proto/Cargo.toml b/crates/lanparty-proto/Cargo.toml new file mode 100644 index 0000000..2eda2ad --- /dev/null +++ b/crates/lanparty-proto/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-proto" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-proto/src/lib.rs b/crates/lanparty-proto/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/crates/lanparty-proto/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/crates/lanparty-relay/Cargo.toml b/crates/lanparty-relay/Cargo.toml new file mode 100644 index 0000000..0704a04 --- /dev/null +++ b/crates/lanparty-relay/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "lanparty-relay" +version.workspace = true +edition.workspace = true + +[dependencies] diff --git a/crates/lanparty-relay/src/main.rs b/crates/lanparty-relay/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/crates/lanparty-relay/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}