@mercuryworkshop/epoxy-transport 2.0.5 → 2.0.6
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/dist/index.js +8 -3
- package/dist/module.js +8 -3
- package/package.json +37 -36
- package/src/main.ts +8 -3
package/dist/index.js
CHANGED
|
@@ -1530,16 +1530,21 @@ var EpoxyClient = class {
|
|
|
1530
1530
|
canstart = true;
|
|
1531
1531
|
epxclient = null;
|
|
1532
1532
|
wisp;
|
|
1533
|
+
wisp_v2;
|
|
1534
|
+
udp_extension_required;
|
|
1533
1535
|
EpoxyHandlers = null;
|
|
1534
|
-
constructor({ wisp }) {
|
|
1536
|
+
constructor({ wisp, wisp_v2, udp_extension_required }) {
|
|
1535
1537
|
this.wisp = wisp;
|
|
1538
|
+
this.wisp_v2 = wisp_v2 || true;
|
|
1539
|
+
this.udp_extension_required = udp_extension_required || false;
|
|
1536
1540
|
}
|
|
1537
1541
|
async init() {
|
|
1538
1542
|
const { EpoxyClient: EpoxyClient2, EpoxyClientOptions, EpoxyHandlers } = await epoxy_module_bundled_default();
|
|
1539
1543
|
let options = new EpoxyClientOptions();
|
|
1540
1544
|
options.user_agent = navigator.userAgent;
|
|
1541
|
-
options.udp_extension_required =
|
|
1542
|
-
|
|
1545
|
+
options.udp_extension_required = this.udp_extension_required;
|
|
1546
|
+
options.wisp_v2 = this.wisp_v2;
|
|
1547
|
+
this.epxclient = new EpoxyClient2(this.wisp, certs_module_default, options);
|
|
1543
1548
|
this.EpoxyHandlers = EpoxyHandlers;
|
|
1544
1549
|
this.ready = true;
|
|
1545
1550
|
}
|
package/dist/module.js
CHANGED
|
@@ -1491,16 +1491,21 @@ var EpoxyClient = class {
|
|
|
1491
1491
|
canstart = true;
|
|
1492
1492
|
epxclient = null;
|
|
1493
1493
|
wisp;
|
|
1494
|
+
wisp_v2;
|
|
1495
|
+
udp_extension_required;
|
|
1494
1496
|
EpoxyHandlers = null;
|
|
1495
|
-
constructor({ wisp }) {
|
|
1497
|
+
constructor({ wisp, wisp_v2, udp_extension_required }) {
|
|
1496
1498
|
this.wisp = wisp;
|
|
1499
|
+
this.wisp_v2 = wisp_v2 || true;
|
|
1500
|
+
this.udp_extension_required = udp_extension_required || false;
|
|
1497
1501
|
}
|
|
1498
1502
|
async init() {
|
|
1499
1503
|
const { EpoxyClient: EpoxyClient2, EpoxyClientOptions, EpoxyHandlers } = await epoxy_module_bundled_default();
|
|
1500
1504
|
let options = new EpoxyClientOptions();
|
|
1501
1505
|
options.user_agent = navigator.userAgent;
|
|
1502
|
-
options.udp_extension_required =
|
|
1503
|
-
|
|
1506
|
+
options.udp_extension_required = this.udp_extension_required;
|
|
1507
|
+
options.wisp_v2 = this.wisp_v2;
|
|
1508
|
+
this.epxclient = new EpoxyClient2(this.wisp, certs_module_default, options);
|
|
1504
1509
|
this.EpoxyHandlers = EpoxyHandlers;
|
|
1505
1510
|
this.ready = true;
|
|
1506
1511
|
}
|
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
2
|
+
"name": "@mercuryworkshop/epoxy-transport",
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"description": "a bare transport that implements end-to-end encryption with epoxy-tls and wisp",
|
|
5
|
+
"main": "./dist/index.mjs",
|
|
6
|
+
"keywords": [],
|
|
7
|
+
"author": "",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"license": "AGPL-3.0-only",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "node esbuild.bundle.mjs",
|
|
12
|
+
"prepare": "npm run build"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@mercuryworkshop/epoxy-tls": "^2.0.3-4",
|
|
16
|
+
"esbuild-plugin-umd-wrapper": "^2.0.0",
|
|
17
|
+
"rollup": "^4.12.0",
|
|
18
|
+
"rollup-plugin-node-resolve": "^5.2.0",
|
|
19
|
+
"rollup-plugin-typescript2": "^0.36.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@mercuryworkshop/bare-mux": "^1.1.4",
|
|
23
|
+
"esbuild": "^0.19.11",
|
|
24
|
+
"esbuild-plugin-d.ts": "^1.2.2"
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"browser": {
|
|
29
|
+
"import": "./dist/index.mjs",
|
|
30
|
+
"require": "./dist/index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"node": {
|
|
33
|
+
"require": "./lib/index.cjs",
|
|
34
|
+
"import": "./lib/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
package/src/main.ts
CHANGED
|
@@ -6,18 +6,23 @@ export class EpoxyClient implements BareTransport {
|
|
|
6
6
|
canstart = true;
|
|
7
7
|
epxclient: Awaited<ReturnType<any>>["EpoxyClient"]["prototype"] = null!;
|
|
8
8
|
wisp: string;
|
|
9
|
+
wisp_v2: boolean;
|
|
10
|
+
udp_extension_required: boolean;
|
|
9
11
|
EpoxyHandlers: Awaited<ReturnType<any>>["EpoxyHandlers"]["prototype"] = null!;
|
|
10
12
|
|
|
11
|
-
constructor({ wisp }) {
|
|
13
|
+
constructor({ wisp, wisp_v2, udp_extension_required }) {
|
|
12
14
|
this.wisp = wisp;
|
|
15
|
+
this.wisp_v2 = wisp_v2 || true;
|
|
16
|
+
this.udp_extension_required = udp_extension_required || false;
|
|
13
17
|
}
|
|
14
18
|
async init() {
|
|
15
19
|
const { EpoxyClient, EpoxyClientOptions, EpoxyHandlers } = await epoxy();
|
|
16
20
|
|
|
17
21
|
let options = new EpoxyClientOptions();
|
|
18
22
|
options.user_agent = navigator.userAgent;
|
|
19
|
-
options.udp_extension_required =
|
|
20
|
-
|
|
23
|
+
options.udp_extension_required = this.udp_extension_required;
|
|
24
|
+
options.wisp_v2 = this.wisp_v2;
|
|
25
|
+
this.epxclient = new EpoxyClient(this.wisp, ROOTS, options);
|
|
21
26
|
this.EpoxyHandlers = EpoxyHandlers;
|
|
22
27
|
|
|
23
28
|
this.ready = true;
|