From f589031e992743cd686ffadea86907f69a8a79ab Mon Sep 17 00:00:00 2001 From: Shane Pearman Date: Wed, 18 Feb 2026 03:57:46 +0100 Subject: [PATCH] put client application in workspace crate --- Cargo.toml | 15 ++++----------- README.md | 18 +++++++++++++----- rns-vpn-client/Cargo.toml | 27 +++++++++++++++++++++++++++ {src => rns-vpn-client/src}/main.rs | 2 ++ 4 files changed, 46 insertions(+), 16 deletions(-) create mode 100644 rns-vpn-client/Cargo.toml rename {src => rns-vpn-client/src}/main.rs (99%) diff --git a/Cargo.toml b/Cargo.toml index 175a8d9..ab31ee1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,24 +7,17 @@ edition = "2024" [dependencies] cidr = { version = "0.3.*", features = ["serde"] } -clap = { version = "4.*", features = ["derive"] } -ed25519-dalek = { version = "2.*", features = ["pem", "pkcs8"] } -env_logger = "0.11.*" etherparse = "0.19.*" ipnet = { version = "2.*", features = ["serde"] } log = "0.4.*" -nix = "0.23.*" -pem = "3.*" -rand_core = { version = "0.6.*", features = ["getrandom"] } riptun = { version = "0.1.*", default-features = false, features = ["tokio-impl"] } serde = { version = "1.*", features = ["derive"] } tokio = { version = "1.44.*", features = ["full"] } -toml = "0.8.*" -x25519-dalek = "2.*" [dependencies.reticulum] -#git = "https://github.com/BeechatNetworkSystemsLtd/Reticulum-rs" -git = "https://github.com/spearman/Reticulum-rs" -branch = "get-destinations" +git = "https://github.com/BeechatNetworkSystemsLtd/Reticulum-rs" #path = "../Reticulum-rs" version = "0.1.*" + +[workspace] +members = ["rns-vpn-client"] diff --git a/README.md b/README.md index b4f0d5d..a7f2ee8 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,14 @@ > P2P VPN over Reticulum mesh network -Library and application for VPN client over Reticulum mesh network. +Library and client application for VPN client over Reticulum mesh network. ## Building Building `Reticulum-rs` requires `protoc` binary for compiling `.proto` files. +Client application is a workspace member, build or run with `-p rns-vpn-client` flag. + ## Client configuration `Config.toml` @@ -19,8 +21,10 @@ the network ## Client application -Client application uses a Reticulum UDP interface that is configured with command-line -arguments. +`rns-vpn-client` + +Client application uses a Reticulum UDP or Kaonic interface that is configured with +command-line arguments. See `--help` for all options. Private keys can be generated with `openssl` tool using the `genkeys.sh` script. @@ -29,9 +33,13 @@ configured private keys and should be provided to peers to add to their configur Command-line options: -`-p ` -- required: local UDP port for Reticulum interface +`-p ` -- local UDP port for Reticulum interface; required unless using Kaonic +option -`-f :` -- required: IP and port for upstream Reticulum node +`-f :` -- IP and port for upstream Reticulum node; required unless using +Kaonic option + +`-a ` -- Kaonic gRPC address; required unless using UDP options `[-i ]` -- optional: use string to generate private ID; overrides creation of identity with `RNS_VPN_PRIVKEY_PATH`/`RNS_VPN_SIGNKEY_PATH` variables diff --git a/rns-vpn-client/Cargo.toml b/rns-vpn-client/Cargo.toml new file mode 100644 index 0000000..d4d8a68 --- /dev/null +++ b/rns-vpn-client/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "rns-vpn-client" +description = "P2P Reticulum VPN client application" +version = "0.1.0" +license = "MIT" +edition = "2024" + +[dependencies] +clap = { version = "4.*", features = ["derive"] } +ed25519-dalek = { version = "2.*", features = ["pem", "pkcs8"] } +env_logger = "0.11.*" +log = "0.4.*" +nix = "0.23.*" +pem = "3.*" +riptun = { version = "0.1.*", default-features = false, features = ["tokio-impl"] } +serde = { version = "1.*", features = ["derive"] } +tokio = { version = "1.44.*", features = ["full"] } +toml = "0.8.*" +x25519-dalek = "2.*" + +[dependencies.rns-vpn] +path = ".." + +[dependencies.reticulum] +git = "https://github.com/BeechatNetworkSystemsLtd/Reticulum-rs" +#path = "../Reticulum-rs" +version = "0.1.*" diff --git a/src/main.rs b/rns-vpn-client/src/main.rs similarity index 99% rename from src/main.rs rename to rns-vpn-client/src/main.rs index 71c3058..0984596 100644 --- a/src/main.rs +++ b/rns-vpn-client/src/main.rs @@ -8,6 +8,7 @@ use ed25519_dalek; use env_logger; use log; use pem; +use nix; use reticulum::identity::PrivateIdentity; use reticulum::iface::kaonic::kaonic_grpc::KaonicGrpc; use reticulum::iface::kaonic::RadioConfig; @@ -15,6 +16,7 @@ use reticulum::iface::udp::UdpInterface; use reticulum::transport::{Transport, TransportConfig}; use serde::{Deserialize, Serialize}; use tokio; +use toml; use x25519_dalek; use rns_vpn;