Replace uuid module with built in crypto for UUIDv4 generation
This commit is contained in:
parent
e80ff54ebc
commit
859dd2f25b
|
@ -1,10 +1,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const fs = require('fs').promises;
|
const fs = require('node:fs/promises');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const debug = require('debug')('WireGuard');
|
const debug = require('debug')('WireGuard');
|
||||||
const uuid = require('uuid');
|
const crypto = require('node:crypto');
|
||||||
const QRCode = require('qrcode');
|
const QRCode = require('qrcode');
|
||||||
|
|
||||||
const Util = require('./Util');
|
const Util = require('./Util');
|
||||||
|
@ -248,7 +247,7 @@ Endpoint = ${WG_HOST}:${WG_PORT}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create Client
|
// Create Client
|
||||||
const id = uuid.v4();
|
const id = crypto.randomUUID();
|
||||||
const client = {
|
const client = {
|
||||||
id,
|
id,
|
||||||
name,
|
name,
|
||||||
|
|
|
@ -13,8 +13,7 @@
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"express-session": "^1.18.0",
|
"express-session": "^1.18.0",
|
||||||
"h3": "^1.11.1",
|
"h3": "^1.11.1",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3"
|
||||||
"uuid": "^9.0.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-athom": "^3.1.3",
|
"eslint-config-athom": "^3.1.3",
|
||||||
|
@ -4626,18 +4625,6 @@
|
||||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||||
"dev": true
|
"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": {
|
"node_modules/v8-compile-cache": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"express-session": "^1.18.0",
|
"express-session": "^1.18.0",
|
||||||
"h3": "^1.11.1",
|
"h3": "^1.11.1",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3"
|
||||||
"uuid": "^9.0.1"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-athom": "^3.1.3",
|
"eslint-config-athom": "^3.1.3",
|
||||||
|
|
Loading…
Reference in New Issue