Skip to content
Docs / Getting Started

Getting Started

Build VSI from source on Linux, create a config.json file, start vsi_ngine, and verify proxy and metrics endpoints.

Introduction

VSI (Versatile Service Infrastructure) is a modular network infrastructure platform written in C11 for Linux. Rather than building standalone daemons per protocol, VSI centralizes TCP socket acceptance, JSON configuration loading, multi-service process supervision, and lock-free atomic metrics in a shared core engine (vsi_ngine).

Current Implementation Scope

VSI currently ships Forward Proxy, Reverse Proxy, and a shared HTTP JSON /metrics endpoint. The target operating system is Linux (POSIX). Windows and macOS are not supported.

Supported Platforms & Prerequisites

VSI relies on Linux/POSIX system interfaces including BSD TCP sockets, POSIX threads (pthread), fork()/waitpid() process supervision, CLOCK_MONOTONIC_RAW, and MAP_SHARED | MAP_ANONYMOUS mmap().

RequirementVerified SpecificationNotes
Operating SystemLinux (POSIX)Tested with GNU libc (_GNU_SOURCE)
C CompilerGCC or Clang (C11)Compiled with -Wall -Wextra -D_GNU_SOURCE
Build SystemCMake >= 3.28.3 + Make/NinjaDefined in root CMakeLists.txt
External LibrariesNonecJSON is vendored in utils/cJSON.c
Verification Toolcurl (optional)Useful for verifying proxy & metrics endpoints

Clone, Build, and First Run

Clone the repository, configure an out-of-source CMake build directory, and compile the vsi_ngine executable:

Build vsi_ngine on Linux
git clone https://github.com/VIKO-LABS/VNM.git
cd VNM
cmake -S . -B build
cmake --build build

Run vsi_ngine with no arguments to load config.json from the current working directory, or pass -c <path> to point to a specific configuration file:

Start VSI in the foreground
./build/vsi_ngine -c config.json

Basic Verification

Once started, vsi_ngine prints a startup banner listing active services, bind addresses, and the metrics URL. Verify each active service from a second terminal:

Verify Reverse Proxy, Forward Proxy, and /metrics
# 1. Query the shared metrics endpoint (default port 9100)
curl -s http://127.0.0.1:9100/metrics
# 2. Test Reverse Proxy (if enabled on port 8081)
curl -i http://127.0.0.1:8081/
# 3. Test Forward Proxy (if enabled on port 8085)
curl -x http://127.0.0.1:8085 https://example.com -I