rustici 1.1.1

Pure-Rust client for strongSwan's VICI protocol
Documentation
  • Coverage
  • 96.83%
    61 out of 63 items documented10 out of 31 items with examples
  • Size
  • Source code size: 70.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.94 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 17s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • mira-mobility/rustici
    6 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • AlexanderNeumann github:mira-mobility:mira maves137

Features

  • Encode/decode VICI messages (sections, lists, key/values).
  • Encode/decode VICI packets and transport framing (32-bit BE length).
  • Blocking client over UnixStream for request/response commands.
  • Register/unregister for events and read event messages.
  • No dependency on libstrongswan or davici — fresh Rust code.

Note: This library focuses on the protocol. It intentionally does not try to mirror the exact C API. Instead, it provides a small, idiomatic Rust surface that's easy to extend with higher-level helpers.

Example

List IKE_SAs using the list-sas command:

use rustici::{Client, Message};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut cli = Client::connect(rustici::client::DEFAULT_SOCKET)?;

    // empty request message
    let req = Message::new();

    let resp = cli.call("list-sas", &req)?;
    println!("{}", resp);
    Ok(())
}

Build and run example:

cargo run --example list_sas

Protocol references

Acknowledgments

This library is a Rust implementation based on the davici library from the strongSwan project.

strongSwan has been actively developed since 2005, with the modern IKE daemon written from scratch in a modular, object-oriented design. The intellectual property rights to strongSwan were acquired by secunet Security Networks AG in June 2022. We thank the strongSwan maintainers and contributors for their excellent work:

Andreas Steffen (strongSec GmbH) Tobias Brunner (codelabs GmbH) secunet Security Networks AG Martin Willi (original davici author)

License

This library is licensed under the GNU Lesser General Public License v2.1 or later (LGPL-2.1+) (Based on the original davici library).

Rust implementation:

  • Copyright (C) 2025 Mira Mobility

See the LICENSE file for the full license text.