NAME

Wireguard::WGmeta::Index - A toolkit to manage Wireguard configurations.

DESCRIPTION

An approach to add metadata to the main wireguard config, written in Perl.

HIGHLIGHTS

  • Compatible with your existing setup (no configuration changes needed).

  • A CLI interface with abilities to set, enable, disable, apply, add and remove your wireguard config(s).

  • A fancy show output which combines the meta-data, running-config and static-configs. Now also available in a machine readable format

  • 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)!

ENVIRONMENT VARIABLES

  • WIREGUARD_HOME: Directory containing the Wireguard configuration -> Make sure the path ends with a `/`. Defaults to /etc/wireguard/.

  • WGmeta_NO_WG: If defined no actual wg * commands are run

  • 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

    • <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.

TECH DOCUMENTATION

AUTHORS

Since there is a lot of spam flooding my mailbox, I had to put spam filtering in place. If you want to make sure that your email gets delivered into my mailbox, include #im_not_a_bot# in the subject!

Tobias Bossert <tobib at cpan dot org>

THANKS TO

OETIKER+PARTNER AG for sponsoring this project.

COPYRIGHT AND LICENSE

MIT License

Copyright (c) 2021 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.