@aria-cli/wireguard 1.0.18 → 1.0.23

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/index.js CHANGED
@@ -77,8 +77,8 @@ function requireNative() {
77
77
  try {
78
78
  const binding = require('@aria-cli/wireguard-android-arm64')
79
79
  const bindingPackageVersion = require('@aria-cli/wireguard-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
80
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -93,8 +93,8 @@ function requireNative() {
93
93
  try {
94
94
  const binding = require('@aria-cli/wireguard-android-arm-eabi')
95
95
  const bindingPackageVersion = require('@aria-cli/wireguard-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
96
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -114,8 +114,8 @@ function requireNative() {
114
114
  try {
115
115
  const binding = require('@aria-cli/wireguard-win32-x64-gnu')
116
116
  const bindingPackageVersion = require('@aria-cli/wireguard-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
117
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -130,8 +130,8 @@ function requireNative() {
130
130
  try {
131
131
  const binding = require('@aria-cli/wireguard-win32-x64-msvc')
132
132
  const bindingPackageVersion = require('@aria-cli/wireguard-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
133
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -147,8 +147,8 @@ function requireNative() {
147
147
  try {
148
148
  const binding = require('@aria-cli/wireguard-win32-ia32-msvc')
149
149
  const bindingPackageVersion = require('@aria-cli/wireguard-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
150
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -163,8 +163,8 @@ function requireNative() {
163
163
  try {
164
164
  const binding = require('@aria-cli/wireguard-win32-arm64-msvc')
165
165
  const bindingPackageVersion = require('@aria-cli/wireguard-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
166
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -182,8 +182,8 @@ function requireNative() {
182
182
  try {
183
183
  const binding = require('@aria-cli/wireguard-darwin-universal')
184
184
  const bindingPackageVersion = require('@aria-cli/wireguard-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
185
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -198,8 +198,8 @@ function requireNative() {
198
198
  try {
199
199
  const binding = require('@aria-cli/wireguard-darwin-x64')
200
200
  const bindingPackageVersion = require('@aria-cli/wireguard-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
201
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -214,8 +214,8 @@ function requireNative() {
214
214
  try {
215
215
  const binding = require('@aria-cli/wireguard-darwin-arm64')
216
216
  const bindingPackageVersion = require('@aria-cli/wireguard-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
217
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -234,8 +234,8 @@ function requireNative() {
234
234
  try {
235
235
  const binding = require('@aria-cli/wireguard-freebsd-x64')
236
236
  const bindingPackageVersion = require('@aria-cli/wireguard-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
237
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -250,8 +250,8 @@ function requireNative() {
250
250
  try {
251
251
  const binding = require('@aria-cli/wireguard-freebsd-arm64')
252
252
  const bindingPackageVersion = require('@aria-cli/wireguard-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
253
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -271,8 +271,8 @@ function requireNative() {
271
271
  try {
272
272
  const binding = require('@aria-cli/wireguard-linux-x64-musl')
273
273
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
274
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -287,8 +287,8 @@ function requireNative() {
287
287
  try {
288
288
  const binding = require('@aria-cli/wireguard-linux-x64-gnu')
289
289
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
290
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -305,8 +305,8 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require('@aria-cli/wireguard-linux-arm64-musl')
307
307
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
308
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -321,8 +321,8 @@ function requireNative() {
321
321
  try {
322
322
  const binding = require('@aria-cli/wireguard-linux-arm64-gnu')
323
323
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
324
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -339,8 +339,8 @@ function requireNative() {
339
339
  try {
340
340
  const binding = require('@aria-cli/wireguard-linux-arm-musleabihf')
341
341
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
342
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -355,8 +355,8 @@ function requireNative() {
355
355
  try {
356
356
  const binding = require('@aria-cli/wireguard-linux-arm-gnueabihf')
357
357
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
358
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -373,8 +373,8 @@ function requireNative() {
373
373
  try {
374
374
  const binding = require('@aria-cli/wireguard-linux-loong64-musl')
375
375
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
376
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -389,8 +389,8 @@ function requireNative() {
389
389
  try {
390
390
  const binding = require('@aria-cli/wireguard-linux-loong64-gnu')
391
391
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
392
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -407,8 +407,8 @@ function requireNative() {
407
407
  try {
408
408
  const binding = require('@aria-cli/wireguard-linux-riscv64-musl')
409
409
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
410
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -423,8 +423,8 @@ function requireNative() {
423
423
  try {
424
424
  const binding = require('@aria-cli/wireguard-linux-riscv64-gnu')
425
425
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
426
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -440,8 +440,8 @@ function requireNative() {
440
440
  try {
441
441
  const binding = require('@aria-cli/wireguard-linux-ppc64-gnu')
442
442
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
443
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -456,8 +456,8 @@ function requireNative() {
456
456
  try {
457
457
  const binding = require('@aria-cli/wireguard-linux-s390x-gnu')
458
458
  const bindingPackageVersion = require('@aria-cli/wireguard-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
459
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -476,8 +476,8 @@ function requireNative() {
476
476
  try {
477
477
  const binding = require('@aria-cli/wireguard-openharmony-arm64')
478
478
  const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
479
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -492,8 +492,8 @@ function requireNative() {
492
492
  try {
493
493
  const binding = require('@aria-cli/wireguard-openharmony-x64')
494
494
  const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
495
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -508,8 +508,8 @@ function requireNative() {
508
508
  try {
509
509
  const binding = require('@aria-cli/wireguard-openharmony-arm')
510
510
  const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '1.0.18' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 1.0.18 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
511
+ if (bindingPackageVersion !== '1.0.23' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 1.0.23 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aria-cli/wireguard",
3
- "version": "1.0.18",
3
+ "version": "1.0.23",
4
4
  "description": "WireGuard native addon for ARIA secure networking (boringtun via napi-rs)",
5
5
  "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
6
+ "types": "./dist/index.d.ts",
7
7
  "exports": {
8
8
  ".": {
9
9
  "types": "./dist/index.d.ts",
@@ -45,17 +45,17 @@
45
45
  "build": "tsc -b --force tsconfig.json && napi build --platform --release",
46
46
  "build:debug": "napi build --platform",
47
47
  "test": "vitest run --config vitest.config.ts",
48
- "test:list": "tsx tests/print-default-test-lane.ts",
48
+ "test:list": "bun tests/print-default-test-lane.ts",
49
49
  "test:watch": "vitest --config vitest.config.ts",
50
50
  "test:integration": "vitest run --config vitest.integration.config.ts",
51
51
  "test:native": "vitest run --config vitest.native.config.ts",
52
52
  "test:e2e": "vitest run --config vitest.e2e.config.ts",
53
53
  "test:real": "vitest run --config vitest.real.config.ts",
54
- "test:lanes": "tsx tests/print-test-lane-manifest.ts"
54
+ "test:lanes": "bun tests/print-test-lane-manifest.ts"
55
55
  },
56
56
  "dependencies": {
57
- "@aria-cli/aria": "1.0.18",
58
- "@aria-cli/tools": "1.0.18",
57
+ "@aria-cli/aria": "1.0.19",
58
+ "@aria-cli/tools": "1.0.19",
59
59
  "better-sqlite3": "^12.6.2",
60
60
  "ws": "^8.19.0"
61
61
  },
@@ -65,18 +65,20 @@
65
65
  "@types/ws": "^8.5.10"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@aria-cli/wireguard-darwin-arm64": "1.0.18",
69
- "@aria-cli/wireguard-darwin-x64": "1.0.18",
70
- "@aria-cli/wireguard-linux-x64-gnu": "1.0.18",
71
- "@aria-cli/wireguard-linux-arm64-gnu": "1.0.18",
72
- "@aria-cli/wireguard-win32-x64-msvc": "1.0.18"
68
+ "@aria-cli/wireguard-darwin-arm64": "1.0.23",
69
+ "@aria-cli/wireguard-darwin-x64": "1.0.23",
70
+ "@aria-cli/wireguard-linux-x64-gnu": "1.0.23",
71
+ "@aria-cli/wireguard-linux-arm64-gnu": "1.0.23",
72
+ "@aria-cli/wireguard-win32-x64-msvc": "1.0.23"
73
73
  },
74
74
  "files": [
75
75
  "index.js",
76
76
  "index.d.ts",
77
77
  "dist/",
78
78
  "!**/*.map",
79
- "!**/*.tsbuildinfo"
79
+ "!**/*.tsbuildinfo",
80
+ "!**/*.d.ts",
81
+ "!**/*.d.ts.map"
80
82
  ],
81
83
  "engines": {
82
84
  "node": ">=20.0.0"
@@ -1,4 +0,0 @@
1
- {
2
- "label": "@aria-cli/wireguard",
3
- "fingerprint": "21b87442805d526e744448e6b968640a56f412e3ce341fcde313727cc634b59c"
4
- }
@@ -1 +0,0 @@
1
- export declare function loadStoredBootstrapCaCert(ariaDir: string): string | undefined;
@@ -1,13 +0,0 @@
1
- export interface BootstrapTlsRequestOptions {
2
- method?: string;
3
- body?: string;
4
- headers?: Record<string, string>;
5
- timeoutMs?: number;
6
- caCert: string;
7
- expectedTlsIdentity: string;
8
- }
9
- export interface BootstrapTlsResponse {
10
- status: number;
11
- body: string;
12
- }
13
- export declare function bootstrapTlsRequest(url: string, options: BootstrapTlsRequestOptions): Promise<BootstrapTlsResponse>;
@@ -1,9 +0,0 @@
1
- import type Database from "better-sqlite3";
2
- export declare class StaleOwnerError extends Error {
3
- readonly kind: "StaleOwnerError";
4
- readonly claimedGeneration: number;
5
- readonly currentGeneration: number;
6
- constructor(claimed: number, current: number);
7
- }
8
- export declare function ensureOwnerEpochTable(db: Database.Database): void;
9
- export declare function claimDbOwnerEpoch(db: Database.Database, generation: number): void;
@@ -1,74 +0,0 @@
1
- /**
2
- * DerpRelay — DERP relay client for NAT traversal.
3
- *
4
- * When both peers are behind symmetric NAT, direct WireGuard tunnels fail.
5
- * DerpRelay connects to a relay server via WebSocket and forwards encrypted
6
- * WireGuard packets through it. The relay CANNOT read the content (WireGuard
7
- * encryption is end-to-end).
8
- *
9
- * Implements the same { send(data: Buffer): void } interface as tunnel transports,
10
- * so it plugs into Mailbox.registerTunnel() transparently.
11
- *
12
- * Authentication: Ed25519 signature challenge on connect to prevent impersonation.
13
- * Auto-reconnect: Exponential backoff, matching ResilientTunnel's pattern.
14
- */
15
- import { EventEmitter } from "node:events";
16
- import { type NodeId } from "@aria-cli/tools";
17
- export interface DerpRelayOptions {
18
- /** Relay server URL (e.g., wss://relay.example.com/api/v1/relay) */
19
- relayUrl: string;
20
- /** Our durable node identity for relay auth */
21
- nodeId: NodeId;
22
- /** Optional display snapshot for local logs/debug output */
23
- displayNameSnapshot?: string;
24
- /** Ed25519 private key (base64 PKCS#8 DER) for authentication */
25
- signingPrivateKey: string;
26
- /** Ed25519 public key (base64 SPKI DER) for identification */
27
- signingPublicKey: string;
28
- /** Target node identity to communicate with */
29
- targetNodeId: NodeId;
30
- /** AbortSignal for clean shutdown */
31
- signal?: AbortSignal;
32
- }
33
- export type DerpRelayState = "disconnected" | "connecting" | "authenticating" | "connected" | "dead";
34
- /**
35
- * DERP relay client.
36
- *
37
- * Emits: "plaintext" (data: Buffer, fromNodeId: NodeId, displayNameSnapshot?: string), "connected", "disconnected",
38
- * "dead", "error" (Error), "stateChange" (newState, prevState)
39
- */
40
- export declare class DerpRelay extends EventEmitter {
41
- private ws;
42
- private _state;
43
- private reconnectAttempts;
44
- private reconnectTimer;
45
- private stopped;
46
- private closing;
47
- private readonly relayUrl;
48
- private readonly nodeId;
49
- private readonly displayNameSnapshot?;
50
- private readonly signingPrivateKey;
51
- private readonly signingPublicKey;
52
- private readonly targetNodeId;
53
- private readonly signal?;
54
- /** Queued messages while not connected */
55
- private queue;
56
- private static readonly MAX_QUEUE;
57
- constructor(options: DerpRelayOptions);
58
- /** Connect to the relay server */
59
- connect(): Promise<void>;
60
- /** Send data through the relay to the target peer */
61
- send(data: Buffer): void;
62
- /** Disconnect from the relay server */
63
- disconnect(): void;
64
- /** Get current relay state */
65
- getState(): DerpRelayState;
66
- /** Whether the relay is actively connected */
67
- get isConnected(): boolean;
68
- private setState;
69
- private signChallenge;
70
- private attemptReconnect;
71
- private clearReconnectTimer;
72
- private enqueue;
73
- private flushQueue;
74
- }
package/dist/index.d.ts DELETED
@@ -1,52 +0,0 @@
1
- /**
2
- * @aria/wireguard — WireGuard native addon for ARIA secure networking.
3
- *
4
- * Wraps Cloudflare's boringtun (BSD-3) via napi-rs for userspace
5
- * encrypted tunnels. Three hot-path functions: encrypt, decrypt, tick.
6
- *
7
- * @packageDocumentation
8
- */
9
- export interface WireGuardResult {
10
- /** "done" | "write_to_network" | "write_to_tunnel" | "error" */
11
- op: string;
12
- /** Output data (if any) */
13
- data?: Buffer;
14
- }
15
- export interface KeyPair {
16
- publicKey: string;
17
- privateKey: string;
18
- }
19
- export interface WireGuardTunnelOptions {
20
- /** Base64-encoded X25519 private key */
21
- privateKey: string;
22
- /** Base64-encoded X25519 peer public key */
23
- peerPublicKey: string;
24
- /** Optional base64-encoded preshared key */
25
- presharedKey?: string;
26
- /** Persistent keepalive interval in seconds (0 = disabled) */
27
- keepalive?: number;
28
- /** Tunnel index for session disambiguation (random if not provided) */
29
- index?: number;
30
- }
31
- /** Validate that the native addon can be loaded in the current runtime. */
32
- export declare function assertNativeAddonAvailable(): void;
33
- /** Create a new WireGuard tunnel */
34
- export declare function createTunnel(options: WireGuardTunnelOptions): {
35
- encrypt(src: Buffer): WireGuardResult;
36
- decrypt(src: Buffer, srcAddr?: string | undefined | null): WireGuardResult;
37
- tick(): WireGuardResult;
38
- };
39
- /** Generate a new X25519 keypair for WireGuard */
40
- export declare function generateKeypair(): KeyPair;
41
- export { SecureTunnel } from "./tunnel.js";
42
- export type { SecureTunnelOptions, TunnelStats } from "./tunnel.js";
43
- export { ResilientTunnel } from "./resilient-tunnel.js";
44
- export type { TunnelState, ResilientTunnelStats } from "./resilient-tunnel.js";
45
- export { StunClient, discoverEndpoint, detectNatType } from "./nat.js";
46
- export type { StunResult, NatType } from "./nat.js";
47
- export { NetworkManager, PeerRegistry, generateKeyPair, generateSigningKeypair, createInviteToken, decodeInviteToken, ensureSecureNetwork, } from "./network.js";
48
- export type { NetworkConfig, PeerInfo, InviteToken } from "./network.js";
49
- export { PeerDiscoveryService } from "./peer-discovery.js";
50
- export type { PeerDiscoveryOptions, DiscoveredPeer, PeerDiscoveryNetworkManager, } from "./peer-discovery.js";
51
- export { DerpRelay } from "./derp-relay.js";
52
- export type { DerpRelayOptions, DerpRelayState } from "./derp-relay.js";
package/dist/nat.d.ts DELETED
@@ -1,83 +0,0 @@
1
- /**
2
- * STUN client + NAT traversal for ARIA secure networking.
3
- *
4
- * Discovers external IP:port via STUN (RFC 5389), enabling WireGuard
5
- * peers to find each other through NAT. Falls back to a UDP relay
6
- * when symmetric NAT prevents direct connectivity.
7
- *
8
- * No external dependencies — implements STUN binding request/response
9
- * directly using node:dgram.
10
- */
11
- import * as dgram from "node:dgram";
12
- /** Result of STUN endpoint discovery */
13
- export interface StunResult {
14
- /** External (public) IP address */
15
- address: string;
16
- /** External (public) port */
17
- port: number;
18
- /** STUN server used for discovery */
19
- server: string;
20
- }
21
- /**
22
- * Discover our external endpoint by sending a STUN Binding Request.
23
- *
24
- * Tries multiple STUN servers in parallel, returns the first successful response.
25
- * Timeout: 3 seconds per server, 5 second total.
26
- */
27
- /**
28
- * Discover external endpoint via STUN.
29
- *
30
- * @param server STUN server hostname:port (or undefined to try defaults)
31
- * @param timeoutMs Timeout in milliseconds
32
- * @param existingSocket Optional: use this socket for STUN instead of creating
33
- * ephemeral ones. This is critical for the shared-socket WG model — STUN must
34
- * discover the NAT mapping of the ACTUAL listening socket, not a throwaway one.
35
- * When provided, the socket is NOT closed after discovery.
36
- */
37
- export declare function discoverEndpoint(server?: string, timeoutMs?: number, existingSocket?: dgram.Socket): Promise<StunResult>;
38
- /**
39
- * NAT type classification.
40
- *
41
- * Detected by comparing mapped ports from two different STUN servers:
42
- * - Same port from both servers → Full Cone or Restricted Cone (direct tunnel works)
43
- * - Different port from each server → Symmetric NAT (needs relay)
44
- */
45
- export type NatType = "full_cone" | "restricted" | "symmetric" | "unknown";
46
- /**
47
- * Detect NAT type by querying two STUN servers and comparing mapped ports.
48
- *
49
- * Symmetric NAT allocates a new external port for each destination,
50
- * so mapped ports will differ across STUN servers. Cone NATs reuse
51
- * the same external port, so mapped ports will match.
52
- *
53
- * Returns "unknown" if fewer than 2 STUN servers respond.
54
- */
55
- export declare function detectNatType(servers?: string[], timeoutMs?: number): Promise<{
56
- natType: NatType;
57
- results: StunResult[];
58
- }>;
59
- /**
60
- * STUN client for periodic endpoint discovery.
61
- *
62
- * Use for ongoing NAT traversal — discovers and tracks endpoint changes.
63
- */
64
- export declare class StunClient {
65
- private servers;
66
- private pollIntervalMs;
67
- private interval;
68
- private lastResult;
69
- private _natType;
70
- /** Number of consecutive discovery failures (reset to 0 on success) */
71
- consecutiveFailures: number;
72
- constructor(servers?: string[], pollIntervalMs?: number);
73
- /** Get the detected NAT type (null if not yet detected) */
74
- getNatType(): NatType | null;
75
- /** Get the last discovered endpoint */
76
- getEndpoint(): StunResult | null;
77
- /** Discover endpoint once — uses first configured server (or defaults) */
78
- discover(): Promise<StunResult>;
79
- /** Start periodic endpoint discovery. Detects NAT type on first call. */
80
- start(onUpdate?: (result: StunResult) => void): void;
81
- /** Stop periodic discovery */
82
- stop(): void;
83
- }
@@ -1,45 +0,0 @@
1
- /**
2
- * NetworkStateStore — canonical, machine-scoped persistence for network control-plane state.
3
- *
4
- * All network-adjacent durable state (peers, signing keys, revocations, nonces, trust)
5
- * lives in ONE canonical store at ARIA_HOME/network/state.db, independent of any
6
- * arion-specific Memoria DB. This eliminates the split-brain where peer state could
7
- * drift across multiple DB paths.
8
- *
9
- * PeerRegistry, RevocationStore, and other network stores all use the Database
10
- * returned by getDatabase().
11
- */
12
- import type Database from "better-sqlite3";
13
- export interface NetworkStateStoreOptions {
14
- /** Base ARIA home directory (e.g., ~/.aria) */
15
- ariaHome: string;
16
- /** Override DB path (for testing) */
17
- dbPath?: string;
18
- }
19
- export declare class NetworkStateStore {
20
- private readonly options;
21
- private db;
22
- private readonly dbPath;
23
- constructor(options: NetworkStateStoreOptions);
24
- /** Canonical path to the network state DB */
25
- get path(): string;
26
- /** Whether the store has been opened */
27
- get isOpen(): boolean;
28
- /** Open the database, creating schema if needed */
29
- open(): Database.Database;
30
- private reconcilePeerTableSchema;
31
- /** Get the underlying Database handle (opens if needed) */
32
- getDatabase(): Database.Database;
33
- /**
34
- * Claim the owner epoch for this runtime on the shared network state DB.
35
- * Must be called after open() and before any durable writes.
36
- * Throws StaleOwnerError if a newer generation already owns the DB.
37
- */
38
- claimOwnerEpoch(generation: number): void;
39
- /** Close the database */
40
- close(): void;
41
- }
42
- /**
43
- * Resolve the canonical network state DB path for a given ARIA home.
44
- */
45
- export declare function canonicalNetworkStatePath(ariaHome: string): string;