Skip to content

Instantly share code, notes, and snippets.

View detamina's full-sized avatar

Jake detamina

View GitHub Profile
@duncansmart
duncansmart / edgemax-dump-traffic-stats.js
Last active March 28, 2024 15:09
Continuously grabs the traffic stats from an EdgeRouter-X router and dumps them in CSV format to stdout.
const url = require('url');
const axios = require('axios');
const qs = require('querystring')
const WebSocket = require('ws');
// disable certificate verification
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
const baseUrl = 'https://192.168.1.1';
const username = 'ubnt';