@serve.zone/remoteingress 4.15.0 → 4.15.2
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/dist_ts/00_commitinfo_data.js +1 -1
- package/package.json +1 -1
- package/readme.md +19 -31
- package/ts/00_commitinfo_data.ts +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/remoteingress',
|
|
6
|
-
version: '4.15.
|
|
6
|
+
version: '4.15.2',
|
|
7
7
|
description: 'Edge ingress tunnel for DcRouter - tunnels TCP and UDP traffic from the network edge to SmartProxy over TLS or QUIC, preserving client IP via PROXY protocol.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSwyQkFBMkI7SUFDakMsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLCtKQUErSjtDQUM3SyxDQUFBIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serve.zone/remoteingress",
|
|
3
|
-
"version": "4.15.
|
|
3
|
+
"version": "4.15.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Edge ingress tunnel for DcRouter - tunnels TCP and UDP traffic from the network edge to SmartProxy over TLS or QUIC, preserving client IP via PROXY protocol.",
|
|
6
6
|
"main": "dist_ts/index.js",
|
package/readme.md
CHANGED
|
@@ -17,28 +17,25 @@ pnpm install @serve.zone/remoteingress
|
|
|
17
17
|
`@serve.zone/remoteingress` uses a **Hub/Edge** topology with a high-performance Rust core and a TypeScript API surface:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
|
|
20
|
+
TLS or QUIC Tunnel
|
|
21
21
|
┌─────────────────────┐ ◄══════════════════════════► ┌─────────────────────┐
|
|
22
22
|
│ Network Edge │ TCP+TLS: frame mux │ Private Cluster │
|
|
23
|
-
│ │ QUIC: native streams
|
|
24
|
-
│ RemoteIngressEdge │ UDP: QUIC datagrams
|
|
25
|
-
│ │
|
|
26
|
-
│
|
|
27
|
-
│
|
|
28
|
-
│
|
|
29
|
-
|
|
30
|
-
│
|
|
31
|
-
│
|
|
32
|
-
|
|
33
|
-
▲ │
|
|
34
|
-
│ TCP + UDP from end users ▼
|
|
35
|
-
Internet DcRouter / SmartProxy
|
|
23
|
+
│ │ QUIC: native streams │ │
|
|
24
|
+
│ RemoteIngressEdge │ UDP: QUIC datagrams │ RemoteIngressHub │
|
|
25
|
+
│ │ │ │
|
|
26
|
+
│ • TCP/UDP listeners│ ◄─── FRAME_CONFIG pushes ─── │ • Port assignments │
|
|
27
|
+
│ • nftables firewall│ ports + firewall rules │ • Firewall config │
|
|
28
|
+
│ • Rate limiting │ at any time │ • Rate limit rules │
|
|
29
|
+
└─────────────────────┘ └─────────────────────┘
|
|
30
|
+
▲ │
|
|
31
|
+
│ TCP + UDP from end users ▼
|
|
32
|
+
Internet DcRouter / SmartProxy
|
|
36
33
|
```
|
|
37
34
|
|
|
38
35
|
| Component | Role |
|
|
39
36
|
|-----------|------|
|
|
40
|
-
| **RemoteIngressEdge** | Deployed at the network edge (VPS, cloud instance). Runs as root. Listens on TCP
|
|
41
|
-
| **RemoteIngressHub** | Deployed alongside DcRouter/SmartProxy in a private cluster. Accepts edge connections, demuxes streams/datagrams, and forwards each to SmartProxy with PROXY protocol headers so the real client IP is preserved. Pushes firewall
|
|
37
|
+
| **RemoteIngressEdge** | Deployed at the network edge (VPS, cloud instance). Runs as root. Listens on hub-assigned TCP/UDP ports, tunnels traffic to the hub, and applies hub-pushed nftables rules (IP blocking, rate limiting). All config is hot-reloadable at runtime. |
|
|
38
|
+
| **RemoteIngressHub** | Deployed alongside DcRouter/SmartProxy in a private cluster. Accepts edge connections, demuxes streams/datagrams, and forwards each to SmartProxy with PROXY protocol headers so the real client IP is preserved. Pushes all edge config (ports, firewall) via a single API. |
|
|
42
39
|
| **Rust Binary** (`remoteingress-bin`) | The performance-critical networking core. Managed via `@push.rocks/smartrust` RustBridge IPC — you never interact with it directly. Cross-compiled for `linux/amd64` and `linux/arm64`. |
|
|
43
40
|
|
|
44
41
|
### ⚡ Key Features
|
|
@@ -46,14 +43,14 @@ pnpm install @serve.zone/remoteingress
|
|
|
46
43
|
- **Dual transport** — choose between TCP+TLS (frame-multiplexed) or QUIC (native stream multiplexing, zero head-of-line blocking)
|
|
47
44
|
- **TCP + UDP tunneling** — tunnel any TCP connection or UDP datagram through the same edge/hub pair
|
|
48
45
|
- **PROXY protocol v1 & v2** — SmartProxy sees the real client IP for both TCP (v1 text) and UDP (v2 binary)
|
|
49
|
-
- **Hub-controlled firewall** — push nftables rules (IP blocking, rate limiting, custom rules)
|
|
46
|
+
- **Hub-controlled firewall** — push nftables rules (IP blocking, rate limiting, custom firewall rules) to edges as part of the same config update that assigns ports — powered by `@push.rocks/smartnftables`
|
|
50
47
|
- **Multiplexed streams** — thousands of concurrent TCP connections over a single tunnel
|
|
51
48
|
- **QUIC datagrams** — UDP traffic forwarded via QUIC unreliable datagrams for lowest possible latency
|
|
52
49
|
- **Shared-secret authentication** — edges must present valid credentials to connect
|
|
53
50
|
- **Connection tokens** — encode all connection details into a single opaque base64url string
|
|
54
51
|
- **STUN-based public IP discovery** — edges automatically discover their public IP via Cloudflare STUN
|
|
55
52
|
- **Auto-reconnect** with exponential backoff if the tunnel drops
|
|
56
|
-
- **Dynamic
|
|
53
|
+
- **Dynamic runtime configuration** — the hub pushes ports, firewall rules, and rate limits to edges at any time via a single `updateAllowedEdges()` call
|
|
57
54
|
- **Event-driven** — both Hub and Edge extend `EventEmitter` for real-time monitoring
|
|
58
55
|
- **3-tier QoS** — control frames, normal data, and sustained (elephant flow) traffic each get their own priority queue
|
|
59
56
|
- **Adaptive flow control** — per-stream windows scale with active stream count to prevent memory overuse
|
|
@@ -205,18 +202,13 @@ const data = decodeConnectionToken(token);
|
|
|
205
202
|
|
|
206
203
|
Tokens are base64url-encoded — safe for environment variables, CLI arguments, and config files.
|
|
207
204
|
|
|
208
|
-
## 🔥
|
|
205
|
+
## 🔥 Firewall Config
|
|
209
206
|
|
|
210
|
-
|
|
207
|
+
The `firewallConfig` field in `updateAllowedEdges()` works exactly like `listenPorts` — it travels in the same `FRAME_CONFIG` frame, is delivered on initial handshake and on every subsequent update, and is applied atomically at the edge using `@push.rocks/smartnftables`. Each update fully replaces the previous ruleset.
|
|
211
208
|
|
|
212
|
-
|
|
209
|
+
Since edges run as root, the rules are applied directly to the Linux kernel via nftables. If the edge isn't root or nftables is unavailable, it logs a warning and continues — the tunnel works fine, just without kernel-level firewall rules.
|
|
213
210
|
|
|
214
|
-
|
|
215
|
-
2. The config flows through the Rust binary as an opaque JSON blob via `FRAME_CONFIG`
|
|
216
|
-
3. The edge TypeScript layer receives it and applies the rules using `SmartNftables`
|
|
217
|
-
4. On each config update, all previous rules are replaced atomically (full replacement, not incremental)
|
|
218
|
-
|
|
219
|
-
### Firewall Config Structure
|
|
211
|
+
### Config Structure
|
|
220
212
|
|
|
221
213
|
```typescript
|
|
222
214
|
interface IFirewallConfig {
|
|
@@ -272,10 +264,6 @@ await hub.updateAllowedEdges([
|
|
|
272
264
|
]);
|
|
273
265
|
```
|
|
274
266
|
|
|
275
|
-
### Graceful Degradation
|
|
276
|
-
|
|
277
|
-
If the edge isn't running as root or nftables is unavailable, the SmartNftables initialization logs a warning and continues operating normally — the tunnel works fine, just without kernel-level firewall rules.
|
|
278
|
-
|
|
279
267
|
## API Reference
|
|
280
268
|
|
|
281
269
|
### `RemoteIngressHub`
|
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/remoteingress',
|
|
6
|
-
version: '4.15.
|
|
6
|
+
version: '4.15.2',
|
|
7
7
|
description: 'Edge ingress tunnel for DcRouter - tunnels TCP and UDP traffic from the network edge to SmartProxy over TLS or QUIC, preserving client IP via PROXY protocol.'
|
|
8
8
|
}
|