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 +3 -3
- package/examples/02_http_request.js +1 -0
- package/examples/03_https_custom_dns.js +3 -0
- package/examples/04_tcp_socket.js +2 -0
- package/examples/05_internet_routing.js +2 -0
- package/examples/06_simple_server.js +2 -0
- package/examples/07_express_app.js +3 -1
- package/examples/08_local_forwarding.js +2 -0
- package/examples/09_reconnect_config.js +3 -0
- package/lib/client.js +1 -1
- package/package.json +1 -1
- package/parallel_output.txt +0 -0
- package/wireshade.darwin-arm64.node +0 -0
- package/wireshade.darwin-x64.node +0 -0
- package/wireshade.linux-arm-gnueabihf.node +0 -0
- package/wireshade.linux-arm64-gnu.node +0 -0
- package/wireshade.linux-x64-gnu.node +0 -0
- package/wireshade.win32-x64-msvc.node +0 -0
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
|
|
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
|
|
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
|
|
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()`**
|
|
@@ -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
|
|
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();
|
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<
|
|
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
package/parallel_output.txt
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|