New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

vyos-client

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vyos-client

VyOS HTTP API Client

latest
Source
npmnpm
Version
0.2.2
Version published
Maintainers
1
Created
Source

vyos-client

npm docs license build

A simple to use client for the VyOS HTTP API.

For more information and setup instructions, see docs.vyos.io/HTTP-API.

import { Vyos } from 'vyos-client';
const client = new Vyos('https://my-vyos.local', 'API-KEY')

/* Modify configuration */
await client.config.get('system host-name') // 'my-vyos'
// 'my-vyos'
await client.config.set('system host-name', 'vyos')

/* Update OS images */
await client.images.add('https://downloads.vyos.io/rolling/current/amd64/vyos-1.4-rolling-202101301326-amd64.iso')
await client.images.remove('1.4-rolling-202101301326')

/* Run operational mode commands */
await client.ops.show('date')
// 'Mon 15 Feb 2021 10:54:54 PM EST\n'
await client.ops.generate('wireguard default-keypair');

For local testing, a Node.js repl is included.

Set the URL and KEY environment vars when running, or add them to a .env file.

$ npm install
$ npm run build
$ URL=https://my-vyos.local KEY=API-KEY npm run repl
v> await v.config.show('system host-name')
'my-vyos'

Keywords

vyos

FAQs

Package last updated on 16 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts