Wireguard::WGmeta::Index - A toolkit to manage Wireguard configurations.
An approach to add metadata to the main wireguard config, written in Perl.
Compatible with your existing setup (no configuration changes needed).
A CLI interface with abilities to set, enable, disable and apply your wireguard config(s).
A fancy show output which combines the meta-data, running-config and static-configs
show
Modular structure: Both parsers/writers are independent - and therefore can be used as a standalone library.
Built-in concurrent access support!
No external dependencies, runs on plain Perl (>=v5.20)!
WIREGUARD_HOME: Directory containing the Wireguard configuration -> Make sure the path ends with a `/`. Defaults to /etc/wireguard/.
IS_TESTING: When defined, it has the following effects:
No external commands are run, all data required is obtained from t/test_data. Also very useful for developing
t/test_data
<Commands::Set|Enable|Disable> omits the header of the generated configuration files.
Line of code is shown for warnings and errors.
WG_NO_COLOR: If defined, the show command does not prettify the output with colors.
Wireguard::WGmeta::Parser::Config - Wireguard configuration parser (bi-directional)
Wireguard::WGmeta::Parser::Show - wg show dump parser.
wg show dump
Wireguard::WGmeta::Wrapper::Config - Wrapper class for reading/writing and modifying wireguard configurations and as well handle metadata.
Wireguard::WGmeta::Wrapper::ConfigT - Specialized wrapper class supporting concurrent access.
Wireguard::WGmeta::Wrapper::Show - Wrapper class around wg show dump output.
Wireguard::WGmeta::Cli::Router - Entry point for the CLI
Wireguard::WGmeta::ValidAttributes - Configurations for all supported attributes.
Tobias Bossert <tobib at cpan.org>
OETIKER+PARTNER AG for sponsoring this project.
MIT License
Copyright (c) 2020 Tobias Bossert
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
To install Wireguard::WGmeta, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wireguard::WGmeta
CPAN shell
perl -MCPAN -e shell install Wireguard::WGmeta
For more information on module installation, please visit the detailed CPAN module installation guide.