vsmprotocol 0.1.1

VSM Stealth Protocol - Invisible P2P encrypted transport
docs.rs failed to build vsmprotocol-0.1.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

vsmprotocol (Rust SDK)

VSM Stealth Protocol — High-performance, invisible P2P encrypted transport for Rust.

Crates.io Documentation

Enable bidirectional encrypted communication without opening a single port. vsmprotocol uses raw packet injection to create stealth tunnels that bypass the standard OS socket table.

For the full protocol documentation and other language SDKs, visit the Main Repository.


🚀 Quick Start

1. Installation

Add this to your Cargo.toml:

[dependencies]
vsmprotocol = "0.1"

Note: Requires sudo (root) permissions to inject and sniff raw packets.

2. Setup Firewalls (Mandatory)

Silence outgoing RST packets on your chosen port:

macOS:

echo "block drop out proto tcp from any to any port 9999" | sudo pfctl -a "com.apple/vsm" -f - && sudo pfctl -e

Linux:

sudo iptables -A OUTPUT -p tcp --tcp-flags RST RST -j DROP

💻 Usage

Create a Stealth Session

use vsmprotocol::VSMProtocol;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let vsm = VSMProtocol::load("./vsmprotocol.dylib")?;
    
    // Generate a fresh identity
    let id = vsm.generate_identity()?;
    println!("My Identity: {}", id);

    // Dial a remote stealth server
    let sid = vsm.dial("lo0", "127.0.0.1", 9999, &id);
    
    if sid != -1 {
        vsm.send_message(sid, "Hello from Rust!")?;
    }

    Ok(())
}

⚙️ How it works

This crate is a lightweight wrapper around the Go-compiled vsmprotocol shared library.

  • On first build, the build.rs script automatically downloads the correct precompiled binary for your architecture (macOS ARM/Intel, Linux, Windows) from the GitHub releases.
  • It links dynamically to provide a safe, idiomatic Rust API.

📜 License

MIT


Main Repository: https://github.com/cezarpena/vsm-protocol