Upload 11 files
Browse files- Dockerfile +23 -0
- package-lock.json +1305 -0
- package.json +18 -0
- src/.DS_Store +0 -0
- src/server.js +130 -0
- src/services/authService.js +113 -0
- src/services/networkService.js +167 -0
- src/services/packetHandler.js +244 -0
- src/utils/cryptoUtils.js +107 -0
- src/utils/ipUtils.js +80 -0
- src/utils/tcpUtils.js +159 -0
Dockerfile
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use Node.js LTS
|
| 2 |
+
FROM node:18-bullseye-slim
|
| 3 |
+
|
| 4 |
+
# Set working directory
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy package files
|
| 8 |
+
COPY package*.json ./
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN npm install
|
| 12 |
+
|
| 13 |
+
# Copy source code
|
| 14 |
+
COPY . .
|
| 15 |
+
|
| 16 |
+
# Expose port (Hugging Face defaut is 7860)
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Define environment variables
|
| 20 |
+
ENV PORT=7860
|
| 21 |
+
|
| 22 |
+
# Start the application
|
| 23 |
+
CMD ["npm", "start"]
|
package-lock.json
ADDED
|
@@ -0,0 +1,1305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "server",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"lockfileVersion": 2,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"": {
|
| 8 |
+
"name": "server",
|
| 9 |
+
"version": "1.0.0",
|
| 10 |
+
"license": "ISC",
|
| 11 |
+
"dependencies": {
|
| 12 |
+
"crypto-js": "^4.2.0",
|
| 13 |
+
"express": "^5.2.1",
|
| 14 |
+
"ws": "^8.18.3"
|
| 15 |
+
}
|
| 16 |
+
},
|
| 17 |
+
"node_modules/accepts": {
|
| 18 |
+
"version": "2.0.0",
|
| 19 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
| 20 |
+
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
| 21 |
+
"dependencies": {
|
| 22 |
+
"mime-types": "^3.0.0",
|
| 23 |
+
"negotiator": "^1.0.0"
|
| 24 |
+
},
|
| 25 |
+
"engines": {
|
| 26 |
+
"node": ">= 0.6"
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"node_modules/body-parser": {
|
| 30 |
+
"version": "2.2.1",
|
| 31 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
|
| 32 |
+
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
|
| 33 |
+
"dependencies": {
|
| 34 |
+
"bytes": "^3.1.2",
|
| 35 |
+
"content-type": "^1.0.5",
|
| 36 |
+
"debug": "^4.4.3",
|
| 37 |
+
"http-errors": "^2.0.0",
|
| 38 |
+
"iconv-lite": "^0.7.0",
|
| 39 |
+
"on-finished": "^2.4.1",
|
| 40 |
+
"qs": "^6.14.0",
|
| 41 |
+
"raw-body": "^3.0.1",
|
| 42 |
+
"type-is": "^2.0.1"
|
| 43 |
+
},
|
| 44 |
+
"engines": {
|
| 45 |
+
"node": ">=18"
|
| 46 |
+
},
|
| 47 |
+
"funding": {
|
| 48 |
+
"type": "opencollective",
|
| 49 |
+
"url": "https://opencollective.com/express"
|
| 50 |
+
}
|
| 51 |
+
},
|
| 52 |
+
"node_modules/bytes": {
|
| 53 |
+
"version": "3.1.2",
|
| 54 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
| 55 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
| 56 |
+
"engines": {
|
| 57 |
+
"node": ">= 0.8"
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
"node_modules/call-bind-apply-helpers": {
|
| 61 |
+
"version": "1.0.2",
|
| 62 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 63 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 64 |
+
"dependencies": {
|
| 65 |
+
"es-errors": "^1.3.0",
|
| 66 |
+
"function-bind": "^1.1.2"
|
| 67 |
+
},
|
| 68 |
+
"engines": {
|
| 69 |
+
"node": ">= 0.4"
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"node_modules/call-bound": {
|
| 73 |
+
"version": "1.0.4",
|
| 74 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
| 75 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 76 |
+
"dependencies": {
|
| 77 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 78 |
+
"get-intrinsic": "^1.3.0"
|
| 79 |
+
},
|
| 80 |
+
"engines": {
|
| 81 |
+
"node": ">= 0.4"
|
| 82 |
+
},
|
| 83 |
+
"funding": {
|
| 84 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
"node_modules/content-disposition": {
|
| 88 |
+
"version": "1.0.1",
|
| 89 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
|
| 90 |
+
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==",
|
| 91 |
+
"engines": {
|
| 92 |
+
"node": ">=18"
|
| 93 |
+
},
|
| 94 |
+
"funding": {
|
| 95 |
+
"type": "opencollective",
|
| 96 |
+
"url": "https://opencollective.com/express"
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
"node_modules/content-type": {
|
| 100 |
+
"version": "1.0.5",
|
| 101 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
| 102 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
| 103 |
+
"engines": {
|
| 104 |
+
"node": ">= 0.6"
|
| 105 |
+
}
|
| 106 |
+
},
|
| 107 |
+
"node_modules/cookie": {
|
| 108 |
+
"version": "0.7.2",
|
| 109 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
|
| 110 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
|
| 111 |
+
"engines": {
|
| 112 |
+
"node": ">= 0.6"
|
| 113 |
+
}
|
| 114 |
+
},
|
| 115 |
+
"node_modules/cookie-signature": {
|
| 116 |
+
"version": "1.2.2",
|
| 117 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
| 118 |
+
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
|
| 119 |
+
"engines": {
|
| 120 |
+
"node": ">=6.6.0"
|
| 121 |
+
}
|
| 122 |
+
},
|
| 123 |
+
"node_modules/crypto-js": {
|
| 124 |
+
"version": "4.2.0",
|
| 125 |
+
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
| 126 |
+
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
| 127 |
+
},
|
| 128 |
+
"node_modules/debug": {
|
| 129 |
+
"version": "4.4.3",
|
| 130 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
| 131 |
+
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
| 132 |
+
"dependencies": {
|
| 133 |
+
"ms": "^2.1.3"
|
| 134 |
+
},
|
| 135 |
+
"engines": {
|
| 136 |
+
"node": ">=6.0"
|
| 137 |
+
},
|
| 138 |
+
"peerDependenciesMeta": {
|
| 139 |
+
"supports-color": {
|
| 140 |
+
"optional": true
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
},
|
| 144 |
+
"node_modules/depd": {
|
| 145 |
+
"version": "2.0.0",
|
| 146 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
| 147 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
| 148 |
+
"engines": {
|
| 149 |
+
"node": ">= 0.8"
|
| 150 |
+
}
|
| 151 |
+
},
|
| 152 |
+
"node_modules/dunder-proto": {
|
| 153 |
+
"version": "1.0.1",
|
| 154 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 155 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 156 |
+
"dependencies": {
|
| 157 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 158 |
+
"es-errors": "^1.3.0",
|
| 159 |
+
"gopd": "^1.2.0"
|
| 160 |
+
},
|
| 161 |
+
"engines": {
|
| 162 |
+
"node": ">= 0.4"
|
| 163 |
+
}
|
| 164 |
+
},
|
| 165 |
+
"node_modules/ee-first": {
|
| 166 |
+
"version": "1.1.1",
|
| 167 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| 168 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
| 169 |
+
},
|
| 170 |
+
"node_modules/encodeurl": {
|
| 171 |
+
"version": "2.0.0",
|
| 172 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 173 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
| 174 |
+
"engines": {
|
| 175 |
+
"node": ">= 0.8"
|
| 176 |
+
}
|
| 177 |
+
},
|
| 178 |
+
"node_modules/es-define-property": {
|
| 179 |
+
"version": "1.0.1",
|
| 180 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 181 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
| 182 |
+
"engines": {
|
| 183 |
+
"node": ">= 0.4"
|
| 184 |
+
}
|
| 185 |
+
},
|
| 186 |
+
"node_modules/es-errors": {
|
| 187 |
+
"version": "1.3.0",
|
| 188 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
| 189 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
| 190 |
+
"engines": {
|
| 191 |
+
"node": ">= 0.4"
|
| 192 |
+
}
|
| 193 |
+
},
|
| 194 |
+
"node_modules/es-object-atoms": {
|
| 195 |
+
"version": "1.1.1",
|
| 196 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 197 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 198 |
+
"dependencies": {
|
| 199 |
+
"es-errors": "^1.3.0"
|
| 200 |
+
},
|
| 201 |
+
"engines": {
|
| 202 |
+
"node": ">= 0.4"
|
| 203 |
+
}
|
| 204 |
+
},
|
| 205 |
+
"node_modules/escape-html": {
|
| 206 |
+
"version": "1.0.3",
|
| 207 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
| 208 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
| 209 |
+
},
|
| 210 |
+
"node_modules/etag": {
|
| 211 |
+
"version": "1.8.1",
|
| 212 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
| 213 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
| 214 |
+
"engines": {
|
| 215 |
+
"node": ">= 0.6"
|
| 216 |
+
}
|
| 217 |
+
},
|
| 218 |
+
"node_modules/express": {
|
| 219 |
+
"version": "5.2.1",
|
| 220 |
+
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
| 221 |
+
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
| 222 |
+
"dependencies": {
|
| 223 |
+
"accepts": "^2.0.0",
|
| 224 |
+
"body-parser": "^2.2.1",
|
| 225 |
+
"content-disposition": "^1.0.0",
|
| 226 |
+
"content-type": "^1.0.5",
|
| 227 |
+
"cookie": "^0.7.1",
|
| 228 |
+
"cookie-signature": "^1.2.1",
|
| 229 |
+
"debug": "^4.4.0",
|
| 230 |
+
"depd": "^2.0.0",
|
| 231 |
+
"encodeurl": "^2.0.0",
|
| 232 |
+
"escape-html": "^1.0.3",
|
| 233 |
+
"etag": "^1.8.1",
|
| 234 |
+
"finalhandler": "^2.1.0",
|
| 235 |
+
"fresh": "^2.0.0",
|
| 236 |
+
"http-errors": "^2.0.0",
|
| 237 |
+
"merge-descriptors": "^2.0.0",
|
| 238 |
+
"mime-types": "^3.0.0",
|
| 239 |
+
"on-finished": "^2.4.1",
|
| 240 |
+
"once": "^1.4.0",
|
| 241 |
+
"parseurl": "^1.3.3",
|
| 242 |
+
"proxy-addr": "^2.0.7",
|
| 243 |
+
"qs": "^6.14.0",
|
| 244 |
+
"range-parser": "^1.2.1",
|
| 245 |
+
"router": "^2.2.0",
|
| 246 |
+
"send": "^1.1.0",
|
| 247 |
+
"serve-static": "^2.2.0",
|
| 248 |
+
"statuses": "^2.0.1",
|
| 249 |
+
"type-is": "^2.0.1",
|
| 250 |
+
"vary": "^1.1.2"
|
| 251 |
+
},
|
| 252 |
+
"engines": {
|
| 253 |
+
"node": ">= 18"
|
| 254 |
+
},
|
| 255 |
+
"funding": {
|
| 256 |
+
"type": "opencollective",
|
| 257 |
+
"url": "https://opencollective.com/express"
|
| 258 |
+
}
|
| 259 |
+
},
|
| 260 |
+
"node_modules/finalhandler": {
|
| 261 |
+
"version": "2.1.1",
|
| 262 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
|
| 263 |
+
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
|
| 264 |
+
"dependencies": {
|
| 265 |
+
"debug": "^4.4.0",
|
| 266 |
+
"encodeurl": "^2.0.0",
|
| 267 |
+
"escape-html": "^1.0.3",
|
| 268 |
+
"on-finished": "^2.4.1",
|
| 269 |
+
"parseurl": "^1.3.3",
|
| 270 |
+
"statuses": "^2.0.1"
|
| 271 |
+
},
|
| 272 |
+
"engines": {
|
| 273 |
+
"node": ">= 18.0.0"
|
| 274 |
+
},
|
| 275 |
+
"funding": {
|
| 276 |
+
"type": "opencollective",
|
| 277 |
+
"url": "https://opencollective.com/express"
|
| 278 |
+
}
|
| 279 |
+
},
|
| 280 |
+
"node_modules/forwarded": {
|
| 281 |
+
"version": "0.2.0",
|
| 282 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
| 283 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
| 284 |
+
"engines": {
|
| 285 |
+
"node": ">= 0.6"
|
| 286 |
+
}
|
| 287 |
+
},
|
| 288 |
+
"node_modules/fresh": {
|
| 289 |
+
"version": "2.0.0",
|
| 290 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
| 291 |
+
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
|
| 292 |
+
"engines": {
|
| 293 |
+
"node": ">= 0.8"
|
| 294 |
+
}
|
| 295 |
+
},
|
| 296 |
+
"node_modules/function-bind": {
|
| 297 |
+
"version": "1.1.2",
|
| 298 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 299 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 300 |
+
"funding": {
|
| 301 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 302 |
+
}
|
| 303 |
+
},
|
| 304 |
+
"node_modules/get-intrinsic": {
|
| 305 |
+
"version": "1.3.0",
|
| 306 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 307 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 308 |
+
"dependencies": {
|
| 309 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 310 |
+
"es-define-property": "^1.0.1",
|
| 311 |
+
"es-errors": "^1.3.0",
|
| 312 |
+
"es-object-atoms": "^1.1.1",
|
| 313 |
+
"function-bind": "^1.1.2",
|
| 314 |
+
"get-proto": "^1.0.1",
|
| 315 |
+
"gopd": "^1.2.0",
|
| 316 |
+
"has-symbols": "^1.1.0",
|
| 317 |
+
"hasown": "^2.0.2",
|
| 318 |
+
"math-intrinsics": "^1.1.0"
|
| 319 |
+
},
|
| 320 |
+
"engines": {
|
| 321 |
+
"node": ">= 0.4"
|
| 322 |
+
},
|
| 323 |
+
"funding": {
|
| 324 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 325 |
+
}
|
| 326 |
+
},
|
| 327 |
+
"node_modules/get-proto": {
|
| 328 |
+
"version": "1.0.1",
|
| 329 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
| 330 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 331 |
+
"dependencies": {
|
| 332 |
+
"dunder-proto": "^1.0.1",
|
| 333 |
+
"es-object-atoms": "^1.0.0"
|
| 334 |
+
},
|
| 335 |
+
"engines": {
|
| 336 |
+
"node": ">= 0.4"
|
| 337 |
+
}
|
| 338 |
+
},
|
| 339 |
+
"node_modules/gopd": {
|
| 340 |
+
"version": "1.2.0",
|
| 341 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
| 342 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
| 343 |
+
"engines": {
|
| 344 |
+
"node": ">= 0.4"
|
| 345 |
+
},
|
| 346 |
+
"funding": {
|
| 347 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 348 |
+
}
|
| 349 |
+
},
|
| 350 |
+
"node_modules/has-symbols": {
|
| 351 |
+
"version": "1.1.0",
|
| 352 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 353 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
| 354 |
+
"engines": {
|
| 355 |
+
"node": ">= 0.4"
|
| 356 |
+
},
|
| 357 |
+
"funding": {
|
| 358 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 359 |
+
}
|
| 360 |
+
},
|
| 361 |
+
"node_modules/hasown": {
|
| 362 |
+
"version": "2.0.2",
|
| 363 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
| 364 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 365 |
+
"dependencies": {
|
| 366 |
+
"function-bind": "^1.1.2"
|
| 367 |
+
},
|
| 368 |
+
"engines": {
|
| 369 |
+
"node": ">= 0.4"
|
| 370 |
+
}
|
| 371 |
+
},
|
| 372 |
+
"node_modules/http-errors": {
|
| 373 |
+
"version": "2.0.1",
|
| 374 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
| 375 |
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
| 376 |
+
"dependencies": {
|
| 377 |
+
"depd": "~2.0.0",
|
| 378 |
+
"inherits": "~2.0.4",
|
| 379 |
+
"setprototypeof": "~1.2.0",
|
| 380 |
+
"statuses": "~2.0.2",
|
| 381 |
+
"toidentifier": "~1.0.1"
|
| 382 |
+
},
|
| 383 |
+
"engines": {
|
| 384 |
+
"node": ">= 0.8"
|
| 385 |
+
},
|
| 386 |
+
"funding": {
|
| 387 |
+
"type": "opencollective",
|
| 388 |
+
"url": "https://opencollective.com/express"
|
| 389 |
+
}
|
| 390 |
+
},
|
| 391 |
+
"node_modules/iconv-lite": {
|
| 392 |
+
"version": "0.7.1",
|
| 393 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz",
|
| 394 |
+
"integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
|
| 395 |
+
"dependencies": {
|
| 396 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 397 |
+
},
|
| 398 |
+
"engines": {
|
| 399 |
+
"node": ">=0.10.0"
|
| 400 |
+
},
|
| 401 |
+
"funding": {
|
| 402 |
+
"type": "opencollective",
|
| 403 |
+
"url": "https://opencollective.com/express"
|
| 404 |
+
}
|
| 405 |
+
},
|
| 406 |
+
"node_modules/inherits": {
|
| 407 |
+
"version": "2.0.4",
|
| 408 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
| 409 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
| 410 |
+
},
|
| 411 |
+
"node_modules/ipaddr.js": {
|
| 412 |
+
"version": "1.9.1",
|
| 413 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 414 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
| 415 |
+
"engines": {
|
| 416 |
+
"node": ">= 0.10"
|
| 417 |
+
}
|
| 418 |
+
},
|
| 419 |
+
"node_modules/is-promise": {
|
| 420 |
+
"version": "4.0.0",
|
| 421 |
+
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
|
| 422 |
+
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
|
| 423 |
+
},
|
| 424 |
+
"node_modules/math-intrinsics": {
|
| 425 |
+
"version": "1.1.0",
|
| 426 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 427 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
| 428 |
+
"engines": {
|
| 429 |
+
"node": ">= 0.4"
|
| 430 |
+
}
|
| 431 |
+
},
|
| 432 |
+
"node_modules/media-typer": {
|
| 433 |
+
"version": "1.1.0",
|
| 434 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
| 435 |
+
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==",
|
| 436 |
+
"engines": {
|
| 437 |
+
"node": ">= 0.8"
|
| 438 |
+
}
|
| 439 |
+
},
|
| 440 |
+
"node_modules/merge-descriptors": {
|
| 441 |
+
"version": "2.0.0",
|
| 442 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
| 443 |
+
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
|
| 444 |
+
"engines": {
|
| 445 |
+
"node": ">=18"
|
| 446 |
+
},
|
| 447 |
+
"funding": {
|
| 448 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 449 |
+
}
|
| 450 |
+
},
|
| 451 |
+
"node_modules/mime-db": {
|
| 452 |
+
"version": "1.54.0",
|
| 453 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
|
| 454 |
+
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==",
|
| 455 |
+
"engines": {
|
| 456 |
+
"node": ">= 0.6"
|
| 457 |
+
}
|
| 458 |
+
},
|
| 459 |
+
"node_modules/mime-types": {
|
| 460 |
+
"version": "3.0.2",
|
| 461 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
|
| 462 |
+
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
| 463 |
+
"dependencies": {
|
| 464 |
+
"mime-db": "^1.54.0"
|
| 465 |
+
},
|
| 466 |
+
"engines": {
|
| 467 |
+
"node": ">=18"
|
| 468 |
+
},
|
| 469 |
+
"funding": {
|
| 470 |
+
"type": "opencollective",
|
| 471 |
+
"url": "https://opencollective.com/express"
|
| 472 |
+
}
|
| 473 |
+
},
|
| 474 |
+
"node_modules/ms": {
|
| 475 |
+
"version": "2.1.3",
|
| 476 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 477 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
| 478 |
+
},
|
| 479 |
+
"node_modules/negotiator": {
|
| 480 |
+
"version": "1.0.0",
|
| 481 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
|
| 482 |
+
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==",
|
| 483 |
+
"engines": {
|
| 484 |
+
"node": ">= 0.6"
|
| 485 |
+
}
|
| 486 |
+
},
|
| 487 |
+
"node_modules/object-inspect": {
|
| 488 |
+
"version": "1.13.4",
|
| 489 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 490 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
|
| 491 |
+
"engines": {
|
| 492 |
+
"node": ">= 0.4"
|
| 493 |
+
},
|
| 494 |
+
"funding": {
|
| 495 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 496 |
+
}
|
| 497 |
+
},
|
| 498 |
+
"node_modules/on-finished": {
|
| 499 |
+
"version": "2.4.1",
|
| 500 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
| 501 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 502 |
+
"dependencies": {
|
| 503 |
+
"ee-first": "1.1.1"
|
| 504 |
+
},
|
| 505 |
+
"engines": {
|
| 506 |
+
"node": ">= 0.8"
|
| 507 |
+
}
|
| 508 |
+
},
|
| 509 |
+
"node_modules/once": {
|
| 510 |
+
"version": "1.4.0",
|
| 511 |
+
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
| 512 |
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
| 513 |
+
"dependencies": {
|
| 514 |
+
"wrappy": "1"
|
| 515 |
+
}
|
| 516 |
+
},
|
| 517 |
+
"node_modules/parseurl": {
|
| 518 |
+
"version": "1.3.3",
|
| 519 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
| 520 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
| 521 |
+
"engines": {
|
| 522 |
+
"node": ">= 0.8"
|
| 523 |
+
}
|
| 524 |
+
},
|
| 525 |
+
"node_modules/path-to-regexp": {
|
| 526 |
+
"version": "8.3.0",
|
| 527 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
| 528 |
+
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==",
|
| 529 |
+
"funding": {
|
| 530 |
+
"type": "opencollective",
|
| 531 |
+
"url": "https://opencollective.com/express"
|
| 532 |
+
}
|
| 533 |
+
},
|
| 534 |
+
"node_modules/proxy-addr": {
|
| 535 |
+
"version": "2.0.7",
|
| 536 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 537 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 538 |
+
"dependencies": {
|
| 539 |
+
"forwarded": "0.2.0",
|
| 540 |
+
"ipaddr.js": "1.9.1"
|
| 541 |
+
},
|
| 542 |
+
"engines": {
|
| 543 |
+
"node": ">= 0.10"
|
| 544 |
+
}
|
| 545 |
+
},
|
| 546 |
+
"node_modules/qs": {
|
| 547 |
+
"version": "6.14.0",
|
| 548 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
| 549 |
+
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
| 550 |
+
"dependencies": {
|
| 551 |
+
"side-channel": "^1.1.0"
|
| 552 |
+
},
|
| 553 |
+
"engines": {
|
| 554 |
+
"node": ">=0.6"
|
| 555 |
+
},
|
| 556 |
+
"funding": {
|
| 557 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 558 |
+
}
|
| 559 |
+
},
|
| 560 |
+
"node_modules/range-parser": {
|
| 561 |
+
"version": "1.2.1",
|
| 562 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
| 563 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
| 564 |
+
"engines": {
|
| 565 |
+
"node": ">= 0.6"
|
| 566 |
+
}
|
| 567 |
+
},
|
| 568 |
+
"node_modules/raw-body": {
|
| 569 |
+
"version": "3.0.2",
|
| 570 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
|
| 571 |
+
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
| 572 |
+
"dependencies": {
|
| 573 |
+
"bytes": "~3.1.2",
|
| 574 |
+
"http-errors": "~2.0.1",
|
| 575 |
+
"iconv-lite": "~0.7.0",
|
| 576 |
+
"unpipe": "~1.0.0"
|
| 577 |
+
},
|
| 578 |
+
"engines": {
|
| 579 |
+
"node": ">= 0.10"
|
| 580 |
+
}
|
| 581 |
+
},
|
| 582 |
+
"node_modules/router": {
|
| 583 |
+
"version": "2.2.0",
|
| 584 |
+
"resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
|
| 585 |
+
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
|
| 586 |
+
"dependencies": {
|
| 587 |
+
"debug": "^4.4.0",
|
| 588 |
+
"depd": "^2.0.0",
|
| 589 |
+
"is-promise": "^4.0.0",
|
| 590 |
+
"parseurl": "^1.3.3",
|
| 591 |
+
"path-to-regexp": "^8.0.0"
|
| 592 |
+
},
|
| 593 |
+
"engines": {
|
| 594 |
+
"node": ">= 18"
|
| 595 |
+
}
|
| 596 |
+
},
|
| 597 |
+
"node_modules/safer-buffer": {
|
| 598 |
+
"version": "2.1.2",
|
| 599 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 600 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
| 601 |
+
},
|
| 602 |
+
"node_modules/send": {
|
| 603 |
+
"version": "1.2.1",
|
| 604 |
+
"resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
|
| 605 |
+
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
|
| 606 |
+
"dependencies": {
|
| 607 |
+
"debug": "^4.4.3",
|
| 608 |
+
"encodeurl": "^2.0.0",
|
| 609 |
+
"escape-html": "^1.0.3",
|
| 610 |
+
"etag": "^1.8.1",
|
| 611 |
+
"fresh": "^2.0.0",
|
| 612 |
+
"http-errors": "^2.0.1",
|
| 613 |
+
"mime-types": "^3.0.2",
|
| 614 |
+
"ms": "^2.1.3",
|
| 615 |
+
"on-finished": "^2.4.1",
|
| 616 |
+
"range-parser": "^1.2.1",
|
| 617 |
+
"statuses": "^2.0.2"
|
| 618 |
+
},
|
| 619 |
+
"engines": {
|
| 620 |
+
"node": ">= 18"
|
| 621 |
+
},
|
| 622 |
+
"funding": {
|
| 623 |
+
"type": "opencollective",
|
| 624 |
+
"url": "https://opencollective.com/express"
|
| 625 |
+
}
|
| 626 |
+
},
|
| 627 |
+
"node_modules/serve-static": {
|
| 628 |
+
"version": "2.2.1",
|
| 629 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
|
| 630 |
+
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
|
| 631 |
+
"dependencies": {
|
| 632 |
+
"encodeurl": "^2.0.0",
|
| 633 |
+
"escape-html": "^1.0.3",
|
| 634 |
+
"parseurl": "^1.3.3",
|
| 635 |
+
"send": "^1.2.0"
|
| 636 |
+
},
|
| 637 |
+
"engines": {
|
| 638 |
+
"node": ">= 18"
|
| 639 |
+
},
|
| 640 |
+
"funding": {
|
| 641 |
+
"type": "opencollective",
|
| 642 |
+
"url": "https://opencollective.com/express"
|
| 643 |
+
}
|
| 644 |
+
},
|
| 645 |
+
"node_modules/setprototypeof": {
|
| 646 |
+
"version": "1.2.0",
|
| 647 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 648 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
| 649 |
+
},
|
| 650 |
+
"node_modules/side-channel": {
|
| 651 |
+
"version": "1.1.0",
|
| 652 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
| 653 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 654 |
+
"dependencies": {
|
| 655 |
+
"es-errors": "^1.3.0",
|
| 656 |
+
"object-inspect": "^1.13.3",
|
| 657 |
+
"side-channel-list": "^1.0.0",
|
| 658 |
+
"side-channel-map": "^1.0.1",
|
| 659 |
+
"side-channel-weakmap": "^1.0.2"
|
| 660 |
+
},
|
| 661 |
+
"engines": {
|
| 662 |
+
"node": ">= 0.4"
|
| 663 |
+
},
|
| 664 |
+
"funding": {
|
| 665 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 666 |
+
}
|
| 667 |
+
},
|
| 668 |
+
"node_modules/side-channel-list": {
|
| 669 |
+
"version": "1.0.0",
|
| 670 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 671 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 672 |
+
"dependencies": {
|
| 673 |
+
"es-errors": "^1.3.0",
|
| 674 |
+
"object-inspect": "^1.13.3"
|
| 675 |
+
},
|
| 676 |
+
"engines": {
|
| 677 |
+
"node": ">= 0.4"
|
| 678 |
+
},
|
| 679 |
+
"funding": {
|
| 680 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 681 |
+
}
|
| 682 |
+
},
|
| 683 |
+
"node_modules/side-channel-map": {
|
| 684 |
+
"version": "1.0.1",
|
| 685 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 686 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 687 |
+
"dependencies": {
|
| 688 |
+
"call-bound": "^1.0.2",
|
| 689 |
+
"es-errors": "^1.3.0",
|
| 690 |
+
"get-intrinsic": "^1.2.5",
|
| 691 |
+
"object-inspect": "^1.13.3"
|
| 692 |
+
},
|
| 693 |
+
"engines": {
|
| 694 |
+
"node": ">= 0.4"
|
| 695 |
+
},
|
| 696 |
+
"funding": {
|
| 697 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 698 |
+
}
|
| 699 |
+
},
|
| 700 |
+
"node_modules/side-channel-weakmap": {
|
| 701 |
+
"version": "1.0.2",
|
| 702 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 703 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 704 |
+
"dependencies": {
|
| 705 |
+
"call-bound": "^1.0.2",
|
| 706 |
+
"es-errors": "^1.3.0",
|
| 707 |
+
"get-intrinsic": "^1.2.5",
|
| 708 |
+
"object-inspect": "^1.13.3",
|
| 709 |
+
"side-channel-map": "^1.0.1"
|
| 710 |
+
},
|
| 711 |
+
"engines": {
|
| 712 |
+
"node": ">= 0.4"
|
| 713 |
+
},
|
| 714 |
+
"funding": {
|
| 715 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 716 |
+
}
|
| 717 |
+
},
|
| 718 |
+
"node_modules/statuses": {
|
| 719 |
+
"version": "2.0.2",
|
| 720 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
| 721 |
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
| 722 |
+
"engines": {
|
| 723 |
+
"node": ">= 0.8"
|
| 724 |
+
}
|
| 725 |
+
},
|
| 726 |
+
"node_modules/toidentifier": {
|
| 727 |
+
"version": "1.0.1",
|
| 728 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 729 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
| 730 |
+
"engines": {
|
| 731 |
+
"node": ">=0.6"
|
| 732 |
+
}
|
| 733 |
+
},
|
| 734 |
+
"node_modules/type-is": {
|
| 735 |
+
"version": "2.0.1",
|
| 736 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
| 737 |
+
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
| 738 |
+
"dependencies": {
|
| 739 |
+
"content-type": "^1.0.5",
|
| 740 |
+
"media-typer": "^1.1.0",
|
| 741 |
+
"mime-types": "^3.0.0"
|
| 742 |
+
},
|
| 743 |
+
"engines": {
|
| 744 |
+
"node": ">= 0.6"
|
| 745 |
+
}
|
| 746 |
+
},
|
| 747 |
+
"node_modules/unpipe": {
|
| 748 |
+
"version": "1.0.0",
|
| 749 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
| 750 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
| 751 |
+
"engines": {
|
| 752 |
+
"node": ">= 0.8"
|
| 753 |
+
}
|
| 754 |
+
},
|
| 755 |
+
"node_modules/vary": {
|
| 756 |
+
"version": "1.1.2",
|
| 757 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
| 758 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
| 759 |
+
"engines": {
|
| 760 |
+
"node": ">= 0.8"
|
| 761 |
+
}
|
| 762 |
+
},
|
| 763 |
+
"node_modules/wrappy": {
|
| 764 |
+
"version": "1.0.2",
|
| 765 |
+
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
| 766 |
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
| 767 |
+
},
|
| 768 |
+
"node_modules/ws": {
|
| 769 |
+
"version": "8.18.3",
|
| 770 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
| 771 |
+
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
| 772 |
+
"engines": {
|
| 773 |
+
"node": ">=10.0.0"
|
| 774 |
+
},
|
| 775 |
+
"peerDependencies": {
|
| 776 |
+
"bufferutil": "^4.0.1",
|
| 777 |
+
"utf-8-validate": ">=5.0.2"
|
| 778 |
+
},
|
| 779 |
+
"peerDependenciesMeta": {
|
| 780 |
+
"bufferutil": {
|
| 781 |
+
"optional": true
|
| 782 |
+
},
|
| 783 |
+
"utf-8-validate": {
|
| 784 |
+
"optional": true
|
| 785 |
+
}
|
| 786 |
+
}
|
| 787 |
+
}
|
| 788 |
+
},
|
| 789 |
+
"dependencies": {
|
| 790 |
+
"accepts": {
|
| 791 |
+
"version": "2.0.0",
|
| 792 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
|
| 793 |
+
"integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
|
| 794 |
+
"requires": {
|
| 795 |
+
"mime-types": "^3.0.0",
|
| 796 |
+
"negotiator": "^1.0.0"
|
| 797 |
+
}
|
| 798 |
+
},
|
| 799 |
+
"body-parser": {
|
| 800 |
+
"version": "2.2.1",
|
| 801 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz",
|
| 802 |
+
"integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==",
|
| 803 |
+
"requires": {
|
| 804 |
+
"bytes": "^3.1.2",
|
| 805 |
+
"content-type": "^1.0.5",
|
| 806 |
+
"debug": "^4.4.3",
|
| 807 |
+
"http-errors": "^2.0.0",
|
| 808 |
+
"iconv-lite": "^0.7.0",
|
| 809 |
+
"on-finished": "^2.4.1",
|
| 810 |
+
"qs": "^6.14.0",
|
| 811 |
+
"raw-body": "^3.0.1",
|
| 812 |
+
"type-is": "^2.0.1"
|
| 813 |
+
}
|
| 814 |
+
},
|
| 815 |
+
"bytes": {
|
| 816 |
+
"version": "3.1.2",
|
| 817 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
| 818 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
|
| 819 |
+
},
|
| 820 |
+
"call-bind-apply-helpers": {
|
| 821 |
+
"version": "1.0.2",
|
| 822 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
| 823 |
+
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
| 824 |
+
"requires": {
|
| 825 |
+
"es-errors": "^1.3.0",
|
| 826 |
+
"function-bind": "^1.1.2"
|
| 827 |
+
}
|
| 828 |
+
},
|
| 829 |
+
"call-bound": {
|
| 830 |
+
"version": "1.0.4",
|
| 831 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
|
| 832 |
+
"integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
|
| 833 |
+
"requires": {
|
| 834 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 835 |
+
"get-intrinsic": "^1.3.0"
|
| 836 |
+
}
|
| 837 |
+
},
|
| 838 |
+
"content-disposition": {
|
| 839 |
+
"version": "1.0.1",
|
| 840 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz",
|
| 841 |
+
"integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q=="
|
| 842 |
+
},
|
| 843 |
+
"content-type": {
|
| 844 |
+
"version": "1.0.5",
|
| 845 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
| 846 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA=="
|
| 847 |
+
},
|
| 848 |
+
"cookie": {
|
| 849 |
+
"version": "0.7.2",
|
| 850 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
|
| 851 |
+
"integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w=="
|
| 852 |
+
},
|
| 853 |
+
"cookie-signature": {
|
| 854 |
+
"version": "1.2.2",
|
| 855 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
|
| 856 |
+
"integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg=="
|
| 857 |
+
},
|
| 858 |
+
"crypto-js": {
|
| 859 |
+
"version": "4.2.0",
|
| 860 |
+
"resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz",
|
| 861 |
+
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
|
| 862 |
+
},
|
| 863 |
+
"debug": {
|
| 864 |
+
"version": "4.4.3",
|
| 865 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
| 866 |
+
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
| 867 |
+
"requires": {
|
| 868 |
+
"ms": "^2.1.3"
|
| 869 |
+
}
|
| 870 |
+
},
|
| 871 |
+
"depd": {
|
| 872 |
+
"version": "2.0.0",
|
| 873 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
| 874 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
|
| 875 |
+
},
|
| 876 |
+
"dunder-proto": {
|
| 877 |
+
"version": "1.0.1",
|
| 878 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
| 879 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
| 880 |
+
"requires": {
|
| 881 |
+
"call-bind-apply-helpers": "^1.0.1",
|
| 882 |
+
"es-errors": "^1.3.0",
|
| 883 |
+
"gopd": "^1.2.0"
|
| 884 |
+
}
|
| 885 |
+
},
|
| 886 |
+
"ee-first": {
|
| 887 |
+
"version": "1.1.1",
|
| 888 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
| 889 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
| 890 |
+
},
|
| 891 |
+
"encodeurl": {
|
| 892 |
+
"version": "2.0.0",
|
| 893 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
| 894 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg=="
|
| 895 |
+
},
|
| 896 |
+
"es-define-property": {
|
| 897 |
+
"version": "1.0.1",
|
| 898 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
| 899 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="
|
| 900 |
+
},
|
| 901 |
+
"es-errors": {
|
| 902 |
+
"version": "1.3.0",
|
| 903 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
| 904 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="
|
| 905 |
+
},
|
| 906 |
+
"es-object-atoms": {
|
| 907 |
+
"version": "1.1.1",
|
| 908 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
| 909 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
| 910 |
+
"requires": {
|
| 911 |
+
"es-errors": "^1.3.0"
|
| 912 |
+
}
|
| 913 |
+
},
|
| 914 |
+
"escape-html": {
|
| 915 |
+
"version": "1.0.3",
|
| 916 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
| 917 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
| 918 |
+
},
|
| 919 |
+
"etag": {
|
| 920 |
+
"version": "1.8.1",
|
| 921 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
| 922 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg=="
|
| 923 |
+
},
|
| 924 |
+
"express": {
|
| 925 |
+
"version": "5.2.1",
|
| 926 |
+
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
| 927 |
+
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
| 928 |
+
"requires": {
|
| 929 |
+
"accepts": "^2.0.0",
|
| 930 |
+
"body-parser": "^2.2.1",
|
| 931 |
+
"content-disposition": "^1.0.0",
|
| 932 |
+
"content-type": "^1.0.5",
|
| 933 |
+
"cookie": "^0.7.1",
|
| 934 |
+
"cookie-signature": "^1.2.1",
|
| 935 |
+
"debug": "^4.4.0",
|
| 936 |
+
"depd": "^2.0.0",
|
| 937 |
+
"encodeurl": "^2.0.0",
|
| 938 |
+
"escape-html": "^1.0.3",
|
| 939 |
+
"etag": "^1.8.1",
|
| 940 |
+
"finalhandler": "^2.1.0",
|
| 941 |
+
"fresh": "^2.0.0",
|
| 942 |
+
"http-errors": "^2.0.0",
|
| 943 |
+
"merge-descriptors": "^2.0.0",
|
| 944 |
+
"mime-types": "^3.0.0",
|
| 945 |
+
"on-finished": "^2.4.1",
|
| 946 |
+
"once": "^1.4.0",
|
| 947 |
+
"parseurl": "^1.3.3",
|
| 948 |
+
"proxy-addr": "^2.0.7",
|
| 949 |
+
"qs": "^6.14.0",
|
| 950 |
+
"range-parser": "^1.2.1",
|
| 951 |
+
"router": "^2.2.0",
|
| 952 |
+
"send": "^1.1.0",
|
| 953 |
+
"serve-static": "^2.2.0",
|
| 954 |
+
"statuses": "^2.0.1",
|
| 955 |
+
"type-is": "^2.0.1",
|
| 956 |
+
"vary": "^1.1.2"
|
| 957 |
+
}
|
| 958 |
+
},
|
| 959 |
+
"finalhandler": {
|
| 960 |
+
"version": "2.1.1",
|
| 961 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
|
| 962 |
+
"integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
|
| 963 |
+
"requires": {
|
| 964 |
+
"debug": "^4.4.0",
|
| 965 |
+
"encodeurl": "^2.0.0",
|
| 966 |
+
"escape-html": "^1.0.3",
|
| 967 |
+
"on-finished": "^2.4.1",
|
| 968 |
+
"parseurl": "^1.3.3",
|
| 969 |
+
"statuses": "^2.0.1"
|
| 970 |
+
}
|
| 971 |
+
},
|
| 972 |
+
"forwarded": {
|
| 973 |
+
"version": "0.2.0",
|
| 974 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
| 975 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
|
| 976 |
+
},
|
| 977 |
+
"fresh": {
|
| 978 |
+
"version": "2.0.0",
|
| 979 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
|
| 980 |
+
"integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A=="
|
| 981 |
+
},
|
| 982 |
+
"function-bind": {
|
| 983 |
+
"version": "1.1.2",
|
| 984 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 985 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="
|
| 986 |
+
},
|
| 987 |
+
"get-intrinsic": {
|
| 988 |
+
"version": "1.3.0",
|
| 989 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
| 990 |
+
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
| 991 |
+
"requires": {
|
| 992 |
+
"call-bind-apply-helpers": "^1.0.2",
|
| 993 |
+
"es-define-property": "^1.0.1",
|
| 994 |
+
"es-errors": "^1.3.0",
|
| 995 |
+
"es-object-atoms": "^1.1.1",
|
| 996 |
+
"function-bind": "^1.1.2",
|
| 997 |
+
"get-proto": "^1.0.1",
|
| 998 |
+
"gopd": "^1.2.0",
|
| 999 |
+
"has-symbols": "^1.1.0",
|
| 1000 |
+
"hasown": "^2.0.2",
|
| 1001 |
+
"math-intrinsics": "^1.1.0"
|
| 1002 |
+
}
|
| 1003 |
+
},
|
| 1004 |
+
"get-proto": {
|
| 1005 |
+
"version": "1.0.1",
|
| 1006 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
| 1007 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
| 1008 |
+
"requires": {
|
| 1009 |
+
"dunder-proto": "^1.0.1",
|
| 1010 |
+
"es-object-atoms": "^1.0.0"
|
| 1011 |
+
}
|
| 1012 |
+
},
|
| 1013 |
+
"gopd": {
|
| 1014 |
+
"version": "1.2.0",
|
| 1015 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
| 1016 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="
|
| 1017 |
+
},
|
| 1018 |
+
"has-symbols": {
|
| 1019 |
+
"version": "1.1.0",
|
| 1020 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
| 1021 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="
|
| 1022 |
+
},
|
| 1023 |
+
"hasown": {
|
| 1024 |
+
"version": "2.0.2",
|
| 1025 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
| 1026 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 1027 |
+
"requires": {
|
| 1028 |
+
"function-bind": "^1.1.2"
|
| 1029 |
+
}
|
| 1030 |
+
},
|
| 1031 |
+
"http-errors": {
|
| 1032 |
+
"version": "2.0.1",
|
| 1033 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
| 1034 |
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
| 1035 |
+
"requires": {
|
| 1036 |
+
"depd": "~2.0.0",
|
| 1037 |
+
"inherits": "~2.0.4",
|
| 1038 |
+
"setprototypeof": "~1.2.0",
|
| 1039 |
+
"statuses": "~2.0.2",
|
| 1040 |
+
"toidentifier": "~1.0.1"
|
| 1041 |
+
}
|
| 1042 |
+
},
|
| 1043 |
+
"iconv-lite": {
|
| 1044 |
+
"version": "0.7.1",
|
| 1045 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz",
|
| 1046 |
+
"integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==",
|
| 1047 |
+
"requires": {
|
| 1048 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
| 1049 |
+
}
|
| 1050 |
+
},
|
| 1051 |
+
"inherits": {
|
| 1052 |
+
"version": "2.0.4",
|
| 1053 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
| 1054 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
| 1055 |
+
},
|
| 1056 |
+
"ipaddr.js": {
|
| 1057 |
+
"version": "1.9.1",
|
| 1058 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
| 1059 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
|
| 1060 |
+
},
|
| 1061 |
+
"is-promise": {
|
| 1062 |
+
"version": "4.0.0",
|
| 1063 |
+
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
|
| 1064 |
+
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ=="
|
| 1065 |
+
},
|
| 1066 |
+
"math-intrinsics": {
|
| 1067 |
+
"version": "1.1.0",
|
| 1068 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
| 1069 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="
|
| 1070 |
+
},
|
| 1071 |
+
"media-typer": {
|
| 1072 |
+
"version": "1.1.0",
|
| 1073 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz",
|
| 1074 |
+
"integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw=="
|
| 1075 |
+
},
|
| 1076 |
+
"merge-descriptors": {
|
| 1077 |
+
"version": "2.0.0",
|
| 1078 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
|
| 1079 |
+
"integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g=="
|
| 1080 |
+
},
|
| 1081 |
+
"mime-db": {
|
| 1082 |
+
"version": "1.54.0",
|
| 1083 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
|
| 1084 |
+
"integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ=="
|
| 1085 |
+
},
|
| 1086 |
+
"mime-types": {
|
| 1087 |
+
"version": "3.0.2",
|
| 1088 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz",
|
| 1089 |
+
"integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==",
|
| 1090 |
+
"requires": {
|
| 1091 |
+
"mime-db": "^1.54.0"
|
| 1092 |
+
}
|
| 1093 |
+
},
|
| 1094 |
+
"ms": {
|
| 1095 |
+
"version": "2.1.3",
|
| 1096 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 1097 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
| 1098 |
+
},
|
| 1099 |
+
"negotiator": {
|
| 1100 |
+
"version": "1.0.0",
|
| 1101 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz",
|
| 1102 |
+
"integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg=="
|
| 1103 |
+
},
|
| 1104 |
+
"object-inspect": {
|
| 1105 |
+
"version": "1.13.4",
|
| 1106 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
|
| 1107 |
+
"integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew=="
|
| 1108 |
+
},
|
| 1109 |
+
"on-finished": {
|
| 1110 |
+
"version": "2.4.1",
|
| 1111 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
| 1112 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
| 1113 |
+
"requires": {
|
| 1114 |
+
"ee-first": "1.1.1"
|
| 1115 |
+
}
|
| 1116 |
+
},
|
| 1117 |
+
"once": {
|
| 1118 |
+
"version": "1.4.0",
|
| 1119 |
+
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
| 1120 |
+
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
| 1121 |
+
"requires": {
|
| 1122 |
+
"wrappy": "1"
|
| 1123 |
+
}
|
| 1124 |
+
},
|
| 1125 |
+
"parseurl": {
|
| 1126 |
+
"version": "1.3.3",
|
| 1127 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
| 1128 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
| 1129 |
+
},
|
| 1130 |
+
"path-to-regexp": {
|
| 1131 |
+
"version": "8.3.0",
|
| 1132 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz",
|
| 1133 |
+
"integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA=="
|
| 1134 |
+
},
|
| 1135 |
+
"proxy-addr": {
|
| 1136 |
+
"version": "2.0.7",
|
| 1137 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
| 1138 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
| 1139 |
+
"requires": {
|
| 1140 |
+
"forwarded": "0.2.0",
|
| 1141 |
+
"ipaddr.js": "1.9.1"
|
| 1142 |
+
}
|
| 1143 |
+
},
|
| 1144 |
+
"qs": {
|
| 1145 |
+
"version": "6.14.0",
|
| 1146 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz",
|
| 1147 |
+
"integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==",
|
| 1148 |
+
"requires": {
|
| 1149 |
+
"side-channel": "^1.1.0"
|
| 1150 |
+
}
|
| 1151 |
+
},
|
| 1152 |
+
"range-parser": {
|
| 1153 |
+
"version": "1.2.1",
|
| 1154 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
| 1155 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
|
| 1156 |
+
},
|
| 1157 |
+
"raw-body": {
|
| 1158 |
+
"version": "3.0.2",
|
| 1159 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
|
| 1160 |
+
"integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
|
| 1161 |
+
"requires": {
|
| 1162 |
+
"bytes": "~3.1.2",
|
| 1163 |
+
"http-errors": "~2.0.1",
|
| 1164 |
+
"iconv-lite": "~0.7.0",
|
| 1165 |
+
"unpipe": "~1.0.0"
|
| 1166 |
+
}
|
| 1167 |
+
},
|
| 1168 |
+
"router": {
|
| 1169 |
+
"version": "2.2.0",
|
| 1170 |
+
"resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
|
| 1171 |
+
"integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
|
| 1172 |
+
"requires": {
|
| 1173 |
+
"debug": "^4.4.0",
|
| 1174 |
+
"depd": "^2.0.0",
|
| 1175 |
+
"is-promise": "^4.0.0",
|
| 1176 |
+
"parseurl": "^1.3.3",
|
| 1177 |
+
"path-to-regexp": "^8.0.0"
|
| 1178 |
+
}
|
| 1179 |
+
},
|
| 1180 |
+
"safer-buffer": {
|
| 1181 |
+
"version": "2.1.2",
|
| 1182 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
| 1183 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
| 1184 |
+
},
|
| 1185 |
+
"send": {
|
| 1186 |
+
"version": "1.2.1",
|
| 1187 |
+
"resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
|
| 1188 |
+
"integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
|
| 1189 |
+
"requires": {
|
| 1190 |
+
"debug": "^4.4.3",
|
| 1191 |
+
"encodeurl": "^2.0.0",
|
| 1192 |
+
"escape-html": "^1.0.3",
|
| 1193 |
+
"etag": "^1.8.1",
|
| 1194 |
+
"fresh": "^2.0.0",
|
| 1195 |
+
"http-errors": "^2.0.1",
|
| 1196 |
+
"mime-types": "^3.0.2",
|
| 1197 |
+
"ms": "^2.1.3",
|
| 1198 |
+
"on-finished": "^2.4.1",
|
| 1199 |
+
"range-parser": "^1.2.1",
|
| 1200 |
+
"statuses": "^2.0.2"
|
| 1201 |
+
}
|
| 1202 |
+
},
|
| 1203 |
+
"serve-static": {
|
| 1204 |
+
"version": "2.2.1",
|
| 1205 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
|
| 1206 |
+
"integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
|
| 1207 |
+
"requires": {
|
| 1208 |
+
"encodeurl": "^2.0.0",
|
| 1209 |
+
"escape-html": "^1.0.3",
|
| 1210 |
+
"parseurl": "^1.3.3",
|
| 1211 |
+
"send": "^1.2.0"
|
| 1212 |
+
}
|
| 1213 |
+
},
|
| 1214 |
+
"setprototypeof": {
|
| 1215 |
+
"version": "1.2.0",
|
| 1216 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
| 1217 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
| 1218 |
+
},
|
| 1219 |
+
"side-channel": {
|
| 1220 |
+
"version": "1.1.0",
|
| 1221 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
| 1222 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
| 1223 |
+
"requires": {
|
| 1224 |
+
"es-errors": "^1.3.0",
|
| 1225 |
+
"object-inspect": "^1.13.3",
|
| 1226 |
+
"side-channel-list": "^1.0.0",
|
| 1227 |
+
"side-channel-map": "^1.0.1",
|
| 1228 |
+
"side-channel-weakmap": "^1.0.2"
|
| 1229 |
+
}
|
| 1230 |
+
},
|
| 1231 |
+
"side-channel-list": {
|
| 1232 |
+
"version": "1.0.0",
|
| 1233 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
| 1234 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
| 1235 |
+
"requires": {
|
| 1236 |
+
"es-errors": "^1.3.0",
|
| 1237 |
+
"object-inspect": "^1.13.3"
|
| 1238 |
+
}
|
| 1239 |
+
},
|
| 1240 |
+
"side-channel-map": {
|
| 1241 |
+
"version": "1.0.1",
|
| 1242 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
| 1243 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
| 1244 |
+
"requires": {
|
| 1245 |
+
"call-bound": "^1.0.2",
|
| 1246 |
+
"es-errors": "^1.3.0",
|
| 1247 |
+
"get-intrinsic": "^1.2.5",
|
| 1248 |
+
"object-inspect": "^1.13.3"
|
| 1249 |
+
}
|
| 1250 |
+
},
|
| 1251 |
+
"side-channel-weakmap": {
|
| 1252 |
+
"version": "1.0.2",
|
| 1253 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
| 1254 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
| 1255 |
+
"requires": {
|
| 1256 |
+
"call-bound": "^1.0.2",
|
| 1257 |
+
"es-errors": "^1.3.0",
|
| 1258 |
+
"get-intrinsic": "^1.2.5",
|
| 1259 |
+
"object-inspect": "^1.13.3",
|
| 1260 |
+
"side-channel-map": "^1.0.1"
|
| 1261 |
+
}
|
| 1262 |
+
},
|
| 1263 |
+
"statuses": {
|
| 1264 |
+
"version": "2.0.2",
|
| 1265 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
| 1266 |
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw=="
|
| 1267 |
+
},
|
| 1268 |
+
"toidentifier": {
|
| 1269 |
+
"version": "1.0.1",
|
| 1270 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
| 1271 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
|
| 1272 |
+
},
|
| 1273 |
+
"type-is": {
|
| 1274 |
+
"version": "2.0.1",
|
| 1275 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz",
|
| 1276 |
+
"integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==",
|
| 1277 |
+
"requires": {
|
| 1278 |
+
"content-type": "^1.0.5",
|
| 1279 |
+
"media-typer": "^1.1.0",
|
| 1280 |
+
"mime-types": "^3.0.0"
|
| 1281 |
+
}
|
| 1282 |
+
},
|
| 1283 |
+
"unpipe": {
|
| 1284 |
+
"version": "1.0.0",
|
| 1285 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
| 1286 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ=="
|
| 1287 |
+
},
|
| 1288 |
+
"vary": {
|
| 1289 |
+
"version": "1.1.2",
|
| 1290 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
| 1291 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg=="
|
| 1292 |
+
},
|
| 1293 |
+
"wrappy": {
|
| 1294 |
+
"version": "1.0.2",
|
| 1295 |
+
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
| 1296 |
+
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
| 1297 |
+
},
|
| 1298 |
+
"ws": {
|
| 1299 |
+
"version": "8.18.3",
|
| 1300 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz",
|
| 1301 |
+
"integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==",
|
| 1302 |
+
"requires": {}
|
| 1303 |
+
}
|
| 1304 |
+
}
|
| 1305 |
+
}
|
package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "server",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "",
|
| 5 |
+
"main": "index.js",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"start": "node src/server.js",
|
| 8 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
| 9 |
+
},
|
| 10 |
+
"keywords": [],
|
| 11 |
+
"author": "",
|
| 12 |
+
"license": "ISC",
|
| 13 |
+
"dependencies": {
|
| 14 |
+
"crypto-js": "^4.2.0",
|
| 15 |
+
"express": "^5.2.1",
|
| 16 |
+
"ws": "^8.18.3"
|
| 17 |
+
}
|
| 18 |
+
}
|
src/.DS_Store
ADDED
|
Binary file (8.2 kB). View file
|
|
|
src/server.js
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// server.js
|
| 2 |
+
const express = require('express');
|
| 3 |
+
const http = require('http');
|
| 4 |
+
const WebSocket = require('ws');
|
| 5 |
+
const { handleIncomingPacket, setClientIdentifier, cleanupClientConnections } = require('./services/packetHandler');
|
| 6 |
+
const { authenticateClient, generateSessionKey } = require('./services/authService');
|
| 7 |
+
|
| 8 |
+
// 创建 Express 应用
|
| 9 |
+
const app = express();
|
| 10 |
+
const port = process.env.PORT || 7860;
|
| 11 |
+
|
| 12 |
+
// 创建 HTTP 服务器
|
| 13 |
+
const server = http.createServer(app);
|
| 14 |
+
|
| 15 |
+
// 创建 WebSocket 服务器
|
| 16 |
+
const wss = new WebSocket.Server({ server });
|
| 17 |
+
|
| 18 |
+
// 存储客户端连接
|
| 19 |
+
const clients = new Set();
|
| 20 |
+
|
| 21 |
+
// WebSocket 连接处理
|
| 22 |
+
wss.on('connection', (ws, req) => {
|
| 23 |
+
console.log('新的 WebSocket 连接');
|
| 24 |
+
|
| 25 |
+
// 将客户端添加到集合中
|
| 26 |
+
clients.add(ws);
|
| 27 |
+
|
| 28 |
+
// 连接错误处理
|
| 29 |
+
ws.on('error', (error) => {
|
| 30 |
+
console.error('WebSocket 错误:', error);
|
| 31 |
+
});
|
| 32 |
+
|
| 33 |
+
// 处理认证消息
|
| 34 |
+
ws.once('message', (data) => {
|
| 35 |
+
try {
|
| 36 |
+
const authMessage = JSON.parse(data);
|
| 37 |
+
|
| 38 |
+
// 检查是否为认证消息
|
| 39 |
+
if (authMessage.type === 'auth') {
|
| 40 |
+
const { clientId, clientSecret } = authMessage.payload;
|
| 41 |
+
|
| 42 |
+
// 验证客户端
|
| 43 |
+
if (authenticateClient(clientId, clientSecret)) {
|
| 44 |
+
// 生成会话密钥
|
| 45 |
+
const sessionKey = generateSessionKey(clientId);
|
| 46 |
+
|
| 47 |
+
// 设置客户端标识
|
| 48 |
+
setClientIdentifier(ws, clientId);
|
| 49 |
+
|
| 50 |
+
// 发送认证成功消息
|
| 51 |
+
ws.send(JSON.stringify({
|
| 52 |
+
type: 'auth_success',
|
| 53 |
+
message: 'Authentication successful',
|
| 54 |
+
sessionKey: sessionKey
|
| 55 |
+
}));
|
| 56 |
+
|
| 57 |
+
console.log(`客户端 ${clientId} 认证成功`);
|
| 58 |
+
} else {
|
| 59 |
+
// 发送认证失败消息
|
| 60 |
+
ws.send(JSON.stringify({
|
| 61 |
+
type: 'auth_failed',
|
| 62 |
+
message: 'Authentication failed'
|
| 63 |
+
}));
|
| 64 |
+
|
| 65 |
+
console.log(`客户端 ${clientId} 认证失败`);
|
| 66 |
+
ws.close();
|
| 67 |
+
}
|
| 68 |
+
} else {
|
| 69 |
+
// 如果不是认证消息,发送错误并关闭连接
|
| 70 |
+
ws.send(JSON.stringify({
|
| 71 |
+
type: 'error',
|
| 72 |
+
message: 'Authentication required'
|
| 73 |
+
}));
|
| 74 |
+
|
| 75 |
+
console.log('未提供认证信息,关闭连接');
|
| 76 |
+
ws.close();
|
| 77 |
+
}
|
| 78 |
+
} catch (error) {
|
| 79 |
+
console.error('处理认证消息时出错:', error.message);
|
| 80 |
+
ws.close();
|
| 81 |
+
}
|
| 82 |
+
});
|
| 83 |
+
|
| 84 |
+
// 接收消息处理
|
| 85 |
+
ws.on('message', async (data) => {
|
| 86 |
+
// 尝试解析为 JSON
|
| 87 |
+
try {
|
| 88 |
+
const message = JSON.parse(data);
|
| 89 |
+
if (message.type === 'auth') {
|
| 90 |
+
return;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
if (['connect', 'data', 'close'].includes(message.type)) {
|
| 94 |
+
const { handleControlMessage } = require('./services/packetHandler');
|
| 95 |
+
await handleControlMessage(message, ws);
|
| 96 |
+
return;
|
| 97 |
+
}
|
| 98 |
+
} catch (e) {
|
| 99 |
+
// 如果不是 JSON 消息,则继续处理为数据包
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
// console.log('接收到消息,长度:', data.length);
|
| 103 |
+
|
| 104 |
+
// 处理接收到的数据包
|
| 105 |
+
await handleIncomingPacket(data, ws);
|
| 106 |
+
});
|
| 107 |
+
|
| 108 |
+
// 连接关闭处理
|
| 109 |
+
ws.on('close', () => {
|
| 110 |
+
console.log('WebSocket 连接已关闭');
|
| 111 |
+
// 清理客户端连接
|
| 112 |
+
cleanupClientConnections(ws);
|
| 113 |
+
clients.delete(ws);
|
| 114 |
+
});
|
| 115 |
+
|
| 116 |
+
// 发送欢迎消息
|
| 117 |
+
ws.send(JSON.stringify({ type: 'welcome', message: 'Connected to tun2websocket server. Please authenticate.' }));
|
| 118 |
+
});
|
| 119 |
+
|
| 120 |
+
// 健康检查端点
|
| 121 |
+
app.get('/health', (req, res) => {
|
| 122 |
+
res.status(200).json({ status: 'ok', timestamp: new Date().toISOString() });
|
| 123 |
+
});
|
| 124 |
+
|
| 125 |
+
// 启动服务器
|
| 126 |
+
server.listen(port, () => {
|
| 127 |
+
console.log(`服务器运行在端口 ${port}`);
|
| 128 |
+
});
|
| 129 |
+
|
| 130 |
+
module.exports = { app, server, wss };
|
src/services/authService.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// authService.js
|
| 2 |
+
const { encrypt, decrypt } = require('../utils/cryptoUtils');
|
| 3 |
+
|
| 4 |
+
// 简单的内存存储用于保存会话密钥
|
| 5 |
+
// 在生产环境中,应该使用数据库或其他持久化存储
|
| 6 |
+
const sessionKeys = new Map();
|
| 7 |
+
|
| 8 |
+
/**
|
| 9 |
+
* 生成会话密钥
|
| 10 |
+
* @param {string} clientId - 客户端标识
|
| 11 |
+
* @returns {string} 会话密钥
|
| 12 |
+
*/
|
| 13 |
+
function generateSessionKey(clientId) {
|
| 14 |
+
// 生成一个随机的会话密钥
|
| 15 |
+
const sessionKey = require('crypto').randomBytes(32).toString('hex');
|
| 16 |
+
|
| 17 |
+
// 保存会话密钥
|
| 18 |
+
sessionKeys.set(clientId, sessionKey);
|
| 19 |
+
|
| 20 |
+
return sessionKey;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
/**
|
| 24 |
+
* 验证客户端
|
| 25 |
+
* @param {string} clientId - 客户端标识
|
| 26 |
+
* @param {string} clientSecret - 客户端密钥
|
| 27 |
+
* @returns {boolean} 验证是否成功
|
| 28 |
+
*/
|
| 29 |
+
function authenticateClient(clientId, clientSecret) {
|
| 30 |
+
// 在实际应用中,应该从数据库或其他安全存储中获取客户端密钥
|
| 31 |
+
// 这里为了简化,使用硬编码的密钥
|
| 32 |
+
const validClientId = 'test-client';
|
| 33 |
+
const validClientSecret = 'test-secret';
|
| 34 |
+
|
| 35 |
+
return clientId === validClientId && clientSecret === validClientSecret;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* 获取客户端的会话密钥
|
| 40 |
+
* @param {string} clientId - 客户端标识
|
| 41 |
+
* @returns {string|null} 会话密钥或 null
|
| 42 |
+
*/
|
| 43 |
+
function getSessionKey(clientId) {
|
| 44 |
+
return sessionKeys.get(clientId) || null;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
/**
|
| 48 |
+
* 删除客户端的会话密钥
|
| 49 |
+
* @param {string} clientId - 客户端标识
|
| 50 |
+
*/
|
| 51 |
+
function removeSessionKey(clientId) {
|
| 52 |
+
sessionKeys.delete(clientId);
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* 加密数据包
|
| 57 |
+
* @param {Buffer} data - 要加密的数据
|
| 58 |
+
* @param {string} clientId - 客户端标识
|
| 59 |
+
* @returns {Buffer} 加密后的数据
|
| 60 |
+
*/
|
| 61 |
+
function encryptPacket(data, clientId) {
|
| 62 |
+
const sessionKey = getSessionKey(clientId);
|
| 63 |
+
|
| 64 |
+
if (!sessionKey) {
|
| 65 |
+
throw new Error('未找到会话密钥');
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
// 加密数据
|
| 69 |
+
const encrypted = encrypt(data, sessionKey);
|
| 70 |
+
|
| 71 |
+
// 将加密参数和数据组合成一个缓冲区
|
| 72 |
+
// 格式: salt(16) + iv(12) + authTag(16) + encryptedData(n)
|
| 73 |
+
const result = Buffer.concat([
|
| 74 |
+
encrypted.salt,
|
| 75 |
+
encrypted.iv,
|
| 76 |
+
encrypted.authTag,
|
| 77 |
+
encrypted.data
|
| 78 |
+
]);
|
| 79 |
+
|
| 80 |
+
return result;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
/**
|
| 84 |
+
* 解密数据包
|
| 85 |
+
* @param {Buffer} encryptedData - 加密的数据
|
| 86 |
+
* @param {string} clientId - 客户端标识
|
| 87 |
+
* @returns {Buffer} 解密后的数据
|
| 88 |
+
*/
|
| 89 |
+
function decryptPacket(encryptedData, clientId) {
|
| 90 |
+
const sessionKey = getSessionKey(clientId);
|
| 91 |
+
|
| 92 |
+
if (!sessionKey) {
|
| 93 |
+
throw new Error('未找到会话密钥');
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
// 解析加密参数
|
| 97 |
+
const salt = encryptedData.slice(0, 16);
|
| 98 |
+
const iv = encryptedData.slice(16, 28);
|
| 99 |
+
const authTag = encryptedData.slice(28, 44);
|
| 100 |
+
const data = encryptedData.slice(44);
|
| 101 |
+
|
| 102 |
+
// 解密数据
|
| 103 |
+
return decrypt(data, salt, iv, authTag, sessionKey);
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
module.exports = {
|
| 107 |
+
generateSessionKey,
|
| 108 |
+
authenticateClient,
|
| 109 |
+
getSessionKey,
|
| 110 |
+
removeSessionKey,
|
| 111 |
+
encryptPacket,
|
| 112 |
+
decryptPacket
|
| 113 |
+
};
|
src/services/networkService.js
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// networkService.js
|
| 2 |
+
const net = require('net');
|
| 3 |
+
const dgram = require('dgram');
|
| 4 |
+
const { exec } = require('child_process');
|
| 5 |
+
const { promisify } = require('util');
|
| 6 |
+
|
| 7 |
+
const execAsync = promisify(exec);
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* 创建一个不会被TUN设备捕获的TCP连接
|
| 11 |
+
* @param {string} host - 目标主机
|
| 12 |
+
* @param {number} port - 目标端口
|
| 13 |
+
* @returns {net.Socket} TCP套接字
|
| 14 |
+
*/
|
| 15 |
+
function createProtectedTCPConnection(host, port) {
|
| 16 |
+
console.log(`创建受保护的TCP连接到 ${host}:${port}`);
|
| 17 |
+
|
| 18 |
+
// 创建TCP套接字
|
| 19 |
+
const socket = new net.Socket();
|
| 20 |
+
|
| 21 |
+
// 设置连接选项,尝试避免路由循环
|
| 22 |
+
socket.setNoDelay(true);
|
| 23 |
+
socket.setTimeout(10000); // 10秒超时
|
| 24 |
+
|
| 25 |
+
// 尝试设置SOCKET选项来避免路由循环
|
| 26 |
+
try {
|
| 27 |
+
// 在某些系统上,可以设置SOCK_NO_CHECK_V4来避免路由循环
|
| 28 |
+
// 注意:这个选项在Node.js中可能不可用
|
| 29 |
+
socket.setKeepAlive(true, 1000);
|
| 30 |
+
} catch (error) {
|
| 31 |
+
console.warn('设置TCP套接字选项时出错:', error.message);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
// 连接到目标主机
|
| 35 |
+
socket.connect(port, host, () => {
|
| 36 |
+
console.log(`已连接到 ${host}:${port}`);
|
| 37 |
+
});
|
| 38 |
+
|
| 39 |
+
return socket;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* 创建一个不会被TUN设备捕获的UDP套接字
|
| 44 |
+
* @returns {dgram.Socket} UDP套接字
|
| 45 |
+
*/
|
| 46 |
+
function createProtectedUDPSocket() {
|
| 47 |
+
console.log('创建受保护的UDP套接字');
|
| 48 |
+
|
| 49 |
+
// 创建UDP套接字
|
| 50 |
+
const socket = dgram.createSocket('udp4');
|
| 51 |
+
|
| 52 |
+
return socket;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
/**
|
| 56 |
+
* 通过系统命令发送ICMP数据包(避免路由循环)
|
| 57 |
+
* @param {string} destinationIP - 目标IP地址
|
| 58 |
+
* @param {Buffer} packet - ICMP数据包
|
| 59 |
+
* @returns {Promise<void>}
|
| 60 |
+
*/
|
| 61 |
+
async function sendICMPPacketViaSystem(destinationIP, packet) {
|
| 62 |
+
console.log(`通过系统命令发送ICMP数据包到 ${destinationIP}`);
|
| 63 |
+
|
| 64 |
+
try {
|
| 65 |
+
// 将数据包保存到临时文件
|
| 66 |
+
const fs = require('fs');
|
| 67 |
+
const path = require('path');
|
| 68 |
+
const tempDir = '/tmp';
|
| 69 |
+
const tempFile = path.join(tempDir, `icmp_packet_${Date.now()}.bin`);
|
| 70 |
+
|
| 71 |
+
// 写入数据包到临时文件
|
| 72 |
+
fs.writeFileSync(tempFile, packet);
|
| 73 |
+
|
| 74 |
+
// 使用hping3或ping命令发送ICMP数据包
|
| 75 |
+
// 注意:这需要安装hping3工具
|
| 76 |
+
const command = `hping3 -0 -c 1 -d ${packet.length} -E ${tempFile} ${destinationIP}`;
|
| 77 |
+
|
| 78 |
+
console.log(`执行命令: ${command}`);
|
| 79 |
+
const { stdout, stderr } = await execAsync(command);
|
| 80 |
+
|
| 81 |
+
if (stderr) {
|
| 82 |
+
console.warn('发送ICMP数据包时的警告:', stderr);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
console.log('ICMP数据包发送结果:', stdout);
|
| 86 |
+
|
| 87 |
+
// 清理临时文件
|
| 88 |
+
fs.unlinkSync(tempFile);
|
| 89 |
+
} catch (error) {
|
| 90 |
+
console.error('通过系统命令发送ICMP数据包时出错:', error.message);
|
| 91 |
+
|
| 92 |
+
// 回退到普通UDP发送
|
| 93 |
+
console.log('回退到普通UDP发送');
|
| 94 |
+
const client = dgram.createSocket('udp4');
|
| 95 |
+
client.send(packet, 0, packet.length, 7, destinationIP, (err) => {
|
| 96 |
+
if (err) {
|
| 97 |
+
console.error('发送ICMP数据包时出错:', err.message);
|
| 98 |
+
} else {
|
| 99 |
+
console.log(`ICMP数据包已发送到 ${destinationIP}:7`);
|
| 100 |
+
}
|
| 101 |
+
client.close();
|
| 102 |
+
});
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/**
|
| 107 |
+
* 检查是否为本地地址
|
| 108 |
+
* @param {string} ip - IP地址
|
| 109 |
+
* @returns {boolean} 是否为本地地址
|
| 110 |
+
*/
|
| 111 |
+
function isLocalAddress(ip) {
|
| 112 |
+
// 检查是否为本地回环地址
|
| 113 |
+
if (ip.startsWith('127.') || ip === 'localhost') {
|
| 114 |
+
return true;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
// 检查是否为私有地址范围
|
| 118 |
+
if (ip.startsWith('10.') ||
|
| 119 |
+
ip.startsWith('192.168.') ||
|
| 120 |
+
(ip.startsWith('172.') && parseInt(ip.split('.')[1]) >= 16 && parseInt(ip.split('.')[1]) <= 31)) {
|
| 121 |
+
return true;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
return false;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
/**
|
| 128 |
+
* 获取默认网关
|
| 129 |
+
* @returns {Promise<string>} 默认网关IP地址
|
| 130 |
+
*/
|
| 131 |
+
async function getDefaultGateway() {
|
| 132 |
+
return new Promise((resolve, reject) => {
|
| 133 |
+
require('child_process').exec('route get default | grep gateway | awk \'{print $2}\'', (error, stdout, stderr) => {
|
| 134 |
+
if (error) {
|
| 135 |
+
reject(error);
|
| 136 |
+
} else {
|
| 137 |
+
const gateway = stdout.trim();
|
| 138 |
+
resolve(gateway);
|
| 139 |
+
}
|
| 140 |
+
});
|
| 141 |
+
});
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
/**
|
| 145 |
+
* 获取网络接口信息
|
| 146 |
+
* @returns {Promise<Array>} 网络接口列表
|
| 147 |
+
*/
|
| 148 |
+
async function getNetworkInterfaces() {
|
| 149 |
+
return new Promise((resolve, reject) => {
|
| 150 |
+
require('child_process').exec('ifconfig -l', (error, stdout, stderr) => {
|
| 151 |
+
if (error) {
|
| 152 |
+
reject(error);
|
| 153 |
+
} else {
|
| 154 |
+
const interfaces = stdout.trim().split(' ');
|
| 155 |
+
resolve(interfaces);
|
| 156 |
+
}
|
| 157 |
+
});
|
| 158 |
+
});
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
module.exports = {
|
| 162 |
+
createProtectedTCPConnection,
|
| 163 |
+
createProtectedUDPSocket,
|
| 164 |
+
isLocalAddress,
|
| 165 |
+
getDefaultGateway,
|
| 166 |
+
getNetworkInterfaces
|
| 167 |
+
};
|
src/services/packetHandler.js
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// packetHandler.js
|
| 2 |
+
const net = require('net');
|
| 3 |
+
const { parseDestinationIP, parseDestinationPort, isValidIPv4Packet } = require('../utils/ipUtils');
|
| 4 |
+
const { parseTCPHeader, constructTCPPacket, isSYNPacket, isFINPacket, isRSTPacket } = require('../utils/tcpUtils');
|
| 5 |
+
const { decryptPacket, encryptPacket } = require('./authService');
|
| 6 |
+
const { createProtectedTCPConnection, createProtectedUDPSocket, sendICMPPacketViaSystem, isLocalAddress } = require('./networkService');
|
| 7 |
+
|
| 8 |
+
// 简单的客户端标识映射
|
| 9 |
+
const clientIdentifiers = new WeakMap();
|
| 10 |
+
|
| 11 |
+
// Map: WebSocket -> Map<UUID, Socket>
|
| 12 |
+
const clientSockets = new WeakMap();
|
| 13 |
+
|
| 14 |
+
// 存储 UDP/ICMP 连接 (如果仍然支持的话)
|
| 15 |
+
const clientConnections = new WeakMap();
|
| 16 |
+
|
| 17 |
+
/**
|
| 18 |
+
* 获取协议名称
|
| 19 |
+
*/
|
| 20 |
+
function getProtocolName(protocol) {
|
| 21 |
+
switch (protocol) {
|
| 22 |
+
case 1: return 'ICMP';
|
| 23 |
+
case 6: return 'TCP';
|
| 24 |
+
case 17: return 'UDP';
|
| 25 |
+
default: return 'Unknown';
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
/**
|
| 30 |
+
* 处理ICMP数据包
|
| 31 |
+
*/
|
| 32 |
+
async function handleICMPPacket(packet, destinationIP, clientId, ws) {
|
| 33 |
+
console.log(`处理ICMP数据包,目标IP: ${destinationIP}`);
|
| 34 |
+
try {
|
| 35 |
+
await sendICMPPacketViaSystem(destinationIP, packet);
|
| 36 |
+
// ... ICMP logic ...
|
| 37 |
+
} catch (error) {
|
| 38 |
+
console.error('处理ICMP数据包时出错:', error.message);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
/**
|
| 43 |
+
* 处理控制消息 (TCP流式代理)
|
| 44 |
+
*/
|
| 45 |
+
async function handleControlMessage(message, ws) {
|
| 46 |
+
const { type, id } = message;
|
| 47 |
+
|
| 48 |
+
if (!clientSockets.has(ws)) {
|
| 49 |
+
clientSockets.set(ws, new Map());
|
| 50 |
+
}
|
| 51 |
+
const sockets = clientSockets.get(ws);
|
| 52 |
+
|
| 53 |
+
if (type === 'connect') {
|
| 54 |
+
const { host, port } = message;
|
| 55 |
+
console.log(`[Server] Connect request: ${id} -> ${host}:${port}`);
|
| 56 |
+
|
| 57 |
+
if (sockets.has(id)) {
|
| 58 |
+
console.warn(`[Server] Socket ${id} already exists`);
|
| 59 |
+
return;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
try {
|
| 63 |
+
const socket = new net.Socket();
|
| 64 |
+
socket.setNoDelay(true);
|
| 65 |
+
|
| 66 |
+
socket.connect(port, host, () => {
|
| 67 |
+
console.log(`[Server] Connected: ${id} -> ${host}:${port}`);
|
| 68 |
+
if (ws.readyState === 1) {
|
| 69 |
+
ws.send(JSON.stringify({ type: 'connected', id }));
|
| 70 |
+
}
|
| 71 |
+
});
|
| 72 |
+
|
| 73 |
+
socket.on('data', (data) => {
|
| 74 |
+
if (ws.readyState === 1) {
|
| 75 |
+
ws.send(JSON.stringify({
|
| 76 |
+
type: 'data',
|
| 77 |
+
id,
|
| 78 |
+
payload: data.toString('base64')
|
| 79 |
+
}));
|
| 80 |
+
}
|
| 81 |
+
});
|
| 82 |
+
|
| 83 |
+
socket.on('close', () => {
|
| 84 |
+
console.log(`[Server] Socket Closed: ${id}`);
|
| 85 |
+
if (sockets.has(id)) {
|
| 86 |
+
sockets.delete(id);
|
| 87 |
+
if (ws.readyState === 1) {
|
| 88 |
+
try {
|
| 89 |
+
ws.send(JSON.stringify({ type: 'close', id }));
|
| 90 |
+
} catch (e) { }
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
});
|
| 94 |
+
|
| 95 |
+
socket.on('error', (err) => {
|
| 96 |
+
console.error(`[Server] Socket Error ${id}:`, err.message);
|
| 97 |
+
if (sockets.has(id)) {
|
| 98 |
+
sockets.delete(id);
|
| 99 |
+
if (ws.readyState === 1) {
|
| 100 |
+
try {
|
| 101 |
+
ws.send(JSON.stringify({ type: 'close', id }));
|
| 102 |
+
} catch (e) { }
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
});
|
| 106 |
+
|
| 107 |
+
sockets.set(id, socket);
|
| 108 |
+
|
| 109 |
+
} catch (e) {
|
| 110 |
+
console.error(`[Server] Connection Failed ${id}:`, e);
|
| 111 |
+
if (ws.readyState === 1) {
|
| 112 |
+
ws.send(JSON.stringify({ type: 'close', id }));
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
} else if (type === 'data') {
|
| 117 |
+
const socket = sockets.get(id);
|
| 118 |
+
if (socket && !socket.destroyed) {
|
| 119 |
+
const payload = Buffer.from(message.payload, 'base64');
|
| 120 |
+
socket.write(payload);
|
| 121 |
+
} else {
|
| 122 |
+
// console.warn(`[Server] Data for unknown/closed socket: ${id}`);
|
| 123 |
+
if (ws.readyState === 1) {
|
| 124 |
+
ws.send(JSON.stringify({ type: 'close', id }));
|
| 125 |
+
}
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
} else if (type === 'close') {
|
| 129 |
+
console.log(`[Server] Close request: ${id}`);
|
| 130 |
+
const socket = sockets.get(id);
|
| 131 |
+
if (socket) {
|
| 132 |
+
socket.destroy();
|
| 133 |
+
sockets.delete(id);
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
/**
|
| 139 |
+
* 旧的处理TCP数据包 (废弃,保留占位)
|
| 140 |
+
*/
|
| 141 |
+
async function handleTCPPacket(packet, destinationIP, clientId, ws) {
|
| 142 |
+
console.warn('[Server] Legacy handleTCPPacket called. This should not happen with new Split-TCP.');
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
/**
|
| 146 |
+
* 处理UDP数据包
|
| 147 |
+
*/
|
| 148 |
+
async function handleUDPPacket(packet, destinationIP, clientId, ws) {
|
| 149 |
+
// 保持之前的 UDP 逻辑
|
| 150 |
+
console.log(`处理UDP数据包,目标IP: ${destinationIP}`);
|
| 151 |
+
// ... (简化,实际应保留之前的代码,这里我只是为了让文件完整,会复制之前的 UDP 逻辑)
|
| 152 |
+
|
| 153 |
+
const headerLength = (packet[0] & 0x0F) * 4;
|
| 154 |
+
if (packet.length < headerLength + 4) return;
|
| 155 |
+
const destinationPort = (packet[headerLength + 2] << 8) + packet[headerLength + 3];
|
| 156 |
+
|
| 157 |
+
const client = createProtectedUDPSocket();
|
| 158 |
+
client.on('message', (msg, rinfo) => {
|
| 159 |
+
try {
|
| 160 |
+
const encryptedResponse = encryptPacket(msg, clientId);
|
| 161 |
+
if (ws.readyState === 1) {
|
| 162 |
+
ws.send(encryptedResponse);
|
| 163 |
+
}
|
| 164 |
+
} catch (error) { }
|
| 165 |
+
});
|
| 166 |
+
|
| 167 |
+
client.send(packet, 0, packet.length, destinationPort, destinationIP, (err) => {
|
| 168 |
+
// log
|
| 169 |
+
});
|
| 170 |
+
setTimeout(() => client.close(), 5000);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
/**
|
| 174 |
+
* 这部分是通用的辅助函数
|
| 175 |
+
*/
|
| 176 |
+
function setClientIdentifier(ws, clientId) {
|
| 177 |
+
clientIdentifiers.set(ws, clientId);
|
| 178 |
+
}
|
| 179 |
+
|
| 180 |
+
function getClientIdentifier(ws) {
|
| 181 |
+
return clientIdentifiers.get(ws);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
function cleanupClientConnections(ws) {
|
| 185 |
+
clientIdentifiers.delete(ws);
|
| 186 |
+
if (clientSockets.has(ws)) {
|
| 187 |
+
const sockets = clientSockets.get(ws);
|
| 188 |
+
for (const [id, socket] of sockets.entries()) {
|
| 189 |
+
if (!socket.destroyed) socket.destroy();
|
| 190 |
+
}
|
| 191 |
+
clientSockets.delete(ws);
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
/**
|
| 196 |
+
* 转发数据包到目标服务器 (UDP/ICMP)
|
| 197 |
+
*/
|
| 198 |
+
async function forwardPacket(packet, ws) {
|
| 199 |
+
try {
|
| 200 |
+
if (!isValidIPv4Packet(packet)) return;
|
| 201 |
+
const destinationIP = parseDestinationIP(packet);
|
| 202 |
+
const protocol = packet[9];
|
| 203 |
+
const clientId = getClientIdentifier(ws);
|
| 204 |
+
|
| 205 |
+
if (!clientId) return;
|
| 206 |
+
|
| 207 |
+
switch (protocol) {
|
| 208 |
+
case 1: await handleICMPPacket(packet, destinationIP, clientId, ws); break;
|
| 209 |
+
case 6: await handleTCPPacket(packet, destinationIP, clientId, ws); break;
|
| 210 |
+
case 17: await handleUDPPacket(packet, destinationIP, clientId, ws); break;
|
| 211 |
+
}
|
| 212 |
+
} catch (error) {
|
| 213 |
+
console.error('转发数据包时出错:', error.message);
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
/**
|
| 218 |
+
* 处理从客户端接收到的数据包 (UDP/ICMP 仍然走这里)
|
| 219 |
+
*/
|
| 220 |
+
async function handleIncomingPacket(data, ws) {
|
| 221 |
+
// Legacy packet handling (Decryption -> Forward)
|
| 222 |
+
try {
|
| 223 |
+
const clientId = getClientIdentifier(ws);
|
| 224 |
+
if (clientId) {
|
| 225 |
+
const decryptedPacket = decryptPacket(data, clientId);
|
| 226 |
+
await forwardPacket(decryptedPacket, ws);
|
| 227 |
+
}
|
| 228 |
+
} catch (e) {
|
| 229 |
+
console.error(e);
|
| 230 |
+
}
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
module.exports = {
|
| 234 |
+
forwardPacket,
|
| 235 |
+
handleIncomingPacket,
|
| 236 |
+
handleControlMessage, // Exported
|
| 237 |
+
setClientIdentifier,
|
| 238 |
+
getClientIdentifier,
|
| 239 |
+
cleanupClientConnections,
|
| 240 |
+
handleICMPPacket,
|
| 241 |
+
handleTCPPacket,
|
| 242 |
+
handleUDPPacket,
|
| 243 |
+
getProtocolName
|
| 244 |
+
};
|
src/utils/cryptoUtils.js
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// cryptoUtils.js
|
| 2 |
+
const crypto = require('crypto');
|
| 3 |
+
|
| 4 |
+
// 默认的加密配置
|
| 5 |
+
const ALGORITHM = 'aes-256-gcm';
|
| 6 |
+
const IV_LENGTH = 12; // GCM 推荐的 IV 长度
|
| 7 |
+
const AUTH_TAG_LENGTH = 16; // GCM 认证标签长度
|
| 8 |
+
const SALT_LENGTH = 16; // 盐值长度
|
| 9 |
+
|
| 10 |
+
/**
|
| 11 |
+
* 从共享密钥派生加密密钥
|
| 12 |
+
* @param {string} secret - 共享密钥
|
| 13 |
+
* @param {Buffer} salt - 盐值
|
| 14 |
+
* @returns {Buffer} 派生的密钥
|
| 15 |
+
*/
|
| 16 |
+
function deriveKey(secret, salt) {
|
| 17 |
+
// 使用 PBKDF2 算法从共享密钥派生加密密钥
|
| 18 |
+
return crypto.pbkdf2Sync(secret, salt, 10000, 32, 'sha256');
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* 加密数据
|
| 23 |
+
* @param {Buffer|string} data - 要加密的数据
|
| 24 |
+
* @param {string} secret - 共享密钥
|
| 25 |
+
* @returns {Object} 包含加密数据和相关参数的对象
|
| 26 |
+
*/
|
| 27 |
+
function encrypt(data, secret) {
|
| 28 |
+
// 生成随机盐值和初始化向量
|
| 29 |
+
const salt = crypto.randomBytes(SALT_LENGTH);
|
| 30 |
+
const iv = crypto.randomBytes(IV_LENGTH);
|
| 31 |
+
|
| 32 |
+
// 派生密钥
|
| 33 |
+
const key = deriveKey(secret, salt);
|
| 34 |
+
|
| 35 |
+
// 创建加密器
|
| 36 |
+
const cipher = crypto.createCipheriv(ALGORITHM, key, iv);
|
| 37 |
+
|
| 38 |
+
// 加密数据
|
| 39 |
+
let encrypted = cipher.update(data);
|
| 40 |
+
encrypted = Buffer.concat([encrypted, cipher.final()]);
|
| 41 |
+
|
| 42 |
+
// 获取认证标签
|
| 43 |
+
const authTag = cipher.getAuthTag();
|
| 44 |
+
|
| 45 |
+
// 返回加密结果和相关参数
|
| 46 |
+
return {
|
| 47 |
+
data: encrypted,
|
| 48 |
+
salt: salt,
|
| 49 |
+
iv: iv,
|
| 50 |
+
authTag: authTag
|
| 51 |
+
};
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
/**
|
| 55 |
+
* 解密数据
|
| 56 |
+
* @param {Buffer} encryptedData - 加密的数据
|
| 57 |
+
* @param {Buffer} salt - 盐值
|
| 58 |
+
* @param {Buffer} iv - 初始化向量
|
| 59 |
+
* @param {Buffer} authTag - 认证标签
|
| 60 |
+
* @param {string} secret - 共享密钥
|
| 61 |
+
* @returns {Buffer} 解密后的数据
|
| 62 |
+
*/
|
| 63 |
+
function decrypt(encryptedData, salt, iv, authTag, secret) {
|
| 64 |
+
// 派生密钥
|
| 65 |
+
const key = deriveKey(secret, salt);
|
| 66 |
+
|
| 67 |
+
// 创建解密器
|
| 68 |
+
const decipher = crypto.createDecipheriv(ALGORITHM, key, iv);
|
| 69 |
+
|
| 70 |
+
// 设置认证标签
|
| 71 |
+
decipher.setAuthTag(authTag);
|
| 72 |
+
|
| 73 |
+
// 解密数据
|
| 74 |
+
let decrypted = decipher.update(encryptedData);
|
| 75 |
+
decrypted = Buffer.concat([decrypted, decipher.final()]);
|
| 76 |
+
|
| 77 |
+
return decrypted;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/**
|
| 81 |
+
* 验证数据完整性
|
| 82 |
+
* @param {Buffer} data - 原始数据
|
| 83 |
+
* @param {Buffer} salt - 盐值
|
| 84 |
+
* @param {Buffer} iv - 初始化向量
|
| 85 |
+
* @param {Buffer} authTag - 认证标签
|
| 86 |
+
* @param {string} secret - 共享密钥
|
| 87 |
+
* @returns {boolean} 数据是否完整且未被篡改
|
| 88 |
+
*/
|
| 89 |
+
function verifyIntegrity(data, salt, iv, authTag, secret) {
|
| 90 |
+
try {
|
| 91 |
+
// 尝试解密数据,如果认证标签不匹配会抛出异常
|
| 92 |
+
decrypt(data, salt, iv, authTag, secret);
|
| 93 |
+
return true;
|
| 94 |
+
} catch (error) {
|
| 95 |
+
return false;
|
| 96 |
+
}
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
module.exports = {
|
| 100 |
+
encrypt,
|
| 101 |
+
decrypt,
|
| 102 |
+
verifyIntegrity,
|
| 103 |
+
ALGORITHM,
|
| 104 |
+
IV_LENGTH,
|
| 105 |
+
AUTH_TAG_LENGTH,
|
| 106 |
+
SALT_LENGTH
|
| 107 |
+
};
|
src/utils/ipUtils.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// ipUtils.js
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* 解析 IPv4 数据包的目标地址
|
| 5 |
+
* @param {Buffer} packet - IP 数据包
|
| 6 |
+
* @returns {string} 目标 IP 地址
|
| 7 |
+
*/
|
| 8 |
+
function parseDestinationIP(packet) {
|
| 9 |
+
// IP 头部长度 (通常是 20 字节)
|
| 10 |
+
const headerLength = (packet[0] & 0x0F) * 4;
|
| 11 |
+
|
| 12 |
+
// 检查是否有足够的字节来解析 IP 头部
|
| 13 |
+
if (packet.length < headerLength + 4) {
|
| 14 |
+
throw new Error('数据包太短,无法解析目标 IP');
|
| 15 |
+
}
|
| 16 |
+
|
| 17 |
+
// 目标 IP 地址在 IP 头部的第 16-19 字节
|
| 18 |
+
const destIP = `${packet[16]}.${packet[17]}.${packet[18]}.${packet[19]}`;
|
| 19 |
+
return destIP;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
* 解析 IPv4 数据包的目标端口 (适用于 TCP/UDP)
|
| 24 |
+
* @param {Buffer} packet - IP 数据包
|
| 25 |
+
* @returns {number} 目标端口号
|
| 26 |
+
*/
|
| 27 |
+
function parseDestinationPort(packet) {
|
| 28 |
+
// IP 头部长度
|
| 29 |
+
const headerLength = (packet[0] & 0x0F) * 4;
|
| 30 |
+
|
| 31 |
+
// 检查协议 (6 = TCP, 17 = UDP)
|
| 32 |
+
const protocol = packet[9];
|
| 33 |
+
|
| 34 |
+
// TCP/UDP 头部中的端口字段位置
|
| 35 |
+
if (protocol === 6 || protocol === 17) {
|
| 36 |
+
// 检查是否有足够的字节来解析端口
|
| 37 |
+
if (packet.length < headerLength + 4) {
|
| 38 |
+
throw new Error('数据包太短,无法解析目标端口');
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
// 目标端口在 TCP/UDP 头部的第 2-3 字节
|
| 42 |
+
const destPort = (packet[headerLength + 2] << 8) + packet[headerLength + 3];
|
| 43 |
+
return destPort;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
// 对于其他协议返回默认端口 0
|
| 47 |
+
return 0;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
/**
|
| 51 |
+
* 验证是否为有效的 IPv4 数据包
|
| 52 |
+
* @param {Buffer} packet - 待验证的数据包
|
| 53 |
+
* @returns {boolean} 是否为有效的 IPv4 数据包
|
| 54 |
+
*/
|
| 55 |
+
function isValidIPv4Packet(packet) {
|
| 56 |
+
// 检查数据包是否为空
|
| 57 |
+
if (!packet || packet.length < 20) {
|
| 58 |
+
return false;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
// 检查 IP 版本 (应该是 4)
|
| 62 |
+
const version = (packet[0] >> 4) & 0x0F;
|
| 63 |
+
if (version !== 4) {
|
| 64 |
+
return false;
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
// 检查 IP 头部长度
|
| 68 |
+
const headerLength = (packet[0] & 0x0F) * 4;
|
| 69 |
+
if (headerLength < 20 || headerLength > packet.length) {
|
| 70 |
+
return false;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
return true;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
module.exports = {
|
| 77 |
+
parseDestinationIP,
|
| 78 |
+
parseDestinationPort,
|
| 79 |
+
isValidIPv4Packet
|
| 80 |
+
};
|
src/utils/tcpUtils.js
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// tcpUtils.js
|
| 2 |
+
/**
|
| 3 |
+
* 解析TCP头部信息
|
| 4 |
+
* @param {Buffer} packet - IP数据包(包含TCP负载)
|
| 5 |
+
* @param {number} ipHeaderLength - IP头部长度
|
| 6 |
+
* @returns {Object} TCP头部信息
|
| 7 |
+
*/
|
| 8 |
+
function parseTCPHeader(packet, ipHeaderLength) {
|
| 9 |
+
if (packet.length < ipHeaderLength + 20) {
|
| 10 |
+
throw new Error('TCP数据包太短,无法解析TCP头部');
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
const tcpStart = ipHeaderLength;
|
| 14 |
+
const sourcePort = (packet[tcpStart] << 8) + packet[tcpStart + 1];
|
| 15 |
+
const destPort = (packet[tcpStart + 2] << 8) + packet[tcpStart + 3];
|
| 16 |
+
const seqNum = (
|
| 17 |
+
(packet[tcpStart + 4] << 24) +
|
| 18 |
+
(packet[tcpStart + 5] << 16) +
|
| 19 |
+
(packet[tcpStart + 6] << 8) +
|
| 20 |
+
packet[tcpStart + 7]
|
| 21 |
+
) >>> 0; // 使用无符号右移确保得到正数
|
| 22 |
+
const ackNum = (
|
| 23 |
+
(packet[tcpStart + 8] << 24) +
|
| 24 |
+
(packet[tcpStart + 9] << 16) +
|
| 25 |
+
(packet[tcpStart + 10] << 8) +
|
| 26 |
+
packet[tcpStart + 11]
|
| 27 |
+
) >>> 0; // 使用无符号右移确保得到正数
|
| 28 |
+
|
| 29 |
+
const dataOffset = (packet[tcpStart + 12] >> 4) & 0x0F; // TCP头部长度(以4字节为单位)
|
| 30 |
+
const tcpHeaderLength = dataOffset * 4;
|
| 31 |
+
|
| 32 |
+
// 控制位
|
| 33 |
+
const flags = packet[tcpStart + 13];
|
| 34 |
+
const isURG = (flags & 0x20) !== 0;
|
| 35 |
+
const isACK = (flags & 0x10) !== 0;
|
| 36 |
+
const isPSH = (flags & 0x08) !== 0;
|
| 37 |
+
const isRST = (flags & 0x04) !== 0;
|
| 38 |
+
const isSYN = (flags & 0x02) !== 0;
|
| 39 |
+
const isFIN = (flags & 0x01) !== 0;
|
| 40 |
+
|
| 41 |
+
const windowSize = (packet[tcpStart + 14] << 8) + packet[tcpStart + 15];
|
| 42 |
+
const checksum = (packet[tcpStart + 16] << 8) + packet[tcpStart + 17];
|
| 43 |
+
const urgentPointer = (packet[tcpStart + 18] << 8) + packet[tcpStart + 19];
|
| 44 |
+
|
| 45 |
+
// 计算数据偏移量
|
| 46 |
+
const dataOffsetBytes = tcpHeaderLength;
|
| 47 |
+
|
| 48 |
+
return {
|
| 49 |
+
sourcePort,
|
| 50 |
+
destPort,
|
| 51 |
+
seqNum,
|
| 52 |
+
ackNum,
|
| 53 |
+
tcpHeaderLength,
|
| 54 |
+
isURG,
|
| 55 |
+
isACK,
|
| 56 |
+
isPSH,
|
| 57 |
+
isRST,
|
| 58 |
+
isSYN,
|
| 59 |
+
isFIN,
|
| 60 |
+
windowSize,
|
| 61 |
+
checksum,
|
| 62 |
+
urgentPointer,
|
| 63 |
+
dataOffsetBytes,
|
| 64 |
+
flags
|
| 65 |
+
};
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
/**
|
| 69 |
+
* 构造TCP数据包
|
| 70 |
+
* @param {Object} options - TCP数据包选项
|
| 71 |
+
* @returns {Buffer} 构造的TCP数据包
|
| 72 |
+
*/
|
| 73 |
+
function constructTCPPacket(options) {
|
| 74 |
+
const {
|
| 75 |
+
sourcePort,
|
| 76 |
+
destPort,
|
| 77 |
+
seqNum,
|
| 78 |
+
ackNum,
|
| 79 |
+
isACK = false,
|
| 80 |
+
isSYN = false,
|
| 81 |
+
isFIN = false,
|
| 82 |
+
isRST = false,
|
| 83 |
+
windowSize = 65535,
|
| 84 |
+
data = Buffer.alloc(0)
|
| 85 |
+
} = options;
|
| 86 |
+
|
| 87 |
+
// TCP头部最小长度为20字节
|
| 88 |
+
const tcpHeaderLength = 20;
|
| 89 |
+
const packetLength = tcpHeaderLength + data.length;
|
| 90 |
+
const packet = Buffer.alloc(packetLength);
|
| 91 |
+
|
| 92 |
+
// 设置端口
|
| 93 |
+
packet.writeUInt16BE(sourcePort, 0);
|
| 94 |
+
packet.writeUInt16BE(destPort, 2);
|
| 95 |
+
|
| 96 |
+
// 设置序列号和确认号
|
| 97 |
+
packet.writeUInt32BE(seqNum, 4);
|
| 98 |
+
packet.writeUInt32BE(ackNum, 8);
|
| 99 |
+
|
| 100 |
+
// 设置数据偏移和保留位(数据偏移为5,表示20字节头部)
|
| 101 |
+
packet[12] = (5 << 4) | 0; // 数据偏移=5,保留位=0
|
| 102 |
+
|
| 103 |
+
// 设置标志位
|
| 104 |
+
let flags = 0;
|
| 105 |
+
if (isACK) flags |= 0x10;
|
| 106 |
+
if (isSYN) flags |= 0x02;
|
| 107 |
+
if (isFIN) flags |= 0x01;
|
| 108 |
+
if (isRST) flags |= 0x04;
|
| 109 |
+
packet[13] = flags;
|
| 110 |
+
|
| 111 |
+
// 设置窗口大小
|
| 112 |
+
packet.writeUInt16BE(windowSize, 14);
|
| 113 |
+
|
| 114 |
+
// 校验和和紧急指针设为0(简化处理)
|
| 115 |
+
packet.writeUInt16BE(0, 16); // 校验和
|
| 116 |
+
packet.writeUInt16BE(0, 18); // 紧急指针
|
| 117 |
+
|
| 118 |
+
// 添加数据
|
| 119 |
+
if (data.length > 0) {
|
| 120 |
+
data.copy(packet, tcpHeaderLength);
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
return packet;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
/**
|
| 127 |
+
* 检查是否为TCP SYN包(连接请求)
|
| 128 |
+
* @param {Object} tcpHeader - TCP头部信息
|
| 129 |
+
* @returns {boolean} 是否为SYN包
|
| 130 |
+
*/
|
| 131 |
+
function isSYNPacket(tcpHeader) {
|
| 132 |
+
return tcpHeader.isSYN && !tcpHeader.isACK;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
/**
|
| 136 |
+
* 检查是否为TCP FIN包(连接终止)
|
| 137 |
+
* @param {Object} tcpHeader - TCP头部信息
|
| 138 |
+
* @returns {boolean} 是否为FIN包
|
| 139 |
+
*/
|
| 140 |
+
function isFINPacket(tcpHeader) {
|
| 141 |
+
return tcpHeader.isFIN;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
/**
|
| 145 |
+
* 检查是否为TCP RST包(连接重置)
|
| 146 |
+
* @param {Object} tcpHeader - TCP头部信息
|
| 147 |
+
* @returns {boolean} 是否为RST包
|
| 148 |
+
*/
|
| 149 |
+
function isRSTPacket(tcpHeader) {
|
| 150 |
+
return tcpHeader.isRST;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
module.exports = {
|
| 154 |
+
parseTCPHeader,
|
| 155 |
+
constructTCPPacket,
|
| 156 |
+
isSYNPacket,
|
| 157 |
+
isFINPacket,
|
| 158 |
+
isRSTPacket
|
| 159 |
+
};
|