wireshade 1.0.3 → 1.0.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.de.md +14 -0
- package/README.es.md +12 -0
- package/README.fr.md +12 -0
- package/README.md +12 -0
- package/README.zh.md +12 -0
- package/package.json +13 -4
- 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/.github/workflows/publish.yml +0 -111
- package/Cargo.lock +0 -1238
- package/Cargo.toml +0 -27
- package/build.rs +0 -5
- package/examples/01_quickstart.js +0 -36
- package/examples/02_http_request.js +0 -45
- package/examples/03_https_custom_dns.js +0 -50
- package/examples/04_tcp_socket.js +0 -52
- package/examples/05_internet_routing.js +0 -35
- package/examples/06_simple_server.js +0 -42
- package/examples/07_express_app.js +0 -39
- package/examples/08_local_forwarding.js +0 -32
- package/examples/09_reconnect_config.js +0 -131
- package/examples/10_remote_forwarding.js +0 -63
- package/examples/README.md +0 -54
- package/examples/_legacy_easy_api.js +0 -53
- package/examples/wireguard.conf +0 -8
- package/index.d.ts +0 -0
- package/src/lib.rs +0 -841
package/README.de.md
CHANGED
|
@@ -40,6 +40,16 @@ Diese Architektur bedeutet:
|
|
|
40
40
|
- **Kein Konflikt** mit bestehenden VPNs oder Systemnetzwerken.
|
|
41
41
|
- **Plattformunabhängige** Kompatibilität (Windows, macOS, Linux, **Raspberry Pi**, Docker Container) ohne Kernel-Module.
|
|
42
42
|
|
|
43
|
+
## ✅ Unterstützte Plattformen
|
|
44
|
+
|
|
45
|
+
| Plattform | Architektur | Status |
|
|
46
|
+
| :--- | :--- | :--- |
|
|
47
|
+
| **Windows** | x64 | ✅ |
|
|
48
|
+
| **macOS** | Intel & Apple Silicon | ✅ |
|
|
49
|
+
| **Linux** | x64, ARM64 | ✅ |
|
|
50
|
+
| **Raspberry Pi** | ARMv7 | ✅ |
|
|
51
|
+
| **Docker** | Alpine, Debian | ✅ |
|
|
52
|
+
|
|
43
53
|
## 📦 Installation
|
|
44
54
|
|
|
45
55
|
```bash
|
|
@@ -60,12 +70,16 @@ await client.start();
|
|
|
60
70
|
### 1. HTTP/HTTPS Requests (Client)
|
|
61
71
|
Nutze WireShade als transparenten Agent für deine Requests.
|
|
62
72
|
|
|
73
|
+
> **Hinweis zu DNS:** Du kannst eigene Hostnamen wie `internal.service` direkt in der `hosts`-Konfiguration auf IP-Adressen mappen. WireShade löst diese Namen dann automatisch während des Requests auf.
|
|
74
|
+
|
|
63
75
|
**Vereinfachte API:**
|
|
64
76
|
```javascript
|
|
65
77
|
const html = await client.get('https://internal.service/api');
|
|
66
78
|
console.log(html);
|
|
67
79
|
```
|
|
68
80
|
|
|
81
|
+
> **Hinweis zu DNS:** Du kannst eigene Hostnamen wie `internal.service` direkt in der `hosts`-Konfiguration auf IP-Adressen mappen. WireShade löst diese Namen dann automatisch während des Requests auf.
|
|
82
|
+
|
|
69
83
|
**Natives `http`/`https` Modul:**
|
|
70
84
|
```javascript
|
|
71
85
|
const https = require('https');
|
package/README.es.md
CHANGED
|
@@ -25,6 +25,16 @@ WireShade resuelve desafíos complejos de implementación de redes con una soluc
|
|
|
25
25
|
* **🔄 Reconexión Automática:** Lógica integrada para manejar caídas de conexión y cambios de red sin problemas.
|
|
26
26
|
* **⚡ Alto Rendimiento:** Impulsado por Rust y NAPI-RS para un rendimiento casi nativo.
|
|
27
27
|
|
|
28
|
+
## ✅ Plataformas Soportadas
|
|
29
|
+
|
|
30
|
+
| Plataforma | Arquitectura | Estado |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| **Windows** | x64 | ✅ |
|
|
33
|
+
| **macOS** | Intel & Apple Silicon | ✅ |
|
|
34
|
+
| **Linux** | x64, ARM64 | ✅ |
|
|
35
|
+
| **Raspberry Pi** | ARMv7 | ✅ |
|
|
36
|
+
| **Docker** | Alpine, Debian | ✅ |
|
|
37
|
+
|
|
28
38
|
## 📦 Instalación
|
|
29
39
|
|
|
30
40
|
```bash
|
|
@@ -45,6 +55,8 @@ await client.start();
|
|
|
45
55
|
### 1. Solicitudes HTTP/HTTPS (Cliente)
|
|
46
56
|
Usa WireShade como un agente transparente para tus solicitudes.
|
|
47
57
|
|
|
58
|
+
> **Nota sobre DNS:** Puedes mapear nombres de host personalizados como `internal.service` directamente a direcciones IP en la configuración de `hosts`. WireShade resolverá automáticamente estos nombres durante la solicitud.
|
|
59
|
+
|
|
48
60
|
**Módulo nativo `http`/`https`:**
|
|
49
61
|
```javascript
|
|
50
62
|
const https = require('https');
|
package/README.fr.md
CHANGED
|
@@ -25,6 +25,16 @@ WireShade résout les défis complexes d'implémentation réseau avec une soluti
|
|
|
25
25
|
* **🔄 Reconnexion Automatique :** Logique intégrée pour gérer les pertes de connexion et les changements de réseau de manière transparente.
|
|
26
26
|
* **⚡ Haute Performance :** Propulsé par Rust et NAPI-RS pour des performances quasi-natives.
|
|
27
27
|
|
|
28
|
+
## ✅ Plates-formes supportées
|
|
29
|
+
|
|
30
|
+
| Plate-forme | Architecture | Statut |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| **Windows** | x64 | ✅ |
|
|
33
|
+
| **macOS** | Intel & Apple Silicon | ✅ |
|
|
34
|
+
| **Linux** | x64, ARM64 | ✅ |
|
|
35
|
+
| **Raspberry Pi** | ARMv7 | ✅ |
|
|
36
|
+
| **Docker** | Alpine, Debian | ✅ |
|
|
37
|
+
|
|
28
38
|
## 📦 Installation
|
|
29
39
|
|
|
30
40
|
```bash
|
|
@@ -45,6 +55,8 @@ await client.start();
|
|
|
45
55
|
### 1. Requêtes HTTP/HTTPS (Client)
|
|
46
56
|
Utilisez WireShade comme un agent transparent pour vos requêtes.
|
|
47
57
|
|
|
58
|
+
> **Note sur le DNS :** Vous pouvez mapper des noms d'hôtes personnalisés comme `internal.service` directement à des adresses IP dans la configuration `hosts`. WireShade résoudra automatiquement ces noms lors de la requête.
|
|
59
|
+
|
|
48
60
|
**Module natif `http`/`https` :**
|
|
49
61
|
```javascript
|
|
50
62
|
const https = require('https');
|
package/README.md
CHANGED
|
@@ -40,6 +40,16 @@ This architecture means:
|
|
|
40
40
|
- **No conflict** with existing VPNs or system networking.
|
|
41
41
|
- **Cross-platform** compatibility (Windows, macOS, Linux, **Raspberry Pi**, Docker containers) without kernel modules.
|
|
42
42
|
|
|
43
|
+
## ✅ Supported Platforms
|
|
44
|
+
|
|
45
|
+
| Platform | Architecture | Status |
|
|
46
|
+
| :--- | :--- | :--- |
|
|
47
|
+
| **Windows** | x64 | ✅ |
|
|
48
|
+
| **macOS** | Intel & Apple Silicon | ✅ |
|
|
49
|
+
| **Linux** | x64, ARM64 | ✅ |
|
|
50
|
+
| **Raspberry Pi** | ARMv7 | ✅ |
|
|
51
|
+
| **Docker** | Alpine, Debian | ✅ |
|
|
52
|
+
|
|
43
53
|
## 📦 Installation
|
|
44
54
|
|
|
45
55
|
```bash
|
|
@@ -68,6 +78,8 @@ const html = await client.get('https://internal.service/api');
|
|
|
68
78
|
console.log(html);
|
|
69
79
|
```
|
|
70
80
|
|
|
81
|
+
> **Note on DNS:** You can map custom hostnames like `internal.service` directly to IP addresses in the `hosts` configuration. WireShade will automatically intercept and resolve these names during the request.
|
|
82
|
+
|
|
71
83
|
**Native `http`/`https` Module:**
|
|
72
84
|
```javascript
|
|
73
85
|
const https = require('https');
|
package/README.zh.md
CHANGED
|
@@ -25,6 +25,16 @@ WireShade 以干净的原生用户态解决方案解决了复杂的网络实现
|
|
|
25
25
|
* **🔄 自动重连:** 内置逻辑,可无缝处理连接断开和网络更改。
|
|
26
26
|
* **⚡ 高性能:** 由 Rust 和 NAPI-RS 提供支持,具有近乎原生的性能。
|
|
27
27
|
|
|
28
|
+
## ✅ 支持的平台
|
|
29
|
+
|
|
30
|
+
| 平台 | 架构 | 状态 |
|
|
31
|
+
| :--- | :--- | :--- |
|
|
32
|
+
| **Windows** | x64 | ✅ |
|
|
33
|
+
| **macOS** | Intel & Apple Silicon | ✅ |
|
|
34
|
+
| **Linux** | x64, ARM64 | ✅ |
|
|
35
|
+
| **Raspberry Pi** | ARMv7 | ✅ |
|
|
36
|
+
| **Docker** | Alpine, Debian | ✅ |
|
|
37
|
+
|
|
28
38
|
## 📦 安装
|
|
29
39
|
|
|
30
40
|
```bash
|
|
@@ -45,6 +55,8 @@ await client.start();
|
|
|
45
55
|
### 1. HTTP/HTTPS请求 (客户端)
|
|
46
56
|
使用 WireShade 作为请求的透明代理。
|
|
47
57
|
|
|
58
|
+
> **关于 DNS 的说明:** 您可以在 `hosts` 配置中将 `internal.service` 等自定义主机名直接映射到 IP 地址。WireShade 将在请求期间自动拦截并解析这些名称。
|
|
59
|
+
|
|
48
60
|
**原生 `http`/`https` 模块:**
|
|
49
61
|
```javascript
|
|
50
62
|
const https = require('https');
|
package/package.json
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wireshade",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"main": "index.js",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"index.js",
|
|
10
|
+
"lib",
|
|
11
|
+
"wireshade.*.node",
|
|
12
|
+
"wireshade.node",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
5
16
|
"napi": {
|
|
6
17
|
"binaryName": "wireshade",
|
|
7
18
|
"targets": [
|
|
@@ -23,9 +34,7 @@
|
|
|
23
34
|
"license": "MIT",
|
|
24
35
|
"description": "",
|
|
25
36
|
"devDependencies": {
|
|
26
|
-
"@napi-rs/cli": "^3.5.1"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
37
|
+
"@napi-rs/cli": "^3.5.1",
|
|
29
38
|
"express": "^5.2.1"
|
|
30
39
|
}
|
|
31
40
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
name: Build and Publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
tags:
|
|
8
|
-
- 'v*'
|
|
9
|
-
pull_request:
|
|
10
|
-
|
|
11
|
-
env:
|
|
12
|
-
DEBUG: 'napi:*'
|
|
13
|
-
MACOSX_DEPLOYMENT_TARGET: '10.13'
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
name: Build ${{ matrix.settings.target }}
|
|
18
|
-
runs-on: ${{ matrix.settings.host }}
|
|
19
|
-
strategy:
|
|
20
|
-
fail-fast: false
|
|
21
|
-
matrix:
|
|
22
|
-
settings:
|
|
23
|
-
- host: windows-latest
|
|
24
|
-
target: x86_64-pc-windows-msvc
|
|
25
|
-
build: npm run build
|
|
26
|
-
- host: ubuntu-latest
|
|
27
|
-
target: x86_64-unknown-linux-gnu
|
|
28
|
-
zig: true
|
|
29
|
-
build: npm run build -- --target x86_64-unknown-linux-gnu --cross-compile
|
|
30
|
-
- host: ubuntu-latest
|
|
31
|
-
target: aarch64-unknown-linux-gnu
|
|
32
|
-
zig: true
|
|
33
|
-
build: npm run build -- --target aarch64-unknown-linux-gnu --cross-compile
|
|
34
|
-
- host: ubuntu-latest
|
|
35
|
-
target: armv7-unknown-linux-gnueabihf
|
|
36
|
-
zig: true
|
|
37
|
-
build: npm run build -- --target armv7-unknown-linux-gnueabihf --cross-compile
|
|
38
|
-
- host: macos-latest
|
|
39
|
-
target: x86_64-apple-darwin
|
|
40
|
-
build: npm run build -- --target x86_64-apple-darwin
|
|
41
|
-
- host: macos-latest
|
|
42
|
-
target: aarch64-apple-darwin
|
|
43
|
-
build: npm run build -- --target aarch64-apple-darwin
|
|
44
|
-
|
|
45
|
-
steps:
|
|
46
|
-
- uses: actions/checkout@v4
|
|
47
|
-
|
|
48
|
-
- name: Setup node
|
|
49
|
-
uses: actions/setup-node@v4
|
|
50
|
-
with:
|
|
51
|
-
node-version: 20
|
|
52
|
-
cache: npm
|
|
53
|
-
|
|
54
|
-
- name: Install Rust
|
|
55
|
-
uses: dtolnay/rust-toolchain@stable
|
|
56
|
-
with:
|
|
57
|
-
toolchain: stable
|
|
58
|
-
targets: ${{ matrix.settings.target }}
|
|
59
|
-
|
|
60
|
-
- name: Install Zig
|
|
61
|
-
if: ${{ matrix.settings.zig }}
|
|
62
|
-
uses: goto-bus-stop/setup-zig@v2
|
|
63
|
-
with:
|
|
64
|
-
version: 0.13.0
|
|
65
|
-
|
|
66
|
-
- name: Install Dependencies
|
|
67
|
-
run: npm install
|
|
68
|
-
|
|
69
|
-
- name: Build
|
|
70
|
-
run: ${{ matrix.settings.build }}
|
|
71
|
-
|
|
72
|
-
- name: Upload artifacts
|
|
73
|
-
uses: actions/upload-artifact@v4
|
|
74
|
-
with:
|
|
75
|
-
name: bindings-${{ matrix.settings.target }}
|
|
76
|
-
path: wireshade.*.node
|
|
77
|
-
if-no-files-found: error
|
|
78
|
-
|
|
79
|
-
publish:
|
|
80
|
-
name: Publish to npm
|
|
81
|
-
runs-on: ubuntu-latest
|
|
82
|
-
needs: build
|
|
83
|
-
if: startsWith(github.ref, 'refs/tags/v')
|
|
84
|
-
steps:
|
|
85
|
-
- uses: actions/checkout@v4
|
|
86
|
-
|
|
87
|
-
- name: Setup node
|
|
88
|
-
uses: actions/setup-node@v4
|
|
89
|
-
with:
|
|
90
|
-
node-version: 20
|
|
91
|
-
registry-url: 'https://registry.npmjs.org'
|
|
92
|
-
|
|
93
|
-
- name: Install Dependencies
|
|
94
|
-
run: npm install
|
|
95
|
-
|
|
96
|
-
- name: Download all artifacts
|
|
97
|
-
uses: actions/download-artifact@v4
|
|
98
|
-
with:
|
|
99
|
-
path: artifacts
|
|
100
|
-
|
|
101
|
-
- name: Move artifacts
|
|
102
|
-
run: |
|
|
103
|
-
mv artifacts/bindings-*/wireshade.*.node .
|
|
104
|
-
ls -R wireshade.*.node
|
|
105
|
-
|
|
106
|
-
- name: Publish
|
|
107
|
-
env:
|
|
108
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
109
|
-
run: |
|
|
110
|
-
npm publish
|
|
111
|
-
echo "Successfully published to npm"
|