1
0
Fork
You've already forked lwg
0
create and manage wireguard networks
  • Lua 100%
2025年08月06日 00:24:30 +02:00
rockspecs Release v0.1.0 2025年08月06日 00:24:30 +02:00
.gitignore Initial Commit 2025年08月04日 23:06:54 +02:00
.luarc.json Initial Commit 2025年08月04日 23:06:54 +02:00
LICENSE Add license 2025年08月06日 00:23:55 +02:00
lwg-scm-0.rockspec Add license 2025年08月06日 00:23:55 +02:00
main.lua lwg(up|down): default to /etc/hostname for <servername> 2025年08月06日 00:16:13 +02:00
readme.md Add readme.md 2025年08月06日 00:18:50 +02:00

lwg

create and manage wireguard networks

Installation

Via luarocks

> luarocks install lwg

Usage

> lwg [-h] [-d <dir>] [--completion {bash,zsh,fish}] <command>

Options

  • -h, --help - Show this help message and exit.
  • -d, --dir <dir> - config dir (default: /etc/lwg)
  • --completion {bash,zsh,fish} - Output a shell completion script for the specified shell.

Commands

Managing Networks

unless given, [network-name] defaults to the server's hostname (/etc/hostname on the vpn server)

  • new-server [network-name] [client1-name, client2-name, ...] - Create a new server (vpn network) and add one or more clients to it
  • add-client <client1-name>[, client2-name, ...] [network-name] - Add one or more clients to [network-name]
  • del-client <client1-name>[, client2-name, ...] [network-name] - Delete one or more clients from [network-name]
  • join <network-name> <ssh-host> - Join the <network-name> vpn network hosted by <ssh-host>. The lwg-tool must be present on the vpn server (<ssh-host>)

Connection Commands

  • status [network1-name, network2-name, ...] - Query the status of one or more vpn connections
  • up [network1-name, network2-name, ...] - Start one or more vpn connections
  • down [network1-name, network2-name, ...] - Stop one or more vpn connections

License Information

lwg is licensed under the MIT License.


Created by Lesosoftware in 2025