@aria-cli/wireguard
Advanced tools
| /** | ||
| * Native addon interface — loads the boringtun WireGuard addon via napi-rs. | ||
| * | ||
| * Separated from index.ts (barrel) to break the circular dependency: | ||
| * index.ts → network.ts → tunnel.ts → index.ts | ||
| * Now: tunnel.ts → native.ts (no cycle) | ||
| */ | ||
| export interface WireGuardResult { | ||
| /** "done" | "write_to_network" | "write_to_tunnel" | "error" */ | ||
| op: string; | ||
| /** Output data (if any) */ | ||
| data?: Buffer; | ||
| } | ||
| export interface KeyPair { | ||
| publicKey: string; | ||
| privateKey: string; | ||
| } | ||
| export interface WireGuardTunnelOptions { | ||
| /** Base64-encoded X25519 private key */ | ||
| privateKey: string; | ||
| /** Base64-encoded X25519 peer public key */ | ||
| peerPublicKey: string; | ||
| /** Optional base64-encoded preshared key */ | ||
| presharedKey?: string; | ||
| /** Persistent keepalive interval in seconds (0 = disabled) */ | ||
| keepalive?: number; | ||
| /** Tunnel index for session disambiguation (random if not provided) */ | ||
| index?: number; | ||
| } | ||
| /** Validate that the native addon can be loaded in the current runtime. */ | ||
| export declare function assertNativeAddonAvailable(): void; | ||
| /** Create a new WireGuard tunnel */ | ||
| export declare function createTunnel(options: WireGuardTunnelOptions): { | ||
| encrypt(src: Buffer): WireGuardResult; | ||
| decrypt(src: Buffer, srcAddr?: string | undefined | null): WireGuardResult; | ||
| tick(): WireGuardResult; | ||
| }; | ||
| /** Generate a new X25519 keypair for WireGuard */ | ||
| export declare function generateKeypair(): KeyPair; | ||
| //# sourceMappingURL=native.d.ts.map |
| "use strict"; | ||
| /** | ||
| * Native addon interface — loads the boringtun WireGuard addon via napi-rs. | ||
| * | ||
| * Separated from index.ts (barrel) to break the circular dependency: | ||
| * index.ts → network.ts → tunnel.ts → index.ts | ||
| * Now: tunnel.ts → native.ts (no cycle) | ||
| */ | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.assertNativeAddonAvailable = assertNativeAddonAvailable; | ||
| exports.createTunnel = createTunnel; | ||
| exports.generateKeypair = generateKeypair; | ||
| const path = __importStar(require("node:path")); | ||
| /** Lazy-loaded native addon */ | ||
| let _native = null; | ||
| function loadNative() { | ||
| if (_native) | ||
| return _native; | ||
| try { | ||
| // The package-root napi loader resolves the platform-specific native addon. | ||
| // The dist/ runtime must not depend on a copied dist/wireguard.node shim. | ||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||
| _native = require(path.join(__dirname, "..", "index.js")); | ||
| return _native; | ||
| } | ||
| catch (err) { | ||
| const reason = err instanceof Error ? err.message : String(err); | ||
| throw new Error(`@aria/wireguard: Failed to load native addon via ${path.join(__dirname, "..", "index.js")} (${process.platform}-${process.arch}). ${reason}`); | ||
| } | ||
| } | ||
| /** Validate that the native addon can be loaded in the current runtime. */ | ||
| function assertNativeAddonAvailable() { | ||
| loadNative(); | ||
| } | ||
| /** Create a new WireGuard tunnel */ | ||
| function createTunnel(options) { | ||
| const native = loadNative(); | ||
| return new native.WireGuardTunnel(options.privateKey, options.peerPublicKey, options.presharedKey ?? null, options.keepalive ?? 0, options.index ?? null); | ||
| } | ||
| /** Generate a new X25519 keypair for WireGuard */ | ||
| function generateKeypair() { | ||
| const native = loadNative(); | ||
| return native.generateKeypair(); | ||
| } | ||
| //# sourceMappingURL=native.js.map |
+2
-32
@@ -9,34 +9,4 @@ /** | ||
| */ | ||
| export interface WireGuardResult { | ||
| /** "done" | "write_to_network" | "write_to_tunnel" | "error" */ | ||
| op: string; | ||
| /** Output data (if any) */ | ||
| data?: Buffer; | ||
| } | ||
| export interface KeyPair { | ||
| publicKey: string; | ||
| privateKey: string; | ||
| } | ||
| export interface WireGuardTunnelOptions { | ||
| /** Base64-encoded X25519 private key */ | ||
| privateKey: string; | ||
| /** Base64-encoded X25519 peer public key */ | ||
| peerPublicKey: string; | ||
| /** Optional base64-encoded preshared key */ | ||
| presharedKey?: string; | ||
| /** Persistent keepalive interval in seconds (0 = disabled) */ | ||
| keepalive?: number; | ||
| /** Tunnel index for session disambiguation (random if not provided) */ | ||
| index?: number; | ||
| } | ||
| /** Validate that the native addon can be loaded in the current runtime. */ | ||
| export declare function assertNativeAddonAvailable(): void; | ||
| /** Create a new WireGuard tunnel */ | ||
| export declare function createTunnel(options: WireGuardTunnelOptions): { | ||
| encrypt(src: Buffer): WireGuardResult; | ||
| decrypt(src: Buffer, srcAddr?: string | undefined | null): WireGuardResult; | ||
| tick(): WireGuardResult; | ||
| }; | ||
| /** Generate a new X25519 keypair for WireGuard */ | ||
| export declare function generateKeypair(): KeyPair; | ||
| export { assertNativeAddonAvailable, createTunnel, generateKeypair } from "./native.js"; | ||
| export type { WireGuardResult, KeyPair, WireGuardTunnelOptions } from "./native.js"; | ||
| export { SecureTunnel } from "./tunnel.js"; | ||
@@ -43,0 +13,0 @@ export type { SecureTunnelOptions, TunnelStats } from "./tunnel.js"; |
+8
-69
@@ -10,72 +10,11 @@ "use strict"; | ||
| */ | ||
| var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| var desc = Object.getOwnPropertyDescriptor(m, k); | ||
| if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
| desc = { enumerable: true, get: function() { return m[k]; } }; | ||
| } | ||
| Object.defineProperty(o, k2, desc); | ||
| }) : (function(o, m, k, k2) { | ||
| if (k2 === undefined) k2 = k; | ||
| o[k2] = m[k]; | ||
| })); | ||
| var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
| Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
| }) : function(o, v) { | ||
| o["default"] = v; | ||
| }); | ||
| var __importStar = (this && this.__importStar) || (function () { | ||
| var ownKeys = function(o) { | ||
| ownKeys = Object.getOwnPropertyNames || function (o) { | ||
| var ar = []; | ||
| for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; | ||
| return ar; | ||
| }; | ||
| return ownKeys(o); | ||
| }; | ||
| return function (mod) { | ||
| if (mod && mod.__esModule) return mod; | ||
| var result = {}; | ||
| if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); | ||
| __setModuleDefault(result, mod); | ||
| return result; | ||
| }; | ||
| })(); | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| exports.DerpRelay = exports.PeerDiscoveryService = exports.ensureSecureNetwork = exports.decodeInviteToken = exports.createInviteToken = exports.generateSigningKeypair = exports.generateKeyPair = exports.PeerRegistry = exports.NetworkManager = exports.detectNatType = exports.discoverEndpoint = exports.StunClient = exports.ResilientTunnel = exports.SecureTunnel = void 0; | ||
| exports.assertNativeAddonAvailable = assertNativeAddonAvailable; | ||
| exports.createTunnel = createTunnel; | ||
| exports.generateKeypair = generateKeypair; | ||
| const path = __importStar(require("node:path")); | ||
| /** Lazy-loaded native addon */ | ||
| let _native = null; | ||
| function loadNative() { | ||
| if (_native) | ||
| return _native; | ||
| try { | ||
| // The package-root napi loader resolves the platform-specific native addon. | ||
| // The dist/ runtime must not depend on a copied dist/wireguard.node shim. | ||
| // eslint-disable-next-line @typescript-eslint/no-require-imports | ||
| _native = require("../index.js"); | ||
| return _native; | ||
| } | ||
| catch (err) { | ||
| const reason = err instanceof Error ? err.message : String(err); | ||
| throw new Error(`@aria/wireguard: Failed to load native addon via ${path.join(__dirname, "../index.js")} (${process.platform}-${process.arch}). ${reason}`); | ||
| } | ||
| } | ||
| /** Validate that the native addon can be loaded in the current runtime. */ | ||
| function assertNativeAddonAvailable() { | ||
| loadNative(); | ||
| } | ||
| /** Create a new WireGuard tunnel */ | ||
| function createTunnel(options) { | ||
| const native = loadNative(); | ||
| return new native.WireGuardTunnel(options.privateKey, options.peerPublicKey, options.presharedKey ?? null, options.keepalive ?? 0, options.index ?? null); | ||
| } | ||
| /** Generate a new X25519 keypair for WireGuard */ | ||
| function generateKeypair() { | ||
| const native = loadNative(); | ||
| return native.generateKeypair(); | ||
| } | ||
| exports.DerpRelay = exports.PeerDiscoveryService = exports.ensureSecureNetwork = exports.decodeInviteToken = exports.createInviteToken = exports.generateSigningKeypair = exports.generateKeyPair = exports.PeerRegistry = exports.NetworkManager = exports.detectNatType = exports.discoverEndpoint = exports.StunClient = exports.ResilientTunnel = exports.SecureTunnel = exports.generateKeypair = exports.createTunnel = exports.assertNativeAddonAvailable = void 0; | ||
| // Native addon interface — separated into native.ts to break circular dep: | ||
| // index.ts → network.ts → tunnel.ts → index.ts (was circular) | ||
| // index.ts → network.ts → tunnel.ts → native.ts (no cycle) | ||
| var native_js_1 = require("./native.js"); | ||
| Object.defineProperty(exports, "assertNativeAddonAvailable", { enumerable: true, get: function () { return native_js_1.assertNativeAddonAvailable; } }); | ||
| Object.defineProperty(exports, "createTunnel", { enumerable: true, get: function () { return native_js_1.createTunnel; } }); | ||
| Object.defineProperty(exports, "generateKeypair", { enumerable: true, get: function () { return native_js_1.generateKeypair; } }); | ||
| var tunnel_js_1 = require("./tunnel.js"); | ||
@@ -82,0 +21,0 @@ Object.defineProperty(exports, "SecureTunnel", { enumerable: true, get: function () { return tunnel_js_1.SecureTunnel; } }); |
+1
-1
@@ -178,3 +178,3 @@ "use strict"; | ||
| // Lazy-load the native addon | ||
| const { createTunnel } = await import("./index.js"); | ||
| const { createTunnel } = await import("./native.js"); | ||
| this.tunnel = createTunnel({ | ||
@@ -181,0 +181,0 @@ privateKey: this.options.privateKey, |
+52
-52
@@ -80,4 +80,4 @@ // prettier-ignore | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-android-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -97,4 +97,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-android-arm-eabi/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -119,4 +119,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-win32-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -136,4 +136,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-win32-x64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -154,4 +154,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-win32-ia32-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -171,4 +171,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-win32-arm64-msvc/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -191,4 +191,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-darwin-universal/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -208,4 +208,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-darwin-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -225,4 +225,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-darwin-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -246,4 +246,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-freebsd-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -263,4 +263,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-freebsd-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -285,4 +285,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-x64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -302,4 +302,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-x64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -321,4 +321,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -338,4 +338,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -357,4 +357,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm-musleabihf/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -374,4 +374,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-arm-gnueabihf/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -393,4 +393,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-loong64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -410,4 +410,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-loong64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -429,4 +429,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-riscv64-musl/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -446,4 +446,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-riscv64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -464,4 +464,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-ppc64-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -481,4 +481,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-linux-s390x-gnu/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -502,4 +502,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-arm64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -519,4 +519,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-x64/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -536,4 +536,4 @@ return binding | ||
| const bindingPackageVersion = require('@aria-cli/wireguard-openharmony-arm/package.json').version | ||
| if (bindingPackageVersion !== '1.0.62' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.62 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| if (bindingPackageVersion !== '1.0.63' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { | ||
| throw new Error(`Native binding package version mismatch, expected 1.0.63 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) | ||
| } | ||
@@ -540,0 +540,0 @@ return binding |
| { | ||
| "name": "@aria-cli/wireguard-darwin-arm64", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "os": [ | ||
@@ -5,0 +5,0 @@ "darwin" |
| { | ||
| "name": "@aria-cli/wireguard-darwin-x64", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "os": [ | ||
@@ -5,0 +5,0 @@ "darwin" |
| { | ||
| "name": "@aria-cli/wireguard-linux-arm64-gnu", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "os": [ | ||
@@ -5,0 +5,0 @@ "linux" |
| { | ||
| "name": "@aria-cli/wireguard-linux-x64-gnu", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "os": [ | ||
@@ -5,0 +5,0 @@ "linux" |
| { | ||
| "name": "@aria-cli/wireguard-win32-x64-msvc", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "os": [ | ||
@@ -5,0 +5,0 @@ "win32" |
+6
-6
| { | ||
| "name": "@aria-cli/wireguard", | ||
| "version": "1.0.62", | ||
| "version": "1.0.63", | ||
| "description": "WireGuard native addon for ARIA secure networking (boringtun via napi-rs)", | ||
@@ -64,7 +64,7 @@ "main": "dist/index.js", | ||
| "optionalDependencies": { | ||
| "@aria-cli/wireguard-darwin-arm64": "1.0.62", | ||
| "@aria-cli/wireguard-darwin-x64": "1.0.62", | ||
| "@aria-cli/wireguard-linux-x64-gnu": "1.0.62", | ||
| "@aria-cli/wireguard-linux-arm64-gnu": "1.0.62", | ||
| "@aria-cli/wireguard-win32-x64-msvc": "1.0.62" | ||
| "@aria-cli/wireguard-darwin-arm64": "1.0.63", | ||
| "@aria-cli/wireguard-darwin-x64": "1.0.63", | ||
| "@aria-cli/wireguard-linux-x64-gnu": "1.0.63", | ||
| "@aria-cli/wireguard-linux-arm64-gnu": "1.0.63", | ||
| "@aria-cli/wireguard-win32-x64-msvc": "1.0.63" | ||
| }, | ||
@@ -71,0 +71,0 @@ "files": [ |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 6 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
6662545
0.02%45
4.65%7923
0.32%87
2.35%