This commit is contained in:
erikraft 2025-06-11 16:00:37 -03:00
parent 11f3f66e3b
commit 8743f8a8e4
4 changed files with 387 additions and 1254 deletions

1600
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -12,18 +12,17 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@tensorflow/tfjs-node": "^4.17.0", "body-parser": "^2.2.0",
"body-parser": "^1.20.2", "express": "^5.1.0",
"express": "^4.18.2", "express-rate-limit": "^7.5.0",
"express-rate-limit": "^7.1.5", "http-proxy-middleware": "^3.0.5",
"http-proxy-middleware": "^2.0.6",
"multer": "^2.0.1", "multer": "^2.0.1",
"ua-parser-js": "^1.0.37", "ua-parser-js": "^2.0.3",
"unique-names-generator": "^4.3.0", "unique-names-generator": "^4.7.1",
"ws": "^8.16.0" "ws": "^8.18.2"
}, },
"devDependencies": { "devDependencies": {
"nodemon": "^3.0.3" "nodemon": "^3.1.10"
}, },
"engines": { "engines": {
"node": ">=18.0.0 <19.0.0" "node": ">=18.0.0 <19.0.0"

View File

@ -183,4 +183,4 @@ if (!conf.signalingServer) {
console.log("This instance does not include a signaling server. Clients on this instance connect to the following signaling server:", conf.signalingServer); console.log("This instance does not include a signaling server. Clients on this instance connect to the following signaling server:", conf.signalingServer);
} }
console.log('\nPairDrop is running on port', conf.port); console.log('\nErikrafT Drop is running on port', conf.port);

View File

@ -1,7 +1,7 @@
import crypto from "crypto"; import crypto from "crypto";
import parser from "ua-parser-js"; import { UAParser } from "ua-parser-js";
import {animals, colors, uniqueNamesGenerator} from "unique-names-generator"; import { animals, colors, uniqueNamesGenerator } from "unique-names-generator";
import {cyrb53, hasher} from "./helper.js"; import { cyrb53, hasher } from "./helper.js";
export default class Peer { export default class Peer {
@ -142,7 +142,7 @@ export default class Peer {
} }
_setName(req) { _setName(req) {
let ua = parser(req.headers['user-agent']); const ua = new UAParser(req.headers['user-agent']).getResult();
let deviceName = ''; let deviceName = '';