@serve.zone/remoteingress 4.15.0 → 4.15.1

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.
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/remoteingress',
6
- version: '4.15.0',
6
+ version: '4.15.1',
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.0",
3
+ "version": "4.15.1",
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
@@ -20,25 +20,22 @@ pnpm install @serve.zone/remoteingress
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 │ RemoteIngressHub │
25
- │ │ │ │
26
- Accepts TCP & UDP Forwards to
27
- on hub-assigned SmartProxy on
28
- ports local ports
29
- │ │ │ │
30
- 🔥 nftables rules │ ◄── firewall config pushed ── │ Configures edge │
31
- applied locally │ via FRAME_CONFIG │ firewalls remotely
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 and UDP ports assigned by the hub, accepts connections/datagrams, and tunnels them to the hub. Applies nftables firewall rules pushed by the hub for IP blocking and rate limiting. Ports and firewall config are hot-reloadable at runtime. |
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 configuration to edges. |
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) from the hub to edges via `@push.rocks/smartnftables`
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 port configuration** — the hub assigns TCP and UDP listen ports per edge, hot-reloadable at runtime
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
- ## 🔥 Hub-Controlled Firewall
205
+ ## 🔥 Firewall Config
209
206
 
210
- Edges run as root and use `@push.rocks/smartnftables` to apply nftables rules pushed from the hub. This gives you centralized control over network-level security at every edge node.
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
- ### How It Works
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
- 1. The hub includes `firewallConfig` when calling `updateAllowedEdges()`
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`
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/remoteingress',
6
- version: '4.15.0',
6
+ version: '4.15.1',
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
  }