tcp_proxy: fix throughput (tx_queue backpressure) + connect timeout + integration test

- Router: unified service delivery format [svc_id][src][dst][payload] (end-to-end src/dst from SVC_ROUTE header)
- tcp_proxy_client: replace single tx_buf drop-on-backpressure with bounded tx_queue + send_q waiter + retry timer (no data loss, bulk window reopen — removes 62.5ms delayed-ACK stall)
- tcp_io: configurable connect timeout (tcp_conn_set_connect_timeout)
- tcp_proxy_server: connect_timeout config option (ms, default 2000, 0=off)
- check.sh: run tcp_proxy_full integration test with sudo (skip if passwordless sudo unavailable)
- test_tcp_io: connect timeout unit test; docs (lwip_nuances.md)
This commit is contained in:
evgeny committed 2026-09-03 13:49:09 +03:00
1 parent acfaae2801
commit f47ad7d87f
36 files changed
+758 -269

No files matched your search

+4 -3
View File
@@ -250,9 +250,10 @@ QList<NodeAddr> UtunNode::getInviteAddresses(DbManager* db) {
}
void UtunNode::recvCallback(struct ETCP_CONN* conn, struct ll_entry* entry) {
if (!g_currentNode || !entry) return;
uint64_t src = conn ? conn->peer_node_id : 0;
QByteArray data((const char*)entry->data, (int)(entry->len ? entry->len : 0));
if (!g_currentNode || !entry || !entry->dgram || entry->len < ROUTER_SVC_HDR_SIZE) return;
uint64_t src;
memcpy(&src, entry->dgram + ROUTER_SVC_SRC_OFF, 8);
QByteArray data((const char*)(entry->dgram + ROUTER_SVC_PAYLOAD_OFF), (int)(entry->len - ROUTER_SVC_PAYLOAD_OFF));
QMetaObject::invokeMethod(g_currentNode, [=] {
emit g_currentNode->messageReceived(src, data);
}, Qt::QueuedConnection);