diff --git a/src/lib/WireGuard.js b/src/lib/WireGuard.js index aa5d42a..8cdec7c 100644 --- a/src/lib/WireGuard.js +++ b/src/lib/WireGuard.js @@ -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, diff --git a/src/package-lock.json b/src/package-lock.json index 6db68a7..32fecae 100644 --- a/src/package-lock.json +++ b/src/package-lock.json @@ -13,8 +13,7 @@ "debug": "^4.3.4", "express-session": "^1.18.0", "h3": "^1.11.1", - "qrcode": "^1.5.3", - "uuid": "^9.0.1" + "qrcode": "^1.5.3" }, "devDependencies": { "eslint-config-athom": "^3.1.3", @@ -4626,18 +4625,6 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", "dev": true }, - "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/v8-compile-cache": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz", diff --git a/src/package.json b/src/package.json index f63277e..ac53391 100644 --- a/src/package.json +++ b/src/package.json @@ -17,8 +17,7 @@ "debug": "^4.3.4", "express-session": "^1.18.0", "h3": "^1.11.1", - "qrcode": "^1.5.3", - "uuid": "^9.0.1" + "qrcode": "^1.5.3" }, "devDependencies": { "eslint-config-athom": "^3.1.3",