Replace uuid module with built in crypto for UUIDv4 generation

This commit is contained in:
davide-acanfora 2024-05-27 19:22:09 +02:00 committed by Philip H
parent e80ff54ebc
commit 859dd2f25b
3 changed files with 5 additions and 20 deletions

View file

@ -1,10 +1,9 @@
'use strict';
const fs = require('fs').promises;
const fs = require('node:fs/promises');
const path = require('path');
const debug = require('debug')('WireGuard');
const uuid = require('uuid');
const crypto = require('node:crypto');
const QRCode = require('qrcode');
const Util = require('./Util');
@ -248,7 +247,7 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
}
// Create Client
const id = uuid.v4();
const id = crypto.randomUUID();
const client = {
id,
name,