init
This commit is contained in:
16
clients/desktop/Cargo.toml
Normal file
16
clients/desktop/Cargo.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
[package]
|
||||
name = "vpnshare-desktop"
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
|
||||
[[bin]]
|
||||
name = "vpnshare-desktop"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
vpnshare-core = { path = "../../crates/vpnshare-core" }
|
||||
vpnshare-proto = { path = "../../crates/vpnshare-proto" }
|
||||
vpnshare-transport = { path = "../../crates/vpnshare-transport" }
|
||||
14
clients/desktop/src/main.rs
Normal file
14
clients/desktop/src/main.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use vpnshare_core::{GatewayConfig, MtuPolicy};
|
||||
use vpnshare_proto::{encode_frame, FrameType, PROTOCOL_VERSION};
|
||||
|
||||
fn main() {
|
||||
let config = GatewayConfig::default();
|
||||
let mtu = MtuPolicy::default();
|
||||
let hello = encode_frame(FrameType::Hello, 0, 1, b"vpnshare-desktop").expect("static hello frame");
|
||||
|
||||
println!("VPN Share desktop client skeleton");
|
||||
println!("protocol=VSHP/{PROTOCOL_VERSION}");
|
||||
println!("default_gateway_mtu={}", config.default_mtu);
|
||||
println!("effective_tunnel_mtu={}", mtu.effective_tunnel_mtu());
|
||||
println!("hello_frame_bytes={}", hello.len());
|
||||
}
|
||||
Reference in New Issue
Block a user