wireshade 1.0.0 → 1.0.3

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.de.md CHANGED
@@ -184,7 +184,7 @@ console.log('VPN-Nutzer können deinen Server unter http://<VPN-IP>:8080 erreich
184
184
  WireShade enthält robuste Logik für Reconnects.
185
185
 
186
186
  ```javascript
187
- const client = new WireShadeClient({
187
+ const client = new WireShade({
188
188
  wireguard: { ... },
189
189
  reconnect: {
190
190
  enabled: true,
@@ -201,7 +201,7 @@ client.on('reconnecting', (attempt) => console.log(`🔄 Verbinde neu... (${atte
201
201
  Mappe interne VPN-Hostnamen auf IP-Adressen, ohne `/etc/hosts` anzufassen.
202
202
 
203
203
  ```javascript
204
- const client = new WireShadeClient({
204
+ const client = new WireShade({
205
205
  wireguard: { ... },
206
206
  hosts: {
207
207
  'intern-api.local': '10.0.0.4',
@@ -212,7 +212,7 @@ const client = new WireShadeClient({
212
212
 
213
213
  ## 📚 API Referenz
214
214
 
215
- **`new WireShadeClient(config)`**
215
+ **`new WireShade(config)`**
216
216
  - Erstellt eine neue VPN-Instanz. `config` entspricht den Standard-WireGuard-Parametern (`privateKey`, `endpoint`, etc.).
217
217
 
218
218
  **`client.start()`**
@@ -39,6 +39,7 @@ async function exampleHttp() {
39
39
  process.exit(1);
40
40
  });
41
41
  });
42
+ gw.start().catch(console.error);
42
43
  }
43
44
 
44
45
  exampleHttp();
@@ -41,7 +41,10 @@ async function exampleHttps() {
41
41
  console.error("HTTPS Request Failed:", err);
42
42
  process.exit(1);
43
43
  });
44
+
44
45
  });
46
+
47
+ gw.start().catch(console.error);
45
48
  }
46
49
 
47
50
  exampleHttps();
@@ -45,6 +45,8 @@ async function exampleTcp() {
45
45
  console.error("Socket error:", err.message);
46
46
  });
47
47
  });
48
+
49
+ gw.start().catch(console.error);
48
50
  }
49
51
 
50
52
  exampleTcp();
@@ -28,6 +28,8 @@ async function exampleInternet() {
28
28
  process.exit(1);
29
29
  });
30
30
  });
31
+
32
+ gw.start().catch(console.error);
31
33
  }
32
34
 
33
35
  exampleInternet();
@@ -35,6 +35,8 @@ async function main() {
35
35
  });
36
36
 
37
37
  gw.on('error', console.error);
38
+
39
+ gw.start().catch(console.error);
38
40
  }
39
41
 
40
42
  main();
@@ -18,7 +18,7 @@ async function main() {
18
18
  // Create standard HTTP server (but don't listen on TCP port)
19
19
  const httpServer = http.createServer(app);
20
20
 
21
- // 2. Setup GhostWire
21
+ // 2. Setup WireShade
22
22
  const gw = new WireShade(path.join(__dirname, 'wireguard.conf'));
23
23
 
24
24
  gw.on('connect', async () => {
@@ -32,6 +32,8 @@ async function main() {
32
32
 
33
33
  console.log("✅ Express Server accessible at http://10.0.0.2:8080");
34
34
  });
35
+
36
+ gw.start().catch(console.error);
35
37
  }
36
38
 
37
39
  main();
@@ -25,6 +25,8 @@ async function examplePortForward() {
25
25
  console.error("Failed to start forwarding:", err.message);
26
26
  }
27
27
  });
28
+
29
+ gw.start().catch(console.error);
28
30
  }
29
31
 
30
32
  examplePortForward();
@@ -78,6 +78,9 @@ async function main() {
78
78
  console.log('[Health] 💓 Health check...');
79
79
  });
80
80
 
81
+ // Start connection
82
+ client.start().catch(console.error);
83
+
81
84
  // Wait for initial connection
82
85
  await new Promise(resolve => setTimeout(resolve, 4000));
83
86
 
package/lib/client.js CHANGED
@@ -461,7 +461,7 @@ class WireShadeClient extends EventEmitter {
461
461
  * Start a TCP server listener on the VPN interface
462
462
  * @param {number} port
463
463
  * @param {Function} [onConnection] - (socket) => void
464
- * @returns {Promise<GhostWireServer>}
464
+ * @returns {Promise<WireShadeServer>}
465
465
  */
466
466
  async listen(port, onConnection) {
467
467
  if (!this.gw) throw new Error("WireShade not initialized");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wireshade",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "main": "index.js",
5
5
  "napi": {
6
6
  "binaryName": "wireshade",
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file