dvpn-core 0.1.4 → 0.1.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/README.md CHANGED
@@ -22,12 +22,42 @@ From the repository root:
22
22
  ```sh
23
23
  cd packages/npm
24
24
  npm pack
25
- npm install -g dvpn-core-0.1.3.tgz
25
+ npm install -g dvpn-core-0.1.6.tgz
26
+ ```
27
+
28
+ ## Install From npm
29
+
30
+ ```sh
31
+ npm install -g dvpn-core@latest
32
+ dvpn doctor
33
+ ```
34
+
35
+ The npm package ships the DVPN CLI binary. Native VPN activation still needs
36
+ operating-system WireGuard support because it creates network interfaces,
37
+ routes, firewall/NAT rules, and on Windows may install a driver.
38
+
39
+ Linux helper:
40
+
41
+ ```sh
42
+ dvpn setup linux
43
+ sudo dvpn setup linux --yes
44
+ dvpn doctor
45
+ ```
46
+
47
+ Windows helper:
48
+
49
+ ```powershell
50
+ dvpn setup windows
51
+ dvpn setup windows --yes
52
+ dvpn doctor
26
53
  ```
27
54
 
28
55
  ## Commands
29
56
 
30
57
  ```sh
58
+ dvpn doctor
59
+ dvpn setup linux
60
+ dvpn setup windows
31
61
  dvpn client relays
32
62
  dvpn client init
33
63
  dvpn client connect
@@ -39,6 +69,24 @@ dvpn node run
39
69
  dvpn node sync-peers
40
70
  dvpn node submit-accounting
41
71
  dvpn control run
72
+ dvpn crypto token
73
+ dvpn crypto declare-stake
74
+ dvpn crypto stakes
75
+ dvpn crypto create-reward-epoch
76
+ dvpn crypto rewards
77
+ ```
78
+
79
+ ## Crypto Commands
80
+
81
+ The package includes the first Solana-oriented economy commands for signed
82
+ stake declarations and deterministic reward epochs:
83
+
84
+ ```sh
85
+ dvpn crypto token
86
+ dvpn crypto declare-stake --wallet <SOLANA_WALLET> --amount-raw <RAW_TOKEN_AMOUNT>
87
+ dvpn crypto stakes
88
+ dvpn crypto create-reward-epoch --epoch-id epoch-001 --start-unix <START> --end-unix <END> --reward-per-gib-raw <RAW_AMOUNT>
89
+ dvpn crypto rewards
42
90
  ```
43
91
 
44
92
  ## Platform Notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dvpn-core",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "DVPN Core CLI for clients, relay nodes, and control plane operators.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -14,6 +14,7 @@
14
14
  ],
15
15
  "scripts": {
16
16
  "build:go": "node scripts/build-binaries.js",
17
+ "postinstall": "node scripts/postinstall.js",
17
18
  "prepack": "npm run build:go",
18
19
  "doctor": "node scripts/doctor.js"
19
20
  },
package/scripts/doctor.js CHANGED
@@ -2,32 +2,13 @@
2
2
 
3
3
  const { spawnSync } = require("node:child_process");
4
4
 
5
- const checks = [["dvpn binary", process.execPath, [require.resolve("../bin/dvpn.js"), "--version"], true]];
5
+ const result = spawnSync(process.execPath, [require.resolve("../bin/dvpn.js"), "doctor"], {
6
+ stdio: "inherit",
7
+ });
6
8
 
7
- if (process.platform === "linux") {
8
- checks.push(
9
- ["wg", "wg", ["--version"], false],
10
- ["wg-quick", "wg-quick", ["--version"], false],
11
- ["ip", "ip", ["-Version"], false],
12
- );
13
- } else if (process.platform === "win32") {
14
- checks.push(["wireguard.exe", "wireguard.exe", ["/installtunnelservice"], false]);
9
+ if (result.error) {
10
+ console.error(`Failed to run dvpn doctor: ${result.error.message}`);
11
+ process.exit(1);
15
12
  }
16
13
 
17
- let failed = false;
18
-
19
- for (const [label, command, args, required] of checks) {
20
- const result = spawnSync(command, args, { encoding: "utf8" });
21
- if (result.status === 0) {
22
- console.log(`[ok] ${label}`);
23
- } else {
24
- failed = failed || required;
25
- console.log(`[missing] ${label}${required ? "" : " (required for tunnel activation)"}`);
26
- }
27
- }
28
-
29
- if (process.platform === "win32") {
30
- console.log("Windows tunnel activation requires WireGuard for Windows or a future wireguard-nt integration.");
31
- }
32
-
33
- process.exit(failed ? 1 : 0);
14
+ process.exit(result.status ?? 1);
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ console.log("DVPN Core installed.");
4
+ console.log("Run `dvpn doctor` to verify WireGuard, networking tools, and local config.");
5
+ console.log("Linux setup helper: `dvpn setup linux --yes`");
6
+ console.log("Windows setup helper: `dvpn setup windows`");
Binary file
Binary file
Binary file
Binary file