opendht 4.4.100 → 4.4.102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -69
- package/examples/dhtnode.js +1 -1
- package/examples/dhtnode.ts +1 -1
- package/index.d.ts +17 -1
- package/index.js +103 -3
- package/package.json +2 -2
- package/prebuilds/darwin-arm64/libcrypto.3.dylib +0 -0
- package/prebuilds/darwin-arm64/libllhttp.9.4.3.dylib +0 -0
- package/prebuilds/darwin-arm64/libopendht.4.4.99.dylib +0 -0
- package/prebuilds/darwin-arm64/libssl.3.dylib +0 -0
- package/prebuilds/darwin-arm64/licenses/llhttp-LICENSE-MIT.txt +22 -0
- package/prebuilds/darwin-arm64/licenses/llhttp-LICENSE.txt +22 -0
- package/prebuilds/darwin-arm64/licenses/openssl@3-LICENSE.txt.txt +177 -0
- package/prebuilds/darwin-arm64/manifest.json +3 -0
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/prebuilds/darwin-x64/libcrypto.3.dylib +0 -0
- package/prebuilds/darwin-x64/libllhttp.9.4.3.dylib +0 -0
- package/prebuilds/darwin-x64/libopendht.4.4.99.dylib +0 -0
- package/prebuilds/darwin-x64/libssl.3.dylib +0 -0
- package/prebuilds/darwin-x64/licenses/llhttp-LICENSE-MIT.txt +22 -0
- package/prebuilds/darwin-x64/licenses/llhttp-LICENSE.txt +22 -0
- package/prebuilds/darwin-x64/licenses/openssl@3-LICENSE.txt.txt +177 -0
- package/prebuilds/darwin-x64/manifest.json +3 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-x64/libcrypto.so.3 +0 -0
- package/prebuilds/linux-x64/libllhttp.so.9.2 +0 -0
- package/prebuilds/linux-x64/libopendht.so.4 +0 -0
- package/prebuilds/linux-x64/libssl.so.3 +0 -0
- package/prebuilds/linux-x64/licenses/libssl3t64-copyright.txt +70 -0
- package/prebuilds/linux-x64/licenses/llhttp-llhttp-LICENSE-MIT.txt +22 -0
- package/prebuilds/linux-x64/manifest.json +3 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/win32-x64/argon2.dll +0 -0
- package/prebuilds/win32-x64/fmt.dll +0 -0
- package/prebuilds/win32-x64/gmp-10.dll +0 -0
- package/prebuilds/win32-x64/gnutls.dll +0 -0
- package/prebuilds/win32-x64/hogweed-7.dll +0 -0
- package/prebuilds/win32-x64/jsoncpp.dll +0 -0
- package/prebuilds/win32-x64/libcrypto-3-x64.dll +0 -0
- package/prebuilds/win32-x64/libssl-3-x64.dll +0 -0
- package/prebuilds/win32-x64/manifest.json +2 -0
- package/prebuilds/win32-x64/nettle-9.dll +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/prebuilds/win32-x64/opendht.dll +0 -0
- package/prebuilds/win32-x64/simdutf.dll +0 -0
- package/prebuilds/win32-x64/tasn1-6.dll +0 -0
package/README.md
CHANGED
|
@@ -12,7 +12,8 @@ npm install opendht
|
|
|
12
12
|
## Build
|
|
13
13
|
|
|
14
14
|
Install the native dependencies described in [BUILD.md](../BUILD.md), plus Node.js,
|
|
15
|
-
a C++17 compiler, and CMake 3.21 or later. Ninja is optional.
|
|
15
|
+
a C++17 compiler, and CMake 3.21 or later. Ninja is optional. Proxy-client support
|
|
16
|
+
defaults to enabled and requires ASIO, llhttp, RESTinio, and expected-lite headers.
|
|
16
17
|
|
|
17
18
|
```sh
|
|
18
19
|
cd nodejs
|
|
@@ -31,43 +32,16 @@ Native CMake options can be passed through, for example:
|
|
|
31
32
|
npm run build -- --CDOPENDHT_PEER_DISCOVERY=ON
|
|
32
33
|
```
|
|
33
34
|
|
|
35
|
+
For an existing build, change cached options directly with CMake, for example
|
|
36
|
+
`cmake -S . -B build -DOPENDHT_PROXY_CLIENT=ON`, then rebuild. A custom build can
|
|
37
|
+
disable proxy support with `-DOPENDHT_PROXY_CLIENT=OFF`; requesting a proxy then
|
|
38
|
+
throws an explicit unsupported-build error.
|
|
39
|
+
|
|
34
40
|
The loader checks local builds, then compatible Node-API binaries under `prebuilds/`.
|
|
35
41
|
Set `OPENDHT_NODE_BINDING` to an absolute addon path to select an explicit build.
|
|
36
42
|
Packaged binaries include OpenDHT and non-system native dependencies, so archive
|
|
37
43
|
installation does not require a compiler or a system OpenDHT installation.
|
|
38
44
|
|
|
39
|
-
## Example Tool
|
|
40
|
-
|
|
41
|
-
After building, start the TypeScript example from the repository root:
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
npm --prefix nodejs run dhtnode -- --port 4222 --bootstrap bootstrap.jami.net
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
The source is [examples/dhtnode.ts](examples/dhtnode.ts). `npm run build` compiles
|
|
48
|
-
it to JavaScript; run `npm run build:examples` after editing just the example.
|
|
49
|
-
Bootstrap is optional;
|
|
50
|
-
`--bootstrap-port` selects its UDP port. Use `--port 0` for a free local port.
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
listen greeting
|
|
54
|
-
put greeting hello world
|
|
55
|
-
get greeting
|
|
56
|
-
sign greeting signed hello
|
|
57
|
-
cancel greeting
|
|
58
|
-
quit
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Keys are text labels, hashed automatically; values are UTF-8 text. The tool
|
|
62
|
-
generates a fresh EC identity on each run and prints IPv4/IPv6 connectivity
|
|
63
|
-
changes. Operations run concurrently, leaving the prompt responsive; dependent
|
|
64
|
-
commands should be entered after their preceding operation completes. EOF waits
|
|
65
|
-
for pending operations, then cancels listeners and closes the runner. Ctrl-C,
|
|
66
|
-
SIGTERM, and `quit` close immediately, rejecting pending operations without
|
|
67
|
-
printing cancellation errors. `--help` lists all options. Archives include both
|
|
68
|
-
the TypeScript source and compiled `examples/dhtnode.js`, runnable without
|
|
69
|
-
TypeScript or development dependencies, including from inside `node_modules`.
|
|
70
|
-
|
|
71
45
|
## Usage
|
|
72
46
|
|
|
73
47
|
```js
|
|
@@ -84,7 +58,7 @@ async function main() {
|
|
|
84
58
|
const key = hash('example');
|
|
85
59
|
const stored = await writer.put(key, Buffer.from('hello'), { id: 42n });
|
|
86
60
|
if (!stored) throw new Error('DHT put failed');
|
|
87
|
-
for (const value of
|
|
61
|
+
for await (const value of reader.get(key)) {
|
|
88
62
|
console.log(value.id, value.data.toString());
|
|
89
63
|
}
|
|
90
64
|
} finally {
|
|
@@ -103,6 +77,7 @@ main().catch(console.error);
|
|
|
103
77
|
- `run({port, ipv4, ipv6, network, persistPath, identity})` starts a threaded node. Port 0
|
|
104
78
|
selects a free port. The defaults bind both IP families on all interfaces.
|
|
105
79
|
`persistPath` is optional; use an empty string to disable persistence.
|
|
80
|
+
`proxyServer` and `proxyUserAgent` configure proxy mode (see below).
|
|
106
81
|
- `getBoundPort(4 | 6)` defaults to IPv4; `getNodeId()` returns the node's hex ID.
|
|
107
82
|
- `getStatus()` returns the latest JS-dispatched `{ipv4, ipv6}` connectivity
|
|
108
83
|
snapshot. Each family is `'disconnected'`, `'connecting'`, or `'connected'`.
|
|
@@ -113,12 +88,16 @@ main().catch(console.error);
|
|
|
113
88
|
peer is connected; subsequent DHT operations report their own completion.
|
|
114
89
|
- `put(key, Uint8Array, {id, type, userType, permanent})` copies the input and
|
|
115
90
|
resolves to the native success boolean. IDs are unsigned 64-bit `bigint` values.
|
|
116
|
-
- `get(key)`
|
|
91
|
+
- `get(key)` returns an async iterator of values as they arrive. The iterator
|
|
92
|
+
ends when the lookup completes, or rejects with `ERR_DHT_GET_FAILED` on failure.
|
|
93
|
+
`getAll(key)` returns a single promise resolving to the complete value array.
|
|
117
94
|
Values contain `id`, `type`, `seq`, `userType`, copied `Buffer` data, `isSigned`,
|
|
118
95
|
`isEncrypted`, and an `owner` long fingerprint (or null for unsigned values).
|
|
119
96
|
- `listen(key, (value, expired) => {})` returns a listener with idempotent
|
|
120
97
|
`cancel()`. Queued deliveries are suppressed after cancellation. Callback
|
|
121
98
|
return values are ignored; callbacks may cancel or close the runner.
|
|
99
|
+
- `listen(key)` without a callback returns an async iterator of `{value, expired}`
|
|
100
|
+
events. It continues until cancelled or the runner closes.
|
|
122
101
|
- `close()` is idempotent and returns the same promise on repeated calls. It
|
|
123
102
|
waits off the JS thread for graceful shutdown, then joins the native threads.
|
|
124
103
|
After two seconds it forces the join if graceful shutdown has not completed.
|
|
@@ -133,8 +112,47 @@ Pending operations, active listeners, and registered status handlers keep their
|
|
|
133
112
|
runner alive until completion, cancellation, handler removal, or explicit close.
|
|
134
113
|
Graceful persistence cannot be guaranteed if the process is killed.
|
|
135
114
|
|
|
136
|
-
The binding does not cap the callback queue
|
|
137
|
-
|
|
115
|
+
The binding does not cap the callback queue, accumulated `getAll()` results, or
|
|
116
|
+
iterator buffers. Slow iterator consumers can accumulate values without
|
|
117
|
+
backpressure. Queued callbacks retain their native values until delivery or cleanup.
|
|
118
|
+
|
|
119
|
+
## Async Iteration
|
|
120
|
+
|
|
121
|
+
`get()` and callback-free `listen()` start immediately and return iterators with
|
|
122
|
+
`next()`, `return()`, `throw()`, `cancel()`, and `Symbol.asyncDispose`.
|
|
123
|
+
Leaving a `for await` loop with `break` or an exception cancels the subscription.
|
|
124
|
+
Explicit cancellation discards buffered values and settles pending reads as done.
|
|
125
|
+
Closing the runner rejects active get iterators with `ERR_DHT_CLOSED`; listener
|
|
126
|
+
iterators end normally. Successful get completion preserves unread buffered values.
|
|
127
|
+
|
|
128
|
+
```js
|
|
129
|
+
for await (const value of runner.get(hash('example'))) {
|
|
130
|
+
console.log(value.id, value.data);
|
|
131
|
+
}
|
|
132
|
+
const snapshots = await runner.getAll(hash('example'));
|
|
133
|
+
|
|
134
|
+
for await (const { value, expired } of runner.listen(hash('updates'))) {
|
|
135
|
+
console.log(value.id, expired);
|
|
136
|
+
if (expired) break;
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Proxy Configuration
|
|
141
|
+
|
|
142
|
+
Pass the URL of an OpenDHT HTTP(S) proxy at startup:
|
|
143
|
+
|
|
144
|
+
```js
|
|
145
|
+
runner.run({
|
|
146
|
+
proxyServer: 'https://proxy.example.com',
|
|
147
|
+
proxyUserAgent: 'my-app/1.0',
|
|
148
|
+
});
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
This selects the native OpenDHT proxy client, not an HTTP CONNECT or SOCKS proxy.
|
|
152
|
+
The node does not bind UDP sockets in this mode; `port`, `ipv4`, `ipv6`, and
|
|
153
|
+
`bootstrap()` are for direct DHT nodes. Omit `proxyServer` or use an empty string
|
|
154
|
+
for direct networking. Proxy settings are startup-only; create a new runner to
|
|
155
|
+
change transports or servers. Packaged binaries include proxy-client support.
|
|
138
156
|
|
|
139
157
|
## Crypto
|
|
140
158
|
|
|
@@ -213,13 +231,6 @@ The [Node.js package workflow](../.github/workflows/nodejs-package.yml) builds:
|
|
|
213
231
|
| macOS ARM64 and x64 | macOS 15 |
|
|
214
232
|
| Windows x64 | Windows Server 2022 / MSVC |
|
|
215
233
|
|
|
216
|
-
The Linux build uses `ghcr.io/savoirfairelinux/opendht/opendht-deps-noble`,
|
|
217
|
-
built from [the Noble Dockerfile](../docker/DockerfileDepsNoble), restored from
|
|
218
|
-
the Ubuntu 24.04 recipe in git history. The release workflow publishes this
|
|
219
|
-
multi-architecture image alongside the other Docker images. Node builds use its
|
|
220
|
-
published `latest` tag. simdutf is linked statically because Ubuntu 24.04 does not
|
|
221
|
-
provide its development package.
|
|
222
|
-
|
|
223
234
|
CI combines platform prebuilds into one npm archive and verifies that archive on
|
|
224
235
|
Node 22, 24, and 26 on each platform, including Ubuntu 24.04 and 26.04. Branch
|
|
225
236
|
pushes, pull requests, and manual runs build and test without publishing.
|
|
@@ -228,28 +239,5 @@ does not remove OS/libc or native dependency compatibility requirements. Review
|
|
|
228
239
|
the included dependency licenses and source-distribution obligations before
|
|
229
240
|
redistributing binaries.
|
|
230
241
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
Pushing a `v*` tag starts [the release workflow](../.github/workflows/release-package.yml),
|
|
234
|
-
which calls the Node.js package workflow. The npm archive version is taken from
|
|
235
|
-
the tag without its leading `v`, for example `v4.4.99` becomes `opendht@4.4.99`.
|
|
236
|
-
After all Node install tests and Windows builds pass, the release workflow attaches
|
|
237
|
-
the verified npm archive alongside the Windows assets to the draft GitHub Release,
|
|
238
|
-
then publishes that same archive to npm with provenance. Stable versions use the
|
|
239
|
-
`latest` dist-tag; prerelease versions such as `v4.5.0-rc.1` use `next`.
|
|
240
|
-
Publishing to npm happens on the tag push, not when the GitHub draft is published.
|
|
241
|
-
Published npm versions cannot be overwritten; use a new version tag for changes.
|
|
242
|
-
|
|
243
|
-
Configure an npm trusted publisher for the `opendht` package with GitHub owner
|
|
244
|
-
`savoirfairelinux`, repository `opendht`, and workflow filename `release-package.yml`
|
|
245
|
-
(not `nodejs-package.yml`). Allow direct `npm publish`. Publication runs on a
|
|
246
|
-
GitHub-hosted runner with OIDC, so no npm token is needed once this is configured.
|
|
247
|
-
|
|
248
|
-
For the first publication, before the npm package exists, set the repository's
|
|
249
|
-
`NPM_TOKEN` secret to a granular npm token with publishing permission and 2FA
|
|
250
|
-
bypass. After the first successful tag release, configure the trusted publisher
|
|
251
|
-
in the npm package settings, then remove `NPM_TOKEN`. The publishing job supports
|
|
252
|
-
the token for this bootstrap and prefers OIDC when available.
|
|
253
|
-
|
|
254
|
-
Query filters, async iterators, AbortSignal support, certificate trust-store
|
|
255
|
-
validation, CA issuance controls, and proxy controls remain future work.
|
|
242
|
+
Query filters, AbortSignal support, certificate trust-store validation, CA
|
|
243
|
+
issuance controls, and runtime proxy switching remain future work.
|
package/examples/dhtnode.js
CHANGED
|
@@ -89,7 +89,7 @@ Keys are text labels hashed with SHA-1. Values are UTF-8 text.`);
|
|
|
89
89
|
const location = hash(key);
|
|
90
90
|
switch (command) {
|
|
91
91
|
case 'get': {
|
|
92
|
-
const found = await runner.
|
|
92
|
+
const found = await runner.getAll(location);
|
|
93
93
|
if (closing)
|
|
94
94
|
return;
|
|
95
95
|
for (const value of found)
|
package/examples/dhtnode.ts
CHANGED
|
@@ -96,7 +96,7 @@ Keys are text labels hashed with SHA-1. Values are UTF-8 text.`);
|
|
|
96
96
|
const location = hash(key);
|
|
97
97
|
switch (command) {
|
|
98
98
|
case 'get': {
|
|
99
|
-
const found = await runner.
|
|
99
|
+
const found = await runner.getAll(location);
|
|
100
100
|
if (closing) return;
|
|
101
101
|
for (const value of found) printValue(key, value);
|
|
102
102
|
if (!found.length) print(`No values for ${key}`);
|
package/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export interface RunOptions {
|
|
|
49
49
|
network?: number;
|
|
50
50
|
persistPath?: string;
|
|
51
51
|
identity?: Identity;
|
|
52
|
+
proxyServer?: string;
|
|
53
|
+
proxyUserAgent?: string;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
56
|
export interface PutOptions {
|
|
@@ -73,6 +75,18 @@ export interface Listener {
|
|
|
73
75
|
cancel(): void;
|
|
74
76
|
}
|
|
75
77
|
|
|
78
|
+
export interface ListenEvent {
|
|
79
|
+
value: Value;
|
|
80
|
+
expired: boolean;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface ValueIterator<T> extends AsyncIterableIterator<T, undefined>, Listener, AsyncDisposable {
|
|
84
|
+
return(): Promise<IteratorResult<T, undefined>>;
|
|
85
|
+
throw(error?: unknown): Promise<IteratorResult<T, undefined>>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface ListenerIterator extends ValueIterator<ListenEvent> { }
|
|
89
|
+
|
|
76
90
|
export type NodeStatus = 'disconnected' | 'connecting' | 'connected';
|
|
77
91
|
|
|
78
92
|
export interface ConnectivityStatus {
|
|
@@ -92,10 +106,12 @@ export class DhtRunner extends EventEmitter<RunnerEvents> implements AsyncDispos
|
|
|
92
106
|
getNodeId(): string;
|
|
93
107
|
getStatus(): ConnectivityStatus;
|
|
94
108
|
bootstrap(host: string, port: number): void;
|
|
95
|
-
get(key: string):
|
|
109
|
+
get(key: string): ValueIterator<Value>;
|
|
110
|
+
getAll(key: string): Promise<Value[]>;
|
|
96
111
|
put(key: string, data: Uint8Array, options?: PutOptions): Promise<boolean>;
|
|
97
112
|
putSigned(key: string, data: Uint8Array, options?: PutOptions): Promise<boolean>;
|
|
98
113
|
putEncrypted(key: string, data: Uint8Array, recipient: PublicKey, options?: PutOptions): Promise<boolean>;
|
|
114
|
+
listen(key: string): ListenerIterator;
|
|
99
115
|
listen(key: string, callback: (value: Value, expired: boolean) => void): Listener;
|
|
100
116
|
close(): Promise<void>;
|
|
101
117
|
ref(): this;
|
package/index.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
+
import { constants } from 'node:os';
|
|
2
3
|
import { dlopen } from 'node:process';
|
|
3
4
|
import load from 'node-gyp-build';
|
|
4
5
|
import createCrypto from './crypto.js';
|
|
5
6
|
|
|
6
7
|
const binding = { exports: {} };
|
|
7
|
-
|
|
8
|
+
const flags = process.platform === 'linux'
|
|
9
|
+
? constants.dlopen.RTLD_LAZY | constants.dlopen.RTLD_DEEPBIND
|
|
10
|
+
: undefined;
|
|
11
|
+
dlopen(binding, process.env.OPENDHT_NODE_BINDING || load.path(import.meta.dirname),
|
|
12
|
+
flags);
|
|
8
13
|
const native = binding.exports;
|
|
9
14
|
const { PublicKey, PrivateKey, Certificate, Identity, handle } = createCrypto(native);
|
|
10
15
|
|
|
@@ -17,6 +22,7 @@ class DhtRunner extends EventEmitter {
|
|
|
17
22
|
#closing;
|
|
18
23
|
#listeners = 0;
|
|
19
24
|
#pending = 0;
|
|
25
|
+
#iterators = new Set();
|
|
20
26
|
|
|
21
27
|
constructor() {
|
|
22
28
|
super();
|
|
@@ -45,6 +51,11 @@ class DhtRunner extends EventEmitter {
|
|
|
45
51
|
removeAllListeners(...args) { super.removeAllListeners(...args); this.#updateOwner(); return this; }
|
|
46
52
|
|
|
47
53
|
run(options) {
|
|
54
|
+
if (typeof options?.proxyServer === 'string' && options.proxyServer) {
|
|
55
|
+
const proxy = new URL(options.proxyServer);
|
|
56
|
+
if (proxy.protocol !== 'http:' && proxy.protocol !== 'https:')
|
|
57
|
+
throw new TypeError('proxyServer must be an HTTP(S) URL');
|
|
58
|
+
}
|
|
48
59
|
if (options?.identity !== undefined) options = { ...options, identity: handle(options.identity, Identity) };
|
|
49
60
|
this.#native.run(options);
|
|
50
61
|
}
|
|
@@ -53,7 +64,14 @@ class DhtRunner extends EventEmitter {
|
|
|
53
64
|
getNodeId() { return this.#native.getNodeId(); }
|
|
54
65
|
getStatus() { return this.#native.getStatus(); }
|
|
55
66
|
bootstrap(host, port) { this.#native.bootstrap(host, port); }
|
|
56
|
-
get(key) {
|
|
67
|
+
get(key) {
|
|
68
|
+
return this.#iterate((push, finish) => {
|
|
69
|
+
const operation = this.#native.get(key, push);
|
|
70
|
+
this.#track(operation.done).then(() => finish(), finish);
|
|
71
|
+
return () => this.#native.cancelGet(operation.token);
|
|
72
|
+
}, true);
|
|
73
|
+
}
|
|
74
|
+
getAll(key) { return this.#track(this.#native.getAll(key)); }
|
|
57
75
|
put(key, data, options) { return this.#track(this.#native.put(key, data, options)); }
|
|
58
76
|
putSigned(key, data, options) { return this.#track(this.#native.putSigned(key, data, options)); }
|
|
59
77
|
putEncrypted(key, data, recipient, options) {
|
|
@@ -61,6 +79,12 @@ class DhtRunner extends EventEmitter {
|
|
|
61
79
|
}
|
|
62
80
|
|
|
63
81
|
listen(key, callback) {
|
|
82
|
+
if (callback === undefined) {
|
|
83
|
+
return this.#iterate(push => {
|
|
84
|
+
const subscription = this.listen(key, (value, expired) => push({ value, expired }));
|
|
85
|
+
return () => subscription.cancel();
|
|
86
|
+
});
|
|
87
|
+
}
|
|
64
88
|
const token = this.#native.listen(key, callback);
|
|
65
89
|
this.#listeners++;
|
|
66
90
|
this.#updateOwner();
|
|
@@ -76,7 +100,83 @@ class DhtRunner extends EventEmitter {
|
|
|
76
100
|
};
|
|
77
101
|
}
|
|
78
102
|
|
|
79
|
-
|
|
103
|
+
#iterate(subscribe, rejectOnClose = false) {
|
|
104
|
+
let values = [];
|
|
105
|
+
let offset = 0;
|
|
106
|
+
const pending = [];
|
|
107
|
+
let done = false;
|
|
108
|
+
let failure;
|
|
109
|
+
const finish = error => {
|
|
110
|
+
if (done) return;
|
|
111
|
+
done = true;
|
|
112
|
+
failure = error;
|
|
113
|
+
unsubscribe();
|
|
114
|
+
this.#iterators.delete(onClose);
|
|
115
|
+
if (failure) {
|
|
116
|
+
values = [];
|
|
117
|
+
offset = 0;
|
|
118
|
+
}
|
|
119
|
+
for (const { resolve, reject } of pending.splice(0)) {
|
|
120
|
+
if (failure) reject(failure);
|
|
121
|
+
else resolve({ value: undefined, done: true });
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const cancel = () => {
|
|
125
|
+
values = [];
|
|
126
|
+
offset = 0;
|
|
127
|
+
failure = undefined;
|
|
128
|
+
finish();
|
|
129
|
+
};
|
|
130
|
+
const onClose = () => {
|
|
131
|
+
if (rejectOnClose) {
|
|
132
|
+
const error = new Error('DHT runner is closed');
|
|
133
|
+
error.code = 'ERR_DHT_CLOSED';
|
|
134
|
+
finish(error);
|
|
135
|
+
} else cancel();
|
|
136
|
+
};
|
|
137
|
+
const unsubscribe = subscribe(value => {
|
|
138
|
+
if (done) return;
|
|
139
|
+
const waiter = pending.shift();
|
|
140
|
+
if (waiter) waiter.resolve({ value, done: false });
|
|
141
|
+
else values.push(value);
|
|
142
|
+
}, finish);
|
|
143
|
+
this.#iterators.add(onClose);
|
|
144
|
+
return {
|
|
145
|
+
next() {
|
|
146
|
+
if (failure) return Promise.reject(failure);
|
|
147
|
+
if (offset < values.length) {
|
|
148
|
+
const value = values[offset];
|
|
149
|
+
values[offset++] = undefined;
|
|
150
|
+
if (offset === values.length) {
|
|
151
|
+
values = [];
|
|
152
|
+
offset = 0;
|
|
153
|
+
}
|
|
154
|
+
return Promise.resolve({ value, done: false });
|
|
155
|
+
}
|
|
156
|
+
if (done) return Promise.resolve({ value: undefined, done: true });
|
|
157
|
+
return new Promise((resolve, reject) => pending.push({ resolve, reject }));
|
|
158
|
+
},
|
|
159
|
+
return() {
|
|
160
|
+
cancel();
|
|
161
|
+
return Promise.resolve({ value: undefined, done: true });
|
|
162
|
+
},
|
|
163
|
+
throw(error) {
|
|
164
|
+
cancel();
|
|
165
|
+
return Promise.reject(error);
|
|
166
|
+
},
|
|
167
|
+
cancel,
|
|
168
|
+
[Symbol.asyncIterator]() { return this; },
|
|
169
|
+
[Symbol.asyncDispose]() { cancel(); return Promise.resolve(); },
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
close() {
|
|
174
|
+
if (!this.#closing) {
|
|
175
|
+
this.#closing = this.#native.close();
|
|
176
|
+
for (const cancel of this.#iterators) cancel();
|
|
177
|
+
}
|
|
178
|
+
return this.#closing;
|
|
179
|
+
}
|
|
80
180
|
ref() { this.#native.ref(); return this; }
|
|
81
181
|
unref() { this.#native.unref(); return this; }
|
|
82
182
|
[Symbol.asyncDispose]() { return this.close(); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opendht",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.102",
|
|
4
4
|
"description": "Distributed hash table for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^22.20.5",
|
|
54
54
|
"cmake-js": "^8.0.0",
|
|
55
|
-
"node-addon-api": "^8.
|
|
55
|
+
"node-addon-api": "^8.8.0",
|
|
56
56
|
"typescript": "^7.0.2"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
This software is licensed under the MIT License.
|
|
2
|
+
|
|
3
|
+
Copyright Fedor Indutny, 2018.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
11
|
+
following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included
|
|
14
|
+
in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
19
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2018 Fedor Indutny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
11
|
+
following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included
|
|
14
|
+
in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
19
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
https://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"napi": 8,
|
|
5
5
|
"libraries": [
|
|
6
6
|
"libargon2.1.dylib",
|
|
7
|
+
"libcrypto.3.dylib",
|
|
7
8
|
"libfmt.12.2.0.dylib",
|
|
8
9
|
"libgmp.10.dylib",
|
|
9
10
|
"libgnutls.30.dylib",
|
|
@@ -11,10 +12,12 @@
|
|
|
11
12
|
"libidn2.0.dylib",
|
|
12
13
|
"libintl.8.dylib",
|
|
13
14
|
"libjsoncpp.27.dylib",
|
|
15
|
+
"libllhttp.9.4.3.dylib",
|
|
14
16
|
"libnettle.9.0.dylib",
|
|
15
17
|
"libopendht.4.4.99.dylib",
|
|
16
18
|
"libp11-kit.0.dylib",
|
|
17
19
|
"libsimdutf.35.0.0.dylib",
|
|
20
|
+
"libssl.3.dylib",
|
|
18
21
|
"libtasn1.6.dylib",
|
|
19
22
|
"libunistring.5.dylib",
|
|
20
23
|
"node.napi.node"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
This software is licensed under the MIT License.
|
|
2
|
+
|
|
3
|
+
Copyright Fedor Indutny, 2018.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
11
|
+
following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included
|
|
14
|
+
in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
19
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright © 2018 Fedor Indutny
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
11
|
+
following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included
|
|
14
|
+
in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
19
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
https://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"napi": 8,
|
|
5
5
|
"libraries": [
|
|
6
6
|
"libargon2.1.dylib",
|
|
7
|
+
"libcrypto.3.dylib",
|
|
7
8
|
"libfmt.12.2.0.dylib",
|
|
8
9
|
"libgmp.10.dylib",
|
|
9
10
|
"libgnutls.30.dylib",
|
|
@@ -11,10 +12,12 @@
|
|
|
11
12
|
"libidn2.0.dylib",
|
|
12
13
|
"libintl.8.dylib",
|
|
13
14
|
"libjsoncpp.27.dylib",
|
|
15
|
+
"libllhttp.9.4.3.dylib",
|
|
14
16
|
"libnettle.9.0.dylib",
|
|
15
17
|
"libopendht.4.4.99.dylib",
|
|
16
18
|
"libp11-kit.0.dylib",
|
|
17
19
|
"libsimdutf.35.0.0.dylib",
|
|
20
|
+
"libssl.3.dylib",
|
|
18
21
|
"libtasn1.6.dylib",
|
|
19
22
|
"libunistring.5.dylib",
|
|
20
23
|
"node.napi.node"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
|
2
|
+
Upstream-Name: OpenSSL
|
|
3
|
+
Source: https://www.openssl.org
|
|
4
|
+
|
|
5
|
+
Files: *
|
|
6
|
+
Copyright: 1995-2020, The OpenSSL Project Authors
|
|
7
|
+
1995-1998, Eric A. Young, Tim J. Hudson
|
|
8
|
+
2004-2014 Akamai Technologies.
|
|
9
|
+
2008 Andy Polyakov <appro@openssl.org>
|
|
10
|
+
2017 BaishanCloud.
|
|
11
|
+
2015 CloudFlare Inc.
|
|
12
|
+
2014-2016 Cryptography Research Inc.
|
|
13
|
+
2012-2014 Daniel J. Bernstein
|
|
14
|
+
2004 EdelKey Project.
|
|
15
|
+
2011 Google Inc.
|
|
16
|
+
2018-2019 IBM Corp.
|
|
17
|
+
2012,2014 Intel Corporation.
|
|
18
|
+
2012-2016 Jean-Philippe Aumasson
|
|
19
|
+
2007 KISA(Korea Information Security Agency).
|
|
20
|
+
2004 Kungliga Tekniska Högskolan
|
|
21
|
+
2017 National Security Research Institute.
|
|
22
|
+
2006 Network Resonance Inc.
|
|
23
|
+
2005,2007-2020 Nokia
|
|
24
|
+
2006 NTT (Nippon Telegraph and Telephone Corporation)
|
|
25
|
+
2002,2017-2020 Oracle and/or its affiliates.
|
|
26
|
+
1995 Patrick Powell
|
|
27
|
+
2019 Red Hat Inc.
|
|
28
|
+
2017 Ribose Inc.
|
|
29
|
+
2004,2018 Richard Levitte <richard@levitte.org>
|
|
30
|
+
2011 RTFM Inc.
|
|
31
|
+
2012 Samuel Neves <sneves@dei.uc.pt>
|
|
32
|
+
2015-2020 Siemens AG
|
|
33
|
+
2002 The OpenTSA Project.
|
|
34
|
+
2013-2014 Timo Teräs <timo.teras@gmail.com>
|
|
35
|
+
2016 Viktor Dukhovni <openssl-users@dukhovni.org>.
|
|
36
|
+
2016 VMS Software Inc.
|
|
37
|
+
License: Apache-2.0
|
|
38
|
+
|
|
39
|
+
License: Apache-2.0
|
|
40
|
+
Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
41
|
+
this file except in compliance with the License. You can obtain a copy
|
|
42
|
+
in the file LICENSE in the source distribution or at
|
|
43
|
+
https://www.openssl.org/source/license.html
|
|
44
|
+
.
|
|
45
|
+
On Debian systems, the complete text of the Apache 2.0 License
|
|
46
|
+
can be found in `/usr/share/common-licenses/Apache-2.0'
|
|
47
|
+
|
|
48
|
+
Files: debian/*
|
|
49
|
+
Copyright: Christoph Martin, Kurt Roeckx, Sebastian Andrzej Siewior
|
|
50
|
+
License: Apache-2.0
|
|
51
|
+
|
|
52
|
+
Files: external/perl/Text-Template-1.56/*
|
|
53
|
+
Copyright: 2013, Mark Jason Dominus <mjd@cpan.org>.
|
|
54
|
+
License: Artistic or GPL-1+
|
|
55
|
+
|
|
56
|
+
License: Artistic
|
|
57
|
+
This program is free software; you can redistribute it and/or modify
|
|
58
|
+
it under the terms of the Artistic License, which comes with Perl.
|
|
59
|
+
.
|
|
60
|
+
On Debian systems, the complete text of the Artistic License can be
|
|
61
|
+
found in `/usr/share/common-licenses/Artistic'.
|
|
62
|
+
|
|
63
|
+
License: GPL-1+
|
|
64
|
+
This program is free software; you can redistribute it and/or modify
|
|
65
|
+
it under the terms of the GNU General Public License as published by
|
|
66
|
+
the Free Software Foundation; either version 1, or (at your option)
|
|
67
|
+
any later version.
|
|
68
|
+
.
|
|
69
|
+
On Debian systems, the complete text of version 1 of the GNU General
|
|
70
|
+
Public License can be found in `/usr/share/common-licenses/GPL-1'.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
This software is licensed under the MIT License.
|
|
2
|
+
|
|
3
|
+
Copyright Fedor Indutny, 2018.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
6
|
+
copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
10
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
11
|
+
following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included
|
|
14
|
+
in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
17
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
19
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
20
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
21
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
22
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
"napi": 8,
|
|
5
5
|
"libraries": [
|
|
6
6
|
"libargon2.so.1",
|
|
7
|
+
"libcrypto.so.3",
|
|
7
8
|
"libffi.so.8",
|
|
8
9
|
"libfmt.so.9",
|
|
9
10
|
"libgmp.so.10",
|
|
@@ -11,9 +12,11 @@
|
|
|
11
12
|
"libhogweed.so.6",
|
|
12
13
|
"libidn2.so.0",
|
|
13
14
|
"libjsoncpp.so.25",
|
|
15
|
+
"libllhttp.so.9.2",
|
|
14
16
|
"libnettle.so.8",
|
|
15
17
|
"libopendht.so.4",
|
|
16
18
|
"libp11-kit.so.0",
|
|
19
|
+
"libssl.so.3",
|
|
17
20
|
"libtasn1.so.6",
|
|
18
21
|
"libunistring.so.5",
|
|
19
22
|
"node.napi.glibc.node"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|