Skip to content

devdotnetorg/WgConfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WgConfig

Parsing and writing WireGuard configuration files (comment preserving)

WireGuard config files are ini-style. Since all "Peer" sections have the same name, these files cannot be parsed and modified by most libraries handling configuration files. Most existing libraries are not able to preserve or even add comments when modifying a config file. "wgconfig" was created to work with WireGuard configuration files and to preserve comments.


Features

  • Read and parse WireGuard configuration files and make the data available as Python dictionaries.
  • Create new WireGuard configuration files.
  • Add peers to WireGuard configuration files and delete peers from WireGuard configuration files.
  • Save and clone WireGuard configuration files.
  • Comments are preserved when reading and writing WireGuard configuration files.
  • Leading comments may be added when creating sections or attributes.
  • Such comments may be deleted when removing sections or attributes.
  • No other libraries are needed, i.e. no dependencies.

Installation

Requires .NET 9.0.

Install using .NET CLI:

dotnet add package WgConfig --version 1.0.0

About

Parsing and writing WireGuard configuration files (comment preserving)

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages