https://github.com/infraspecdev/mikrotik-wireguard-client-manager
A Node.js package for managing WireGuard VPN clients on MikroTik routers via SSH
https://github.com/infraspecdev/mikrotik-wireguard-client-manager
Last synced: 5 months ago
JSON representation
A Node.js package for managing WireGuard VPN clients on MikroTik routers via SSH
- Host: GitHub
- URL: https://github.com/infraspecdev/mikrotik-wireguard-client-manager
- Owner: infraspecdev
- License: mit
- Created: 2024-10-14T17:33:04.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-11T08:52:10.000Z (over 1 year ago)
- Last Synced: 2025-10-06T08:40:05.675Z (9 months ago)
- Language: TypeScript
- Size: 38.1 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
A Node.js package for managing WireGuard VPN clients on MikroTik routers via SSH.
**This project has a [Code of Conduct](CODE_OF_CONDUCT.md).**
## Table of contents
* [Installation](#Installation)
* [Features](#Features)
* [Running Tests](#Running-Tests)
* [Contributing](#Contributing)
* [License](#license)
```js
const { MikroTikWireGuardClientManager, MikroTikSSHClient } = require('@infraspecdev/mikrotik-wireguard-client-manager')
const sshClient = new MikroTikSSHClient("192.168.1.1", 22, "admin", "password");
const vpnManager = new MikroTikWireGuardClientManager(sshClient);
const clients = await vpnManager.listClients();
```
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/).
Before installing, [download and install Node.js](https://nodejs.org/en/download/).
Node.js 22 or higher is required.
If this is a brand new project, make sure to create a `package.json` first with
the [`npm init` command](https://docs.npmjs.com/creating-a-package-json-file).
Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```bash
npm install @infraspecdev/mikrotik-wireguard-client-manager
```
## Features
* Add WireGuard Client
* Remove WireGuard Client
* List WireGuard Clients
### Running Tests
To run the test suite, first install the dependencies:
```bash
npm install
```
Then run `npm test`:
```bash
npm test
```
## Contributing
The project welcomes all constructive contributions. Contributions take many forms,
from code for bug fixes and enhancements, to additions and fixes to documentation, additional
tests, triaging incoming pull requests and issues, and more!
See the [Contributing Guide](CONTRIBUTING.md) for more technical details on contributing.
## License
[MIT](LICENSE)