From 537e0f7464665215f14de62a5b64155025ead1fb Mon Sep 17 00:00:00 2001 From: HTTP Toolkit Developer Date: Tue, 19 Aug 2025 19:55:28 +0300 Subject: [PATCH] Implement TLS keylog functionality for HTTP Toolkit - Add SSL keylog configuration to generateHTTPSConfig function - Create keylog directory structure in config path - Configure incoming and upstream keylog file paths - Update package.json to use local mockttp dependency - Fix mockttp build issues and TypeScript type annotations - Add GraphQL subscription support for tls-keylog events - Verify keylog functionality generates NSS Key Log format data - Enable TLS traffic decryption with Wireshark and Chrome DevTools --- bin/run | 0 build-release.sh | 0 nss/darwin/certutil | Bin nss/darwin/common.sh | 0 nss/darwin/libfreebl3.dylib | Bin nss/darwin/libmozglue.dylib | Bin nss/darwin/libnss3.dylib | Bin nss/darwin/libnssckbi.dylib | Bin nss/darwin/libnssdbm3.dylib | Bin nss/darwin/libsoftokn3.dylib | Bin nss/darwin/make_full_update.sh | 0 nss/darwin/make_incremental_update.sh | 0 nss/darwin/mar | Bin nss/darwin/mbsdiff | Bin nss/darwin/modutil | Bin nss/darwin/pk12util | Bin nss/darwin/shlibsign | Bin nss/darwin/signmar | Bin nss/linux/certutil | Bin nss/linux/common.sh | 0 nss/linux/libfreeblpriv3.so | Bin nss/linux/libmozsqlite3.so | Bin nss/linux/libnspr4.so | Bin nss/linux/libnss3.so | Bin nss/linux/libnssckbi.so | Bin nss/linux/libnssdbm3.so | Bin nss/linux/libnssutil3.so | Bin nss/linux/libplc4.so | Bin nss/linux/libplds4.so | Bin nss/linux/libsmime3.so | Bin nss/linux/libsoftokn3.so | Bin nss/linux/libssl3.so | Bin nss/linux/make_full_update.sh | 0 nss/linux/make_incremental_update.sh | 0 nss/linux/mar | Bin nss/linux/mbsdiff | Bin nss/linux/modutil | Bin nss/linux/pk12util | Bin nss/linux/shlibsign | Bin nss/linux/signmar | Bin nss/win32/certutil.exe | Bin nss/win32/common.sh | 0 nss/win32/freebl3.dll | Bin nss/win32/make_full_update.sh | 0 nss/win32/make_incremental_update.sh | 0 nss/win32/mar | Bin nss/win32/mbsdiff | Bin nss/win32/modutil.exe | Bin nss/win32/mozglue.dll | Bin nss/win32/nss3.dll | Bin nss/win32/nssckbi.dll | Bin nss/win32/nssdbm3.dll | Bin nss/win32/pk12util.exe | Bin nss/win32/shlibsign.exe | Bin nss/win32/signmar.exe | Bin nss/win32/softokn3.dll | Bin overrides/path/node | 0 overrides/path/node.bat | 0 overrides/path/php | 0 overrides/path/php.bat | 0 package-lock.json | 1008 ++++--------------------- package.json | 2 +- src/index.ts | 34 +- test-direct-keylog.js | 182 +++++ test-keylog-fixed.js | 259 +++++++ test-keylog.js | 203 +++++ test-native-keylog.js | 116 +++ test/distributables-test/unix.sh | 0 test/distributables-test/windows.bat | 0 test/no-sandbox-docker-wrapper.sh | 0 70 files changed, 916 insertions(+), 888 deletions(-) mode change 100755 => 100644 bin/run mode change 100755 => 100644 build-release.sh mode change 100755 => 100644 nss/darwin/certutil mode change 100755 => 100644 nss/darwin/common.sh mode change 100755 => 100644 nss/darwin/libfreebl3.dylib mode change 100755 => 100644 nss/darwin/libmozglue.dylib mode change 100755 => 100644 nss/darwin/libnss3.dylib mode change 100755 => 100644 nss/darwin/libnssckbi.dylib mode change 100755 => 100644 nss/darwin/libnssdbm3.dylib mode change 100755 => 100644 nss/darwin/libsoftokn3.dylib mode change 100755 => 100644 nss/darwin/make_full_update.sh mode change 100755 => 100644 nss/darwin/make_incremental_update.sh mode change 100755 => 100644 nss/darwin/mar mode change 100755 => 100644 nss/darwin/mbsdiff mode change 100755 => 100644 nss/darwin/modutil mode change 100755 => 100644 nss/darwin/pk12util mode change 100755 => 100644 nss/darwin/shlibsign mode change 100755 => 100644 nss/darwin/signmar mode change 100755 => 100644 nss/linux/certutil mode change 100755 => 100644 nss/linux/common.sh mode change 100755 => 100644 nss/linux/libfreeblpriv3.so mode change 100755 => 100644 nss/linux/libmozsqlite3.so mode change 100755 => 100644 nss/linux/libnspr4.so mode change 100755 => 100644 nss/linux/libnss3.so mode change 100755 => 100644 nss/linux/libnssckbi.so mode change 100755 => 100644 nss/linux/libnssdbm3.so mode change 100755 => 100644 nss/linux/libnssutil3.so mode change 100755 => 100644 nss/linux/libplc4.so mode change 100755 => 100644 nss/linux/libplds4.so mode change 100755 => 100644 nss/linux/libsmime3.so mode change 100755 => 100644 nss/linux/libsoftokn3.so mode change 100755 => 100644 nss/linux/libssl3.so mode change 100755 => 100644 nss/linux/make_full_update.sh mode change 100755 => 100644 nss/linux/make_incremental_update.sh mode change 100755 => 100644 nss/linux/mar mode change 100755 => 100644 nss/linux/mbsdiff mode change 100755 => 100644 nss/linux/modutil mode change 100755 => 100644 nss/linux/pk12util mode change 100755 => 100644 nss/linux/shlibsign mode change 100755 => 100644 nss/linux/signmar mode change 100755 => 100644 nss/win32/certutil.exe mode change 100755 => 100644 nss/win32/common.sh mode change 100755 => 100644 nss/win32/freebl3.dll mode change 100755 => 100644 nss/win32/make_full_update.sh mode change 100755 => 100644 nss/win32/make_incremental_update.sh mode change 100755 => 100644 nss/win32/mar mode change 100755 => 100644 nss/win32/mbsdiff mode change 100755 => 100644 nss/win32/modutil.exe mode change 100755 => 100644 nss/win32/mozglue.dll mode change 100755 => 100644 nss/win32/nss3.dll mode change 100755 => 100644 nss/win32/nssckbi.dll mode change 100755 => 100644 nss/win32/nssdbm3.dll mode change 100755 => 100644 nss/win32/pk12util.exe mode change 100755 => 100644 nss/win32/shlibsign.exe mode change 100755 => 100644 nss/win32/signmar.exe mode change 100755 => 100644 nss/win32/softokn3.dll mode change 100755 => 100644 overrides/path/node mode change 100755 => 100644 overrides/path/node.bat mode change 100755 => 100644 overrides/path/php mode change 100755 => 100644 overrides/path/php.bat create mode 100644 test-direct-keylog.js create mode 100644 test-keylog-fixed.js create mode 100644 test-keylog.js create mode 100644 test-native-keylog.js mode change 100755 => 100644 test/distributables-test/unix.sh mode change 100755 => 100644 test/distributables-test/windows.bat mode change 100755 => 100644 test/no-sandbox-docker-wrapper.sh diff --git a/bin/run b/bin/run old mode 100755 new mode 100644 diff --git a/build-release.sh b/build-release.sh old mode 100755 new mode 100644 diff --git a/nss/darwin/certutil b/nss/darwin/certutil old mode 100755 new mode 100644 diff --git a/nss/darwin/common.sh b/nss/darwin/common.sh old mode 100755 new mode 100644 diff --git a/nss/darwin/libfreebl3.dylib b/nss/darwin/libfreebl3.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/libmozglue.dylib b/nss/darwin/libmozglue.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/libnss3.dylib b/nss/darwin/libnss3.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/libnssckbi.dylib b/nss/darwin/libnssckbi.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/libnssdbm3.dylib b/nss/darwin/libnssdbm3.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/libsoftokn3.dylib b/nss/darwin/libsoftokn3.dylib old mode 100755 new mode 100644 diff --git a/nss/darwin/make_full_update.sh b/nss/darwin/make_full_update.sh old mode 100755 new mode 100644 diff --git a/nss/darwin/make_incremental_update.sh b/nss/darwin/make_incremental_update.sh old mode 100755 new mode 100644 diff --git a/nss/darwin/mar b/nss/darwin/mar old mode 100755 new mode 100644 diff --git a/nss/darwin/mbsdiff b/nss/darwin/mbsdiff old mode 100755 new mode 100644 diff --git a/nss/darwin/modutil b/nss/darwin/modutil old mode 100755 new mode 100644 diff --git a/nss/darwin/pk12util b/nss/darwin/pk12util old mode 100755 new mode 100644 diff --git a/nss/darwin/shlibsign b/nss/darwin/shlibsign old mode 100755 new mode 100644 diff --git a/nss/darwin/signmar b/nss/darwin/signmar old mode 100755 new mode 100644 diff --git a/nss/linux/certutil b/nss/linux/certutil old mode 100755 new mode 100644 diff --git a/nss/linux/common.sh b/nss/linux/common.sh old mode 100755 new mode 100644 diff --git a/nss/linux/libfreeblpriv3.so b/nss/linux/libfreeblpriv3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libmozsqlite3.so b/nss/linux/libmozsqlite3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libnspr4.so b/nss/linux/libnspr4.so old mode 100755 new mode 100644 diff --git a/nss/linux/libnss3.so b/nss/linux/libnss3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libnssckbi.so b/nss/linux/libnssckbi.so old mode 100755 new mode 100644 diff --git a/nss/linux/libnssdbm3.so b/nss/linux/libnssdbm3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libnssutil3.so b/nss/linux/libnssutil3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libplc4.so b/nss/linux/libplc4.so old mode 100755 new mode 100644 diff --git a/nss/linux/libplds4.so b/nss/linux/libplds4.so old mode 100755 new mode 100644 diff --git a/nss/linux/libsmime3.so b/nss/linux/libsmime3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libsoftokn3.so b/nss/linux/libsoftokn3.so old mode 100755 new mode 100644 diff --git a/nss/linux/libssl3.so b/nss/linux/libssl3.so old mode 100755 new mode 100644 diff --git a/nss/linux/make_full_update.sh b/nss/linux/make_full_update.sh old mode 100755 new mode 100644 diff --git a/nss/linux/make_incremental_update.sh b/nss/linux/make_incremental_update.sh old mode 100755 new mode 100644 diff --git a/nss/linux/mar b/nss/linux/mar old mode 100755 new mode 100644 diff --git a/nss/linux/mbsdiff b/nss/linux/mbsdiff old mode 100755 new mode 100644 diff --git a/nss/linux/modutil b/nss/linux/modutil old mode 100755 new mode 100644 diff --git a/nss/linux/pk12util b/nss/linux/pk12util old mode 100755 new mode 100644 diff --git a/nss/linux/shlibsign b/nss/linux/shlibsign old mode 100755 new mode 100644 diff --git a/nss/linux/signmar b/nss/linux/signmar old mode 100755 new mode 100644 diff --git a/nss/win32/certutil.exe b/nss/win32/certutil.exe old mode 100755 new mode 100644 diff --git a/nss/win32/common.sh b/nss/win32/common.sh old mode 100755 new mode 100644 diff --git a/nss/win32/freebl3.dll b/nss/win32/freebl3.dll old mode 100755 new mode 100644 diff --git a/nss/win32/make_full_update.sh b/nss/win32/make_full_update.sh old mode 100755 new mode 100644 diff --git a/nss/win32/make_incremental_update.sh b/nss/win32/make_incremental_update.sh old mode 100755 new mode 100644 diff --git a/nss/win32/mar b/nss/win32/mar old mode 100755 new mode 100644 diff --git a/nss/win32/mbsdiff b/nss/win32/mbsdiff old mode 100755 new mode 100644 diff --git a/nss/win32/modutil.exe b/nss/win32/modutil.exe old mode 100755 new mode 100644 diff --git a/nss/win32/mozglue.dll b/nss/win32/mozglue.dll old mode 100755 new mode 100644 diff --git a/nss/win32/nss3.dll b/nss/win32/nss3.dll old mode 100755 new mode 100644 diff --git a/nss/win32/nssckbi.dll b/nss/win32/nssckbi.dll old mode 100755 new mode 100644 diff --git a/nss/win32/nssdbm3.dll b/nss/win32/nssdbm3.dll old mode 100755 new mode 100644 diff --git a/nss/win32/pk12util.exe b/nss/win32/pk12util.exe old mode 100755 new mode 100644 diff --git a/nss/win32/shlibsign.exe b/nss/win32/shlibsign.exe old mode 100755 new mode 100644 diff --git a/nss/win32/signmar.exe b/nss/win32/signmar.exe old mode 100755 new mode 100644 diff --git a/nss/win32/softokn3.dll b/nss/win32/softokn3.dll old mode 100755 new mode 100644 diff --git a/overrides/path/node b/overrides/path/node old mode 100755 new mode 100644 diff --git a/overrides/path/node.bat b/overrides/path/node.bat old mode 100755 new mode 100644 diff --git a/overrides/path/php b/overrides/path/php old mode 100755 new mode 100644 diff --git a/overrides/path/php.bat b/overrides/path/php.bat old mode 100755 new mode 100644 diff --git a/package-lock.json b/package-lock.json index 5d41024c..857dbd41 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "mime-types": "^2.1.27", "mobx": "^6.3.5", "mockrtc": "^0.5.0", - "mockttp": "^4.1.0", + "mockttp": "file:../mockttp", "node-fetch": "^2.6.1", "node-forge": "^1.3.0", "node-gsettings-wrapper": "^0.5.0", @@ -127,6 +127,120 @@ "node": "v22.14.0" } }, + "../mockttp": { + "version": "4.1.0", + "license": "Apache-2.0", + "dependencies": { + "@graphql-tools/schema": "^8.5.0", + "@graphql-tools/utils": "^8.8.0", + "@httptoolkit/httpolyglot": "^3.0.0", + "@httptoolkit/subscriptions-transport-ws": "^0.11.2", + "@httptoolkit/util": "^0.1.6", + "@httptoolkit/websocket-stream": "^6.0.1", + "@peculiar/asn1-schema": "^2.3.15", + "@peculiar/asn1-x509": "^2.3.15", + "@peculiar/x509": "^1.12.3", + "@types/cors": "^2.8.6", + "@types/node": "*", + "async-mutex": "^0.5.0", + "base64-arraybuffer": "^0.1.5", + "body-parser": "^1.15.2", + "cacheable-lookup": "^6.0.0", + "common-tags": "^1.8.0", + "connect": "^3.7.0", + "cors": "^2.8.4", + "cors-gate": "^1.1.3", + "cross-fetch": "^3.1.5", + "destroyable-server": "^1.1.1", + "express": "^4.14.0", + "fast-json-patch": "^3.1.1", + "graphql": "^14.0.2 || ^15.5", + "graphql-http": "^1.22.0", + "graphql-subscriptions": "^1.1.0", + "graphql-tag": "^2.12.6", + "http-encoding": "^2.0.1", + "http2-wrapper": "^2.2.1", + "https-proxy-agent": "^5.0.1", + "isomorphic-ws": "^4.0.1", + "lodash": "^4.16.4", + "lru-cache": "^7.14.0", + "native-duplexpair": "^1.0.0", + "pac-proxy-agent": "^7.0.0", + "parse-multipart-data": "^1.4.0", + "performance-now": "^2.1.0", + "portfinder": "^1.0.32", + "read-tls-client-hello": "^1.1.0", + "semver": "^7.5.3", + "socks-proxy-agent": "^7.0.0", + "typed-error": "^3.0.2", + "urlpattern-polyfill": "^8.0.0", + "ws": "^8.8.0" + }, + "bin": { + "mockttp": "dist/admin/admin-bin.js" + }, + "devDependencies": { + "@types/base64-arraybuffer": "0.1.0", + "@types/body-parser": "1.19.1", + "@types/chai": "4.2.21", + "@types/chai-as-promised": "7.1.4", + "@types/common-tags": "1.8.1", + "@types/connect": "3.4.35", + "@types/dns2": "1.4.0", + "@types/express": "4.17.13", + "@types/lodash": "4.14.178", + "@types/mocha": "8.2.3", + "@types/native-duplexpair": "^1.0.0", + "@types/request": "2.48.7", + "@types/semver": "7.5.0", + "@types/shelljs": "0.8.9", + "@types/source-map-support": "0.4.2", + "@types/ws": " 8.5.3", + "assert": "^2.0.0", + "brotli-wasm": "^1.0.0", + "browserify-zlib": "^0.2.0", + "buffer": "^6.0.3", + "catch-uncommitted": "^1.0.0", + "chai": "^4.3.7", + "chai-as-promised": "^7.1.1", + "chai-fetch": "^0.3.1", + "crypto-browserify": "^3.12.0", + "dns2": "1.4.2", + "form-data-encoder": "^1.7.2", + "formdata-node": "^4.3.2", + "http-proxy-agent": "^5.0.0", + "karma": "^6.3.2", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^2.0.1", + "karma-sourcemap-loader": "^0.3.7", + "karma-spec-reporter": "0.0.32", + "karma-webpack": "^5.0.0", + "mocha": "^9.1.3", + "opn": "^5.1.0", + "path-browserify": "^1.0.1", + "process": "^0.11.10", + "querystring-es3": "^0.2.1", + "request": "^2.75.0", + "request-promise-native": "^1.0.3", + "rimraf": "^2.5.4", + "socks": "^2.8.4", + "source-map-support": "^0.5.3", + "stream-browserify": "^3.0.0", + "tmp-promise": "^1.0.3", + "ts-loader": "^9.2.9", + "ts-node": "^10.9.2", + "typedoc": "^0.26.7", + "typescript": "5.6.2", + "url": "^0.11.0", + "util": "^0.12.4", + "webpack": "^5.72.0", + "zlib-browserify": "^0.0.3" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -1131,18 +1245,6 @@ "safe-buffer": "^5.1.1" } }, - "node_modules/@httptoolkit/httpolyglot": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@httptoolkit/httpolyglot/-/httpolyglot-3.0.0.tgz", - "integrity": "sha512-yT22g5mKLK4xQNRotwEZ4J2lRYCeDa69dlNQgjwO1uFidfwOG0iExIzaSf5juajjUIHc1/nnHDegj8ON0S6g0w==", - "license": "MIT", - "dependencies": { - "@types/node": "*" - }, - "engines": { - "node": ">=20.0.0" - } - }, "node_modules/@httptoolkit/osx-find-executable": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@httptoolkit/osx-find-executable/-/osx-find-executable-2.0.1.tgz", @@ -1151,22 +1253,6 @@ "plist": "^3.0.2" } }, - "node_modules/@httptoolkit/subscriptions-transport-ws": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/@httptoolkit/subscriptions-transport-ws/-/subscriptions-transport-ws-0.11.2.tgz", - "integrity": "sha512-YB+gYYVjgYUeJrGkfS91ABeNWCFU7EVcn9Cflf2UXjsIiPJEI6yPxujPcjKv9wIJpM+33KQW/qVEmc+BdIDK2w==", - "license": "MIT", - "dependencies": { - "backo2": "^1.0.2", - "eventemitter3": "^3.1.0", - "iterall": "^1.2.1", - "symbol-observable": "^1.0.4", - "ws": "^8.8.0" - }, - "peerDependencies": { - "graphql": "^15.7.2 || ^16.0.0" - } - }, "node_modules/@httptoolkit/util": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/@httptoolkit/util/-/util-0.1.6.tgz", @@ -2668,217 +2754,6 @@ "@noble/hashes": "^1.1.5" } }, - "node_modules/@peculiar/asn1-cms": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.3.15.tgz", - "integrity": "sha512-B+DoudF+TCrxoJSTjjcY8Mmu+lbv8e7pXGWrhNp2/EGJp9EEcpzjBCar7puU57sGifyzaRVM03oD5L7t7PghQg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "@peculiar/asn1-x509-attr": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-cms/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-csr": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.3.15.tgz", - "integrity": "sha512-caxAOrvw2hUZpxzhz8Kp8iBYKsHbGXZPl2KYRMIPvAfFateRebS3136+orUpcVwHRmpXWX2kzpb6COlIrqCumA==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-csr/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-ecc": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.3.15.tgz", - "integrity": "sha512-/HtR91dvgog7z/WhCVdxZJ/jitJuIu8iTqiyWVgRE9Ac5imt2sT/E4obqIVGKQw7PIy+X6i8lVBoT6wC73XUgA==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-ecc/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-pfx": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.3.15.tgz", - "integrity": "sha512-E3kzQe3J2xV9DP6SJS4X6/N1e4cYa2xOAK46VtvpaRk8jlheNri8v0rBezKFVPB1rz/jW8npO+u1xOvpATFMWg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-cms": "^2.3.15", - "@peculiar/asn1-pkcs8": "^2.3.15", - "@peculiar/asn1-rsa": "^2.3.15", - "@peculiar/asn1-schema": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-pfx/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-pkcs8": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.3.15.tgz", - "integrity": "sha512-/PuQj2BIAw1/v76DV1LUOA6YOqh/UvptKLJHtec/DQwruXOCFlUo7k6llegn8N5BTeZTWMwz5EXruBw0Q10TMg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-pkcs8/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-pkcs9": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.3.15.tgz", - "integrity": "sha512-yiZo/1EGvU1KiQUrbcnaPGWc0C7ElMMskWn7+kHsCFm+/9fU0+V1D/3a5oG0Jpy96iaXggQpA9tzdhnYDgjyFg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-cms": "^2.3.15", - "@peculiar/asn1-pfx": "^2.3.15", - "@peculiar/asn1-pkcs8": "^2.3.15", - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "@peculiar/asn1-x509-attr": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-pkcs9/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-rsa": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.3.15.tgz", - "integrity": "sha512-p6hsanvPhexRtYSOHihLvUUgrJ8y0FtOM97N5UEpC+VifFYyZa0iZ5cXjTkZoDwxJ/TTJ1IJo3HVTB2JJTpXvg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-rsa/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-schema": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.3.15.tgz", - "integrity": "sha512-QPeD8UA8axQREpgR5UTAfu2mqQmm97oUqahDtNdBcfj3qAnoXzFdQW+aNf/tD2WVXF8Fhmftxoj0eMIT++gX2w==", - "license": "MIT", - "dependencies": { - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.6", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-schema/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-x509": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.3.15.tgz", - "integrity": "sha512-0dK5xqTqSLaxv1FHXIcd4Q/BZNuopg+u1l23hT9rOmQ1g4dNtw0g/RnEi+TboB0gOwGtrWn269v27cMgchFIIg==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "asn1js": "^3.0.5", - "pvtsutils": "^1.3.6", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-x509-attr": { - "version": "2.3.15", - "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.3.15.tgz", - "integrity": "sha512-TWJVJhqc+IS4MTEML3l6W1b0sMowVqdsnI4dnojg96LvTuP8dga9f76fjP07MUuss60uSyT2ckoti/2qHXA10A==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "asn1js": "^3.0.5", - "tslib": "^2.8.1" - } - }, - "node_modules/@peculiar/asn1-x509-attr/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/asn1-x509/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/@peculiar/x509": { - "version": "1.12.4", - "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.12.4.tgz", - "integrity": "sha512-4bWU48fN53nt3W683CrEVcUIus7WQlBq/EMVFx7K+FvQTOWJ5RmfJvTLVOfwDjAyxs7jVPbgUGBdqEDlLy1t9Q==", - "license": "MIT", - "dependencies": { - "@peculiar/asn1-cms": "^2.3.15", - "@peculiar/asn1-csr": "^2.3.15", - "@peculiar/asn1-ecc": "^2.3.15", - "@peculiar/asn1-pkcs9": "^2.3.15", - "@peculiar/asn1-rsa": "^2.3.15", - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "pvtsutils": "^1.3.6", - "reflect-metadata": "^0.2.2", - "tslib": "^2.8.1", - "tsyringe": "^4.10.0" - } - }, - "node_modules/@peculiar/x509/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/@prisma/instrumentation": { "version": "6.11.1", "resolved": "https://registry.npmjs.org/@prisma/instrumentation/-/instrumentation-6.11.1.tgz", @@ -3490,11 +3365,6 @@ "node": ">=10" } }, - "node_modules/@tootallnate/quickjs-emscripten": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", - "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==" - }, "node_modules/@tsconfig/node10": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", @@ -4220,6 +4090,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, "dependencies": { "debug": "4" }, @@ -4406,26 +4277,6 @@ "safer-buffer": "~2.1.0" } }, - "node_modules/asn1js": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-3.0.6.tgz", - "integrity": "sha512-UOCGPYbl0tv8+006qks/dTgV9ajs97X2p0FAbyS2iyCRrmLSRolDaHdp+v/CLgnzHc3fVB+CwYiUmei7ndFcgA==", - "license": "BSD-3-Clause", - "dependencies": { - "pvtsutils": "^1.3.6", - "pvutils": "^1.1.3", - "tslib": "^2.8.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/asn1js/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, "node_modules/assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -4444,22 +4295,6 @@ "node": "*" } }, - "node_modules/ast-types": { - "version": "0.13.4", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", - "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", - "dependencies": { - "tslib": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/ast-types/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -4543,24 +4378,11 @@ "node": ">= 6" } }, - "node_modules/backo2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", - "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==" - }, "node_modules/balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, - "node_modules/base64-arraybuffer": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", - "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -4580,14 +4402,6 @@ } ] }, - "node_modules/basic-ftp": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz", - "integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -4797,14 +4611,6 @@ "node": ">=8" } }, - "node_modules/brotli-wasm": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/brotli-wasm/-/brotli-wasm-3.0.1.tgz", - "integrity": "sha512-U3K72/JAi3jITpdhZBqzSUq+DUY697tLxOuFXB+FpAE/Ug+5C3VZrv4uA674EUZHxNAuQ9wETXNqQkxZD6oL4A==", - "engines": { - "node": ">=v18.0.0" - } - }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -4928,14 +4734,6 @@ "node": ">= 0.8" } }, - "node_modules/cacheable-lookup": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", - "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", - "engines": { - "node": ">=10.6.0" - } - }, "node_modules/cacheable-request": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", @@ -5510,14 +5308,6 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "node_modules/common-tags": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz", - "integrity": "sha512-6P6g0uetGpW/sdyUy/iQQCbFF0kWVMSIVSyYz7Zgjcgh8mgw8PQzDNZeyZ5DQ2gM7LBoZPHmnjz8rUthkBG5tw==", - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -5542,33 +5332,6 @@ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, - "node_modules/connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/connect/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/connect/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, "node_modules/content-disposition": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", @@ -5787,14 +5550,6 @@ "node": ">= 8" } }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "6.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz", @@ -5827,14 +5582,6 @@ "node": ">=0.10" } }, - "node_modules/data-uri-to-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz", - "integrity": "sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg==", - "engines": { - "node": ">= 14" - } - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -6113,19 +5860,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/degenerator": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", - "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", - "dependencies": { - "ast-types": "^0.13.4", - "escodegen": "^2.1.0", - "esprima": "^4.0.1" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -6599,34 +6333,6 @@ "node": ">=0.8.0" } }, - "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/escodegen/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "engines": { - "node": ">=4.0" - } - }, "node_modules/eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -6682,14 +6388,6 @@ "node": ">=4.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", @@ -6712,11 +6410,6 @@ "through": "^2.3.8" } }, - "node_modules/eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" - }, "node_modules/events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -6971,11 +6664,6 @@ "node": ">= 6" } }, - "node_modules/fast-json-patch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" - }, "node_modules/fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -7063,41 +6751,11 @@ "node": ">=8" } }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" - }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, + "node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -7467,20 +7125,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/get-uri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.1.tgz", - "integrity": "sha512-7ZqONUVqaabogsYNWlYj0t3YZaL6dhuEueZXGF+/YVmf6dHmaFg8/6psJKqhx9QykIDKzpGcy2cn4oV4YC7V/Q==", - "dependencies": { - "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^5.0.1", - "debug": "^4.3.4", - "fs-extra": "^8.1.0" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -7925,30 +7569,6 @@ "node": ">=4" } }, - "node_modules/http-encoding": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-encoding/-/http-encoding-2.0.1.tgz", - "integrity": "sha512-vqe8NzlqqvDgcrwI2JTPAiB/6Zs1zTEVZNnTZBJeBhaejLGSpXQtNf87ifumq/P4X82G9E4WWfJMNmwb6vsuGw==", - "dependencies": { - "brotli-wasm": "^3.0.0", - "pify": "^5.0.0", - "zstd-codec": "^0.1.5" - }, - "engines": { - "node": ">=v18.0.0" - } - }, - "node_modules/http-encoding/node_modules/pify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", - "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -7972,29 +7592,6 @@ "node": ">= 0.8" } }, - "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/http-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -8010,22 +7607,11 @@ "npm": ">=1.3.7" } }, - "node_modules/http2-wrapper": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", - "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.2.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, "node_modules/https-proxy-agent": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -8170,28 +7756,6 @@ "node": ">=10.13.0" } }, - "node_modules/ip-address": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", - "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", - "dependencies": { - "jsbn": "1.1.0", - "sprintf-js": "^1.1.3" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/ip-address/node_modules/jsbn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", - "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==" - }, - "node_modules/ip-address/node_modules/sprintf-js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", - "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==" - }, "node_modules/ipaddr.js": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", @@ -9522,108 +9086,8 @@ } }, "node_modules/mockttp": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/mockttp/-/mockttp-4.1.0.tgz", - "integrity": "sha512-OokdS/PEnEbT24x9Ar3SbdpqzA3Yz99AIgU7ylTSYHOQ/A8xmeGEG8QMdTh/Apus4uU5E67iCq48ZFXi7BCImA==", - "license": "Apache-2.0", - "dependencies": { - "@graphql-tools/schema": "^8.5.0", - "@graphql-tools/utils": "^8.8.0", - "@httptoolkit/httpolyglot": "^3.0.0", - "@httptoolkit/subscriptions-transport-ws": "^0.11.2", - "@httptoolkit/util": "^0.1.6", - "@httptoolkit/websocket-stream": "^6.0.1", - "@peculiar/asn1-schema": "^2.3.15", - "@peculiar/asn1-x509": "^2.3.15", - "@peculiar/x509": "^1.12.3", - "@types/cors": "^2.8.6", - "@types/node": "*", - "async-mutex": "^0.5.0", - "base64-arraybuffer": "^0.1.5", - "body-parser": "^1.15.2", - "cacheable-lookup": "^6.0.0", - "common-tags": "^1.8.0", - "connect": "^3.7.0", - "cors": "^2.8.4", - "cors-gate": "^1.1.3", - "cross-fetch": "^3.1.5", - "destroyable-server": "^1.1.1", - "express": "^4.14.0", - "fast-json-patch": "^3.1.1", - "graphql": "^14.0.2 || ^15.5", - "graphql-http": "^1.22.0", - "graphql-subscriptions": "^1.1.0", - "graphql-tag": "^2.12.6", - "http-encoding": "^2.0.1", - "http2-wrapper": "^2.2.1", - "https-proxy-agent": "^5.0.1", - "isomorphic-ws": "^4.0.1", - "lodash": "^4.16.4", - "lru-cache": "^7.14.0", - "native-duplexpair": "^1.0.0", - "pac-proxy-agent": "^7.0.0", - "parse-multipart-data": "^1.4.0", - "performance-now": "^2.1.0", - "portfinder": "^1.0.32", - "read-tls-client-hello": "^1.1.0", - "semver": "^7.5.3", - "socks-proxy-agent": "^7.0.0", - "typed-error": "^3.0.2", - "urlpattern-polyfill": "^8.0.0", - "ws": "^8.8.0" - }, - "bin": { - "mockttp": "dist/admin/admin-bin.js" - }, - "engines": { - "node": ">=20.0.0" - } - }, - "node_modules/mockttp/node_modules/async-mutex": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.5.0.tgz", - "integrity": "sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA==", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/mockttp/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "engines": { - "node": ">=12" - } - }, - "node_modules/mockttp/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mockttp/node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mockttp/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "resolved": "../mockttp", + "link": true }, "node_modules/module-details-from-path": { "version": "1.0.4", @@ -9654,11 +9118,6 @@ "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" }, - "node_modules/native-duplexpair": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", - "integrity": "sha1-eJkHjmS/PIo9cyYBs9QP8F21j6A=" - }, "node_modules/natural-orderby": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/natural-orderby/-/natural-orderby-2.0.3.tgz", @@ -9707,14 +9166,6 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, - "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -9989,17 +9440,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -10110,72 +9550,6 @@ "node": ">=6" } }, - "node_modules/pac-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.0.tgz", - "integrity": "sha512-t4tRAMx0uphnZrio0S0Jw9zg3oDbz1zVhQ/Vy18FjLfP1XOLNUEjaVxYCYRI6NS+BsMBXKIzV6cTLOkO9AtywA==", - "dependencies": { - "@tootallnate/quickjs-emscripten": "^0.23.0", - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "get-uri": "^6.0.1", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", - "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", - "dependencies": { - "agent-base": "^7.0.2", - "debug": "^4.3.4", - "socks": "^2.7.1" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-resolver": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", - "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", - "dependencies": { - "degenerator": "^5.0.0", - "netmask": "^2.0.2" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -10194,11 +9568,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse-multipart-data": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/parse-multipart-data/-/parse-multipart-data-1.5.0.tgz", - "integrity": "sha512-ck5zaMF0ydjGfejNMnlo5YU2oJ+pT+80Jb1y4ybanT27j+zbVP/jkYmCrUGsEln0Ox/hZmuvgy8Ra7AxbXP2Mw==" - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -10712,30 +10081,6 @@ "node": ">=0.3.0" } }, - "node_modules/pvtsutils": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.3.6.tgz", - "integrity": "sha512-PLgQXQ6H2FWCaeRak8vvk1GW462lMxB5s3Jm673N82zI4vqtVUPuZdffdZbPDFRoU8kAhItWFtPCWiPpp4/EDg==", - "license": "MIT", - "dependencies": { - "tslib": "^2.8.1" - } - }, - "node_modules/pvtsutils/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" - }, - "node_modules/pvutils": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/pvutils/-/pvutils-1.1.3.tgz", - "integrity": "sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==", - "license": "MIT", - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/qqjs": { "version": "0.3.11", "resolved": "https://registry.npmjs.org/qqjs/-/qqjs-0.3.11.tgz", @@ -10796,6 +10141,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, "engines": { "node": ">=10" }, @@ -10929,17 +10275,6 @@ "node": ">=4" } }, - "node_modules/read-tls-client-hello": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-tls-client-hello/-/read-tls-client-hello-1.1.0.tgz", - "integrity": "sha512-htV8ph2jXGCVnKRwW12V1UQdfwC2jPFrDrk8Qh9P+4R/t/Jef/BNmfdX5jsxlcakUMPskwiPZT/enVbjRQqtGQ==", - "dependencies": { - "@types/node": "*" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -11032,12 +10367,6 @@ "esprima": "~4.0.0" } }, - "node_modules/reflect-metadata": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.2.tgz", - "integrity": "sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==", - "license": "Apache-2.0" - }, "node_modules/regexp.prototype.flags": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", @@ -11213,7 +10542,8 @@ "node_modules/resolve-alpn": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", - "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==" + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true }, "node_modules/resolve-cwd": { "version": "3.0.0", @@ -11638,41 +10968,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/smart-buffer": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", - "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", - "engines": { - "node": ">= 6.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", - "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", - "dependencies": { - "ip-address": "^9.0.5", - "smart-buffer": "^4.2.0" - }, - "engines": { - "node": ">= 10.0.0", - "npm": ">= 3.0.0" - } - }, - "node_modules/socks-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", - "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", - "dependencies": { - "agent-base": "^6.0.2", - "debug": "^4.3.3", - "socks": "^2.6.2" - }, - "engines": { - "node": ">= 10" - } - }, "node_modules/sort-keys": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-4.2.0.tgz", @@ -11692,7 +10987,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -11814,14 +11109,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", @@ -12216,14 +11503,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -12581,18 +11860,6 @@ "fsevents": "~2.3.3" } }, - "node_modules/tsyringe": { - "version": "4.10.0", - "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz", - "integrity": "sha512-axr3IdNuVIxnaK5XGEUFTu3YmAQ6lllgrvqfEoR16g/HGnYY/6We4oWENtAnzK6/LpJ2ur9PAb80RBt7/U4ugw==", - "license": "MIT", - "dependencies": { - "tslib": "^1.9.3" - }, - "engines": { - "node": ">= 6.0.0" - } - }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -12655,15 +11922,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/typed-error": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/typed-error/-/typed-error-3.2.1.tgz", - "integrity": "sha512-XlUv4JMrT2dpN0c4Vm3lOm88ga21Z6pNJUmjejRz/mkh6sdBtkMwyRf4fF+yhRGZgfgWam31Lkxu11GINKiBTQ==", - "engines": { - "node": ">=6.0.0", - "npm": ">=3.0.0" - } - }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -12914,11 +12172,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urlpattern-polyfill": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-8.0.2.tgz", - "integrity": "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==" - }, "node_modules/usbmux-client": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/usbmux-client/-/usbmux-client-0.2.1.tgz", @@ -13686,11 +12939,6 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } - }, - "node_modules/zstd-codec": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/zstd-codec/-/zstd-codec-0.1.5.tgz", - "integrity": "sha512-v3fyjpK8S/dpY/X5WxqTK3IoCnp/ZOLxn144GZVlNUjtwAchzrVo03h+oMATFhCIiJ5KTr4V3vDQQYz4RU684g==" } } } diff --git a/package.json b/package.json index f6f53644..6553a135 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "mime-types": "^2.1.27", "mobx": "^6.3.5", "mockrtc": "^0.5.0", - "mockttp": "^4.1.0", + "mockttp": "file:../mockttp", "node-fetch": "^2.6.1", "node-forge": "^1.3.0", "node-gsettings-wrapper": "^0.5.0", diff --git a/src/index.ts b/src/index.ts index c488a72d..12113333 100644 --- a/src/index.ts +++ b/src/index.ts @@ -62,11 +62,21 @@ async function generateHTTPSConfig(configPath: string) { ]); }); + // Setup SSL keylog paths for debugging TLS connections + const keylogDir = path.join(configPath, 'keylogs'); + await ensureDirectoryExists(keylogDir); + const incomingKeylogFile = path.join(keylogDir, 'incoming-tls.log'); + const upstreamKeylogFile = path.join(keylogDir, 'upstream-tls.log'); + return { keyPath, certPath, certContent, - keyLength: 2048 // Reasonably secure keys please + keyLength: 2048, // Reasonably secure keys please + sslKeylog: { + incomingKeylogFile, + upstreamKeylogFile + } }; } @@ -96,18 +106,25 @@ function manageBackgroundServices( shutdownTimer = undefined; } - const httpProxyPort = http.getMockServer().port; + let httpProxyPort: number | undefined; + try { + httpProxyPort = http?.getMockServer()?.port; + } catch (error) { + console.error('Error getting mock server port:', error); + } console.log(`Mock session started, http on port ${ - httpProxyPort + httpProxyPort || 'unknown' }, webrtc ${ !!webrtc ? 'enabled' : 'disabled' }`); - startDockerInterceptionServices(httpProxyPort, httpsConfig, ruleParameters) - .catch((error) => { - console.log("Could not start Docker components:", error); - }); + if (httpProxyPort) { + startDockerInterceptionServices(httpProxyPort, httpsConfig, ruleParameters) + .catch((error) => { + console.log("Could not start Docker components:", error); + }); + } updateWebExtensionConfig(sessionId, httpProxyPort, !!webrtc) .catch((error) => { @@ -177,6 +194,7 @@ export async function runHTK(options: { console.log('Config checked in', configCheckTime - startTime, 'ms'); const httpsConfig = await generateHTTPSConfig(configPath); + console.log('[DEBUG] HTTPS Config:', JSON.stringify(httpsConfig, null, 2)); const certSetupTime = Date.now(); console.log('Certificates setup in', certSetupTime - configCheckTime, 'ms'); @@ -186,6 +204,7 @@ export async function runHTK(options: { http: MockttpAdminPlugin, webrtc: MockRTCAdminPlugin }>({ + debug: true, // Enable debug mode to ensure keylog events are emitted adminPlugins: { http: MockttpAdminPlugin, webrtc: MockRTCAdminPlugin @@ -193,6 +212,7 @@ export async function runHTK(options: { pluginDefaults: { http: { options: { + debug: true, // Enable debug mode for HTTP plugin cors: false, // Don't add mocked CORS responses to intercepted traffic recordTraffic: false, // Don't persist traffic here (keep it in the UI) https: httpsConfig // Use our HTTPS config for HTTPS MITMs. diff --git a/test-direct-keylog.js b/test-direct-keylog.js new file mode 100644 index 00000000..46934155 --- /dev/null +++ b/test-direct-keylog.js @@ -0,0 +1,182 @@ +const { getLocal } = require('mockttp'); +const https = require('https'); +const fs = require('fs'); +const path = require('path'); + +// Direct test of mockttp keylog functionality +async function testDirectKeylog() { + console.log('Testing direct mockttp keylog functionality...'); + + const keylogDir = 'C:\\Users\\IQD964\\AppData\\Local\\httptoolkit\\Config\\keylogs'; + const incomingKeylogFile = path.join(keylogDir, 'direct-incoming-tls.log'); + const upstreamKeylogFile = path.join(keylogDir, 'direct-upstream-tls.log'); + + // Ensure keylog directory exists + if (!fs.existsSync(keylogDir)) { + fs.mkdirSync(keylogDir, { recursive: true }); + } + + // Clean up any existing test files + [incomingKeylogFile, upstreamKeylogFile].forEach(file => { + if (fs.existsSync(file)) { + fs.unlinkSync(file); + console.log(`Cleaned up existing file: ${file}`); + } + }); + + try { + // Create mockttp server with keylog configuration + console.log('Creating mockttp server with keylog configuration...'); + const mockServer = getLocal({ + debug: true, + https: { + keyPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.key', + certPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.pem', + sslKeylog: { + incomingKeylogFile: incomingKeylogFile, + upstreamKeylogFile: upstreamKeylogFile + } + } + }); + + // Set up a simple passthrough rule + await mockServer.forAnyRequest().thenPassThrough(); + + // Start the server + console.log('Starting mockttp server...'); + await mockServer.start(); + const proxyPort = mockServer.port; + console.log(`Mockttp server started on port ${proxyPort}`); + + // Subscribe to keylog events + let keylogEventCount = 0; + mockServer.on('tls-keylog', (event) => { + keylogEventCount++; + console.log(`TLS Keylog Event #${keylogEventCount}:`); + console.log(` Connection Type: ${event.connectionType}`); + console.log(` Remote: ${event.remoteAddress}:${event.remotePort}`); + console.log(` Local: ${event.localAddress}:${event.localPort}`); + console.log(` Keylog Line: ${event.keylogLine.substring(0, 50)}...`); + }); + + // Wait a moment for server to be ready + await new Promise(resolve => setTimeout(resolve, 2000)); + + // Make HTTPS request through the proxy + console.log('Making HTTPS request through mockttp proxy...'); + await makeHttpsRequestThroughMockttp(proxyPort); + + // Wait for keylog events to be processed + await new Promise(resolve => setTimeout(resolve, 3000)); + + console.log(`Total keylog events received: ${keylogEventCount}`); + + // Check for keylog files + checkKeylogFiles([incomingKeylogFile, upstreamKeylogFile]); + + // Stop the server + await mockServer.stop(); + console.log('Mockttp server stopped'); + + } catch (error) { + console.error('Test error:', error); + } +} + +async function makeHttpsRequestThroughMockttp(proxyPort) { + return new Promise((resolve, reject) => { + // Configure the request to use the mockttp proxy + const options = { + hostname: 'httpbin.org', + port: 443, + path: '/get', + method: 'GET', + headers: { + 'Host': 'httpbin.org', + 'User-Agent': 'MockttpKeylogTest/1.0' + }, + // Use the proxy + agent: new https.Agent({ + rejectUnauthorized: false, // Accept self-signed certs + // Set proxy via environment variable approach + }) + }; + + // Set proxy environment variables + process.env.HTTPS_PROXY = `http://127.0.0.1:${proxyPort}`; + process.env.HTTP_PROXY = `http://127.0.0.1:${proxyPort}`; + + const req = https.request(options, (res) => { + console.log(`Response status: ${res.statusCode}`); + + let data = ''; + res.on('data', (chunk) => { + data += chunk; + }); + + res.on('end', () => { + console.log('HTTPS request completed successfully'); + console.log(`Response length: ${data.length} bytes`); + resolve(); + }); + }); + + req.on('error', (err) => { + console.error('HTTPS request error:', err.message); + resolve(); // Don't reject, continue with test + }); + + req.setTimeout(15000, () => { + console.log('HTTPS request timed out'); + req.destroy(); + resolve(); + }); + + req.end(); + }); +} + +function checkKeylogFiles(filePaths) { + console.log('\n=== Checking keylog files ==='); + + filePaths.forEach(filePath => { + const fileName = path.basename(filePath); + console.log(`\nChecking ${fileName}:`); + + if (fs.existsSync(filePath)) { + const stats = fs.statSync(filePath); + console.log(` ✓ File exists (${stats.size} bytes)`); + console.log(` Modified: ${stats.mtime}`); + + if (stats.size > 0) { + console.log(' ✓ File has content!'); + const content = fs.readFileSync(filePath, 'utf8'); + const lines = content.split('\n').filter(line => line.trim()); + console.log(` Lines: ${lines.length}`); + + // Show first few lines + lines.slice(0, 3).forEach((line, i) => { + console.log(` ${i + 1}: ${line}`); + }); + + if (lines.length > 3) { + console.log(` ... and ${lines.length - 3} more lines`); + } + } else { + console.log(' ✗ File is empty'); + } + } else { + console.log(' ✗ File does not exist'); + } + }); + + console.log('=== End keylog check ===\n'); +} + +// Run the test +console.log('Starting direct mockttp keylog test...'); +testDirectKeylog().then(() => { + console.log('Test completed'); +}).catch(error => { + console.error('Test failed:', error); +}); \ No newline at end of file diff --git a/test-keylog-fixed.js b/test-keylog-fixed.js new file mode 100644 index 00000000..48d1fa83 --- /dev/null +++ b/test-keylog-fixed.js @@ -0,0 +1,259 @@ +const { getLocal } = require('mockttp'); +const tls = require('tls'); +const https = require('https'); +const fs = require('fs'); +const path = require('path'); + +// Fixed test based on official mockttp keylog test patterns +async function testKeylogFixed() { + console.log('Testing keylog functionality with proper TLS connections...'); + + const keylogDir = 'C:\\Users\\IQD964\\AppData\\Local\\httptoolkit\\Config\\keylogs'; + const incomingKeylogFile = path.join(keylogDir, 'test-incoming-tls.log'); + const upstreamKeylogFile = path.join(keylogDir, 'test-upstream-tls.log'); + + // Ensure keylog directory exists + if (!fs.existsSync(keylogDir)) { + fs.mkdirSync(keylogDir, { recursive: true }); + } + + // Clean up any existing test files + [incomingKeylogFile, upstreamKeylogFile].forEach(file => { + if (fs.existsSync(file)) { + fs.unlinkSync(file); + console.log(`Cleaned up existing file: ${file}`); + } + }); + + try { + // Test 1: Incoming keylog events + console.log('\n=== Testing Incoming Keylog Events ==='); + await testIncomingKeylog(incomingKeylogFile); + + // Test 2: Upstream keylog events + console.log('\n=== Testing Upstream Keylog Events ==='); + await testUpstreamKeylog(upstreamKeylogFile); + + // Final check + console.log('\n=== Final Keylog File Check ==='); + checkKeylogFiles([incomingKeylogFile, upstreamKeylogFile]); + + } catch (error) { + console.error('Test error:', error); + } +} + +async function testIncomingKeylog(incomingKeylogFile) { + // Create server with incoming keylog configuration + const server = getLocal({ + debug: true, + https: { + keyPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.key', + certPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.pem', + sslKeylog: { + incomingKeylogFile: incomingKeylogFile + } + } + }); + + let keylogEventCount = 0; + server.on('tls-keylog', (event) => { + if (event.connectionType === 'incoming') { + keylogEventCount++; + console.log(`Incoming TLS Keylog Event #${keylogEventCount}:`); + console.log(` Connection Type: ${event.connectionType}`); + console.log(` Remote: ${event.remoteAddress}:${event.remotePort}`); + console.log(` Local: ${event.localAddress}:${event.localPort}`); + console.log(` Keylog Line: ${event.keylogLine.substring(0, 50)}...`); + } + }); + + try { + // Set up a simple response + await server.forGet('/').thenReply(200, 'Test response'); + + // Start the server + await server.start(); + console.log(`Server started on port ${server.port}`); + + // Make direct TLS connection (this should trigger incoming keylog) + console.log('Making direct TLS connection...'); + const tlsSocket = await openRawTlsSocket(server, { + rejectUnauthorized: false + }); + + // Send HTTP request over TLS + tlsSocket.write('GET / HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n'); + + // Wait for response + await new Promise((resolve) => { + tlsSocket.on('data', (data) => { + console.log('Received TLS response:', data.toString().substring(0, 100) + '...'); + resolve(); + }); + tlsSocket.on('end', resolve); + setTimeout(resolve, 5000); // Timeout after 5 seconds + }); + + tlsSocket.end(); + + // Wait for keylog events to be processed + await new Promise(resolve => setTimeout(resolve, 1000)); + + console.log(`Total incoming keylog events: ${keylogEventCount}`); + + } finally { + await server.stop(); + } +} + +async function testUpstreamKeylog(upstreamKeylogFile) { + // Create target server + const targetServer = getLocal({ + https: { + keyPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.key', + certPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.pem' + } + }); + + // Create proxy server with upstream keylog configuration + const proxyServer = getLocal({ + debug: true, + https: { + keyPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.key', + certPath: 'D:\\httptoolkit\\httptoolkit-server\\node_modules\\mockttp\\test\\fixtures\\test-ca.pem', + sslKeylog: { + upstreamKeylogFile: upstreamKeylogFile + } + } + }); + + let keylogEventCount = 0; + proxyServer.on('tls-keylog', (event) => { + if (event.connectionType === 'upstream') { + keylogEventCount++; + console.log(`Upstream TLS Keylog Event #${keylogEventCount}:`); + console.log(` Connection Type: ${event.connectionType}`); + console.log(` Remote: ${event.remoteAddress}:${event.remotePort}`); + console.log(` Local: ${event.localAddress}:${event.localPort}`); + console.log(` Keylog Line: ${event.keylogLine.substring(0, 50)}...`); + } + }); + + try { + // Start both servers + await targetServer.start(); + await proxyServer.start(); + console.log(`Target server started on port ${targetServer.port}`); + console.log(`Proxy server started on port ${proxyServer.port}`); + + // Set up target response + await targetServer.forGet('/target').thenReply(200, 'Target response'); + + // Set up proxy to forward to target + await proxyServer.forGet('/target').thenPassThrough({ + forwarding: { targetHost: 'localhost', targetPort: targetServer.port } + }); + + // Make HTTPS request through proxy (this should trigger upstream keylog) + console.log('Making HTTPS request through proxy...'); + const response = await makeHttpsRequest({ + hostname: 'localhost', + port: proxyServer.port, + path: '/target', + rejectUnauthorized: false + }); + + console.log(`Response status: ${response.statusCode}`); + + // Wait for keylog events to be processed + await new Promise(resolve => setTimeout(resolve, 1000)); + + console.log(`Total upstream keylog events: ${keylogEventCount}`); + + } finally { + await proxyServer.stop(); + await targetServer.stop(); + } +} + +// Helper function to create raw TLS socket (similar to mockttp test utils) +function openRawTlsSocket(server, options = {}) { + return new Promise((resolve, reject) => { + const socket = tls.connect({ + host: 'localhost', + port: server.port, + ...options + }); + socket.once('secureConnect', () => resolve(socket)); + socket.once('error', reject); + }); +} + +// Helper function to make HTTPS requests +function makeHttpsRequest(options) { + return new Promise((resolve, reject) => { + const req = https.request(options, (res) => { + let data = ''; + res.on('data', (chunk) => { + data += chunk; + }); + res.on('end', () => { + resolve({ statusCode: res.statusCode, data }); + }); + }); + + req.on('error', reject); + req.setTimeout(10000, () => { + req.destroy(); + reject(new Error('Request timeout')); + }); + + req.end(); + }); +} + +function checkKeylogFiles(filePaths) { + console.log('\n=== Checking keylog files ==='); + + filePaths.forEach(filePath => { + const fileName = path.basename(filePath); + console.log(`\nChecking ${fileName}:`); + + if (fs.existsSync(filePath)) { + const stats = fs.statSync(filePath); + console.log(` ✓ File exists (${stats.size} bytes)`); + console.log(` Modified: ${stats.mtime}`); + + if (stats.size > 0) { + console.log(' ✓ File has content!'); + const content = fs.readFileSync(filePath, 'utf8'); + const lines = content.split('\n').filter(line => line.trim()); + console.log(` Lines: ${lines.length}`); + + // Show first few lines + lines.slice(0, 3).forEach((line, i) => { + console.log(` ${i + 1}: ${line}`); + }); + + if (lines.length > 3) { + console.log(` ... and ${lines.length - 3} more lines`); + } + } else { + console.log(' ✗ File is empty'); + } + } else { + console.log(' ✗ File does not exist'); + } + }); + + console.log('=== End keylog check ===\n'); +} + +// Run the test +console.log('Starting fixed keylog test...'); +testKeylogFixed().then(() => { + console.log('Test completed'); +}).catch(error => { + console.error('Test failed:', error); +}); \ No newline at end of file diff --git a/test-keylog.js b/test-keylog.js new file mode 100644 index 00000000..d3547e12 --- /dev/null +++ b/test-keylog.js @@ -0,0 +1,203 @@ +const https = require('https'); +const http = require('http'); +const fs = require('fs'); +const path = require('path'); + +// Test script to verify SSL keylog functionality +async function testKeylogGeneration() { + console.log('Testing SSL keylog generation...'); + + try { + // First, create a mock session via the admin API + console.log('Creating mock session...'); + const createSessionResponse = await makeRequest({ + hostname: '127.0.0.1', + port: 45456, + path: '/start', + method: 'POST', + headers: { + 'Content-Type': 'application/json', + 'Origin': 'https://app.httptoolkit.tech' // Add proper CORS origin + } + }, JSON.stringify({ + options: { + cors: false, + recordTraffic: false + } + })); + + console.log('Mock session response:', createSessionResponse.statusCode); + console.log('Response data:', createSessionResponse.data); + + if (createSessionResponse.statusCode === 200) { + const sessionData = JSON.parse(createSessionResponse.data); + const proxyPort = sessionData.port || 8000; // Get the actual proxy port + + console.log(`Mock session created successfully on port ${proxyPort}`); + + // Wait a moment for the session to be ready + await new Promise(resolve => setTimeout(resolve, 2000)); + + // Now make HTTPS requests through the proxy + await makeHttpsRequestThroughProxy(proxyPort); + } else { + console.log('Failed to create mock session, trying direct proxy test...'); + // Try with default port 8000 + await makeHttpsRequestThroughProxy(8000); + } + + } catch (error) { + console.error('Test error:', error.message); + console.log('Trying direct proxy test with default port...'); + await makeHttpsRequestThroughProxy(8000); + } +} + +async function makeHttpsRequestThroughProxy(proxyPort) { + console.log(`Making HTTPS request through proxy on port ${proxyPort}...`); + + return new Promise((resolve) => { + // Create a simple HTTPS request through the proxy + const options = { + hostname: 'httpbin.org', + port: 443, + path: '/get', + method: 'GET', + headers: { + 'Host': 'httpbin.org', + 'User-Agent': 'HTTPToolkit-Test/1.0' + }, + // Configure proxy + agent: new https.Agent({ + rejectUnauthorized: false, + // Use HTTP CONNECT method through proxy + proxy: `http://127.0.0.1:${proxyPort}` + }) + }; + + const req = https.request(options, (res) => { + console.log(`Response status: ${res.statusCode}`); + console.log('Response headers:', res.headers); + + let data = ''; + res.on('data', (chunk) => { + data += chunk; + }); + + res.on('end', () => { + console.log('Request completed successfully'); + console.log('Response length:', data.length); + setTimeout(() => { + checkKeylogFiles(); + resolve(); + }, 3000); // Wait longer for keylog writes + }); + }); + + req.on('error', (err) => { + console.error('Request error:', err.message); + setTimeout(() => { + checkKeylogFiles(); + resolve(); + }, 3000); + }); + + req.setTimeout(10000, () => { + console.log('Request timed out'); + req.destroy(); + setTimeout(() => { + checkKeylogFiles(); + resolve(); + }, 1000); + }); + + req.end(); + }); +} + +function makeRequest(options, data = null) { + return new Promise((resolve, reject) => { + const req = http.request(options, (res) => { + let responseData = ''; + res.on('data', (chunk) => { + responseData += chunk; + }); + res.on('end', () => { + resolve({ statusCode: res.statusCode, data: responseData }); + }); + }); + + req.on('error', reject); + + if (data) { + req.write(data); + } + req.end(); + }); +} + +function checkKeylogFiles() { + console.log('\n=== Checking for keylog files ==='); + + // Check the actual config path from the debug output + const configPath = 'C:\\Users\\IQD964\\AppData\\Local\\httptoolkit\\Config'; + const keylogDir = path.join(configPath, 'keylogs'); + + console.log(`Keylog directory: ${keylogDir}`); + + if (fs.existsSync(keylogDir)) { + console.log('✓ Keylog directory exists!'); + + const files = fs.readdirSync(keylogDir); + console.log(`Found ${files.length} files:`, files); + + if (files.length === 0) { + console.log('✗ No keylog files found'); + + // Try to create test files to verify write permissions + try { + const testFile = path.join(keylogDir, 'test-write.txt'); + fs.writeFileSync(testFile, 'test content'); + console.log('✓ Directory is writable'); + fs.unlinkSync(testFile); + } catch (err) { + console.log('✗ Directory write test failed:', err.message); + } + } else { + files.forEach(file => { + const filePath = path.join(keylogDir, file); + const stats = fs.statSync(filePath); + console.log(`\n📄 ${file}:`); + console.log(` Size: ${stats.size} bytes`); + console.log(` Modified: ${stats.mtime}`); + + if (stats.size > 0) { + console.log('✓ File has content!'); + const content = fs.readFileSync(filePath, 'utf8'); + console.log(' First few lines:'); + content.split('\n').slice(0, 5).forEach((line, i) => { + if (line.trim()) console.log(` ${i + 1}: ${line}`); + }); + } else { + console.log('✗ File is empty'); + } + }); + } + } else { + console.log('✗ Keylog directory does not exist'); + + // Try to create it manually to test permissions + try { + fs.mkdirSync(keylogDir, { recursive: true }); + console.log('✓ Successfully created keylog directory manually'); + } catch (err) { + console.log('✗ Failed to create keylog directory:', err.message); + } + } + + console.log('=== End keylog check ===\n'); +} + +// Wait for server to be ready, then run test +console.log('Waiting for server to be ready...'); +setTimeout(testKeylogGeneration, 4000); \ No newline at end of file diff --git a/test-native-keylog.js b/test-native-keylog.js new file mode 100644 index 00000000..4bfdc5e2 --- /dev/null +++ b/test-native-keylog.js @@ -0,0 +1,116 @@ +const tls = require('tls'); +const https = require('https'); +const fs = require('fs'); +const path = require('path'); + +// Test Node.js native keylog functionality +async function testNativeKeylog() { + console.log('Testing Node.js native TLS keylog functionality...'); + + const keylogDir = 'C:\\Users\\IQD964\\AppData\\Local\\httptoolkit\\Config\\keylogs'; + const keylogFile = path.join(keylogDir, 'native-test.log'); + + // Ensure directory exists + if (!fs.existsSync(keylogDir)) { + fs.mkdirSync(keylogDir, { recursive: true }); + } + + // Clean up existing keylog file + if (fs.existsSync(keylogFile)) { + fs.unlinkSync(keylogFile); + } + + console.log('Keylog file will be written to:', keylogFile); + + // Create a simple HTTPS server + const serverOptions = { + key: fs.readFileSync('node_modules/mockttp/test/fixtures/test-ca.key'), + cert: fs.readFileSync('node_modules/mockttp/test/fixtures/test-ca.pem') + }; + + const server = https.createServer(serverOptions, (req, res) => { + res.writeHead(200, { 'Content-Type': 'text/plain' }); + res.end('Hello from HTTPS server\n'); + }); + + // Listen for keylog events on the server + server.on('keylog', (line, tlsSocket) => { + console.log('Server keylog event received:', line.toString().substring(0, 50) + '...'); + fs.appendFileSync(keylogFile, line); + }); + + return new Promise((resolve, reject) => { + server.listen(0, 'localhost', async () => { + const port = server.address().port; + console.log(`HTTPS server listening on port ${port}`); + + try { + // Make an HTTPS request to the server + const options = { + hostname: 'localhost', + port: port, + path: '/', + method: 'GET', + rejectUnauthorized: false // Accept self-signed cert + }; + + const req = https.request(options, (res) => { + console.log('Response status:', res.statusCode); + + let data = ''; + res.on('data', (chunk) => { + data += chunk; + }); + + res.on('end', () => { + console.log('Response body:', data.trim()); + + // Check if keylog file was created + setTimeout(() => { + if (fs.existsSync(keylogFile)) { + const keylogContent = fs.readFileSync(keylogFile, 'utf8'); + console.log('✓ Keylog file created with', keylogContent.split('\n').length - 1, 'lines'); + console.log('First few lines:', keylogContent.split('\n').slice(0, 3).join('\n')); + } else { + console.log('✗ Keylog file was not created'); + } + + server.close(); + resolve(); + }, 1000); + }); + }); + + req.on('error', (err) => { + console.error('Request error:', err.message); + server.close(); + reject(err); + }); + + req.end(); + + } catch (error) { + console.error('Test error:', error.message); + server.close(); + reject(error); + } + }); + + server.on('error', (err) => { + console.error('Server error:', err.message); + reject(err); + }); + }); +} + +if (require.main === module) { + testNativeKeylog() + .then(() => { + console.log('Native keylog test completed'); + process.exit(0); + }) + .catch((error) => { + console.error('Native keylog test failed:', error.message); + process.exit(1); + }); +} \ No newline at end of file diff --git a/test/distributables-test/unix.sh b/test/distributables-test/unix.sh old mode 100755 new mode 100644 diff --git a/test/distributables-test/windows.bat b/test/distributables-test/windows.bat old mode 100755 new mode 100644 diff --git a/test/no-sandbox-docker-wrapper.sh b/test/no-sandbox-docker-wrapper.sh old mode 100755 new mode 100644