Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d907943ae5 | |||
| 4bfb1244fc |
@@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-03-17 - 4.8.1 - fix(remoteingress-core)
|
||||||
|
remove tunnel writer timeouts from edge and hub buffered writes
|
||||||
|
|
||||||
|
- Drops the 30 second timeout wrapper around writer.write_all and writer.flush in both edge and hub tunnel writers.
|
||||||
|
- Updates error logging to report write failures without referring to stalled writes.
|
||||||
|
|
||||||
## 2026-03-17 - 4.8.0 - feat(events)
|
## 2026-03-17 - 4.8.0 - feat(events)
|
||||||
include disconnect reasons in edge and hub management events
|
include disconnect reasons in edge and hub management events
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@serve.zone/remoteingress",
|
"name": "@serve.zone/remoteingress",
|
||||||
"version": "4.8.0",
|
"version": "4.8.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.",
|
"description": "Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.",
|
||||||
"main": "dist_ts/index.js",
|
"main": "dist_ts/index.js",
|
||||||
|
|||||||
@@ -409,18 +409,14 @@ async fn connect_to_hub_and_run(
|
|||||||
// TLS records and syscalls. Flushed after each frame to avoid holding data.
|
// TLS records and syscalls. Flushed after each frame to avoid holding data.
|
||||||
let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half);
|
let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half);
|
||||||
let mut write_error = false;
|
let mut write_error = false;
|
||||||
let write_timeout = Duration::from_secs(30);
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
biased; // control frames always take priority over data
|
biased; // control frames always take priority over data
|
||||||
ctrl = tunnel_ctrl_rx.recv() => {
|
ctrl = tunnel_ctrl_rx.recv() => {
|
||||||
match ctrl {
|
match ctrl {
|
||||||
Some(frame_data) => {
|
Some(frame_data) => {
|
||||||
let ok = tokio::time::timeout(write_timeout, async {
|
if writer.write_all(&frame_data).await.is_err() { write_error = true; break; }
|
||||||
writer.write_all(&frame_data).await?;
|
if writer.flush().await.is_err() { write_error = true; break; }
|
||||||
writer.flush().await
|
|
||||||
}).await;
|
|
||||||
if !matches!(ok, Ok(Ok(()))) { write_error = true; break; }
|
|
||||||
}
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
@@ -428,11 +424,8 @@ async fn connect_to_hub_and_run(
|
|||||||
data = tunnel_data_rx.recv() => {
|
data = tunnel_data_rx.recv() => {
|
||||||
match data {
|
match data {
|
||||||
Some(frame_data) => {
|
Some(frame_data) => {
|
||||||
let ok = tokio::time::timeout(write_timeout, async {
|
if writer.write_all(&frame_data).await.is_err() { write_error = true; break; }
|
||||||
writer.write_all(&frame_data).await?;
|
if writer.flush().await.is_err() { write_error = true; break; }
|
||||||
writer.flush().await
|
|
||||||
}).await;
|
|
||||||
if !matches!(ok, Ok(Ok(()))) { write_error = true; break; }
|
|
||||||
}
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
@@ -441,7 +434,7 @@ async fn connect_to_hub_and_run(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if write_error {
|
if write_error {
|
||||||
log::error!("Tunnel writer failed or stalled, signalling reader for fast reconnect");
|
log::error!("Tunnel writer failed, signalling reader for fast reconnect");
|
||||||
let _ = writer_dead_tx.send(());
|
let _ = writer_dead_tx.send(());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -396,18 +396,14 @@ async fn handle_edge_connection(
|
|||||||
// TLS records and syscalls. Flushed after each frame to avoid holding data.
|
// TLS records and syscalls. Flushed after each frame to avoid holding data.
|
||||||
let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half);
|
let mut writer = tokio::io::BufWriter::with_capacity(65536, write_half);
|
||||||
let mut write_error = false;
|
let mut write_error = false;
|
||||||
let write_timeout = Duration::from_secs(30);
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
biased; // control frames always take priority over data
|
biased; // control frames always take priority over data
|
||||||
ctrl = ctrl_rx.recv() => {
|
ctrl = ctrl_rx.recv() => {
|
||||||
match ctrl {
|
match ctrl {
|
||||||
Some(frame_data) => {
|
Some(frame_data) => {
|
||||||
let ok = tokio::time::timeout(write_timeout, async {
|
if writer.write_all(&frame_data).await.is_err() { write_error = true; break; }
|
||||||
writer.write_all(&frame_data).await?;
|
if writer.flush().await.is_err() { write_error = true; break; }
|
||||||
writer.flush().await
|
|
||||||
}).await;
|
|
||||||
if !matches!(ok, Ok(Ok(()))) { write_error = true; break; }
|
|
||||||
}
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
@@ -415,11 +411,8 @@ async fn handle_edge_connection(
|
|||||||
data = data_rx.recv() => {
|
data = data_rx.recv() => {
|
||||||
match data {
|
match data {
|
||||||
Some(frame_data) => {
|
Some(frame_data) => {
|
||||||
let ok = tokio::time::timeout(write_timeout, async {
|
if writer.write_all(&frame_data).await.is_err() { write_error = true; break; }
|
||||||
writer.write_all(&frame_data).await?;
|
if writer.flush().await.is_err() { write_error = true; break; }
|
||||||
writer.flush().await
|
|
||||||
}).await;
|
|
||||||
if !matches!(ok, Ok(Ok(()))) { write_error = true; break; }
|
|
||||||
}
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
@@ -428,7 +421,7 @@ async fn handle_edge_connection(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if write_error {
|
if write_error {
|
||||||
log::error!("Tunnel writer to edge failed or stalled, signalling reader for fast cleanup");
|
log::error!("Tunnel writer to edge failed, signalling reader for fast cleanup");
|
||||||
let _ = writer_dead_tx.send(());
|
let _ = writer_dead_tx.send(());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/remoteingress',
|
name: '@serve.zone/remoteingress',
|
||||||
version: '4.8.0',
|
version: '4.8.1',
|
||||||
description: 'Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.'
|
description: 'Edge ingress tunnel for DcRouter - accepts incoming TCP connections at network edge and tunnels them to DcRouter SmartProxy preserving client IP via PROXY protocol v1.'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user