WgConfCore is a pure backend library designed to provide the core logic for the wg_conf CLI toolset.
It handles managing, synchronizing, evaluating, and running WireGuard and AmneziaWG configuration files via Ruby. The library is completely isolated from terminal output (puts/print) and communicates exclusively using clean data structures and strict exceptions, making it perfectly suited for automation scripts, system services, or Telegram bots.
- Configuration Management (
Config): Handles secure system verification, path expansions, and lazy evaluation of configuration parameters. - Directory Synchronization (
FileCopier,Copier): Manages safe bulk imports, file name tokenization, and dynamic conflict resolutions. - Status & Ping Checking (
VpnPinger): Provides multi-threaded or sequential validation of live tunnel connections. - Interface Runner (
VpnRunner): Safely controlssystemdnetwork interfaces, monitors active states, and catches low-level exceptions.
Add this line to your application's Gemfile:
gem 'wg_conf_core', git: 'https://github.com/dneverov/wg_conf_core', branch: 'master'And then execute:
bundle installThe core gem includes a robust unit testing environment. To execute the internal suite locally, run:
bundle exec rake testThe gem is available as open source under the terms of the MIT License.