Добавлен group_id в etcp_router и topo_group, удалён msg_transport

- etcp_router: SVC_ROUTE_HDR (+8B), ETCP_ROUTER_CONN/TRANSIT_QUEUE хеши расширены под group_id
- Все caller'ы (proxy, routing, conn_mgr, nat, chatgui, tests) обновлены
- topo_group: глобальный реестр TOPO_NODE по node_id, ref_count=0 при создании
- BGP-обмен активируется для всех групп (а не только дефолтной)
- Протокол: group_id добавлен в WITHDRAW/TABLE_REQ/TABLE_COMPLETE/ERR_GROUP_MISMATCH
- Per-connection коллбэки заменены на instance-level conn_status
- msg_transport полностью удалён из проекта
57/57 тестов
This commit is contained in:
Evgeny committed 2026-07-22 15:51:03 +03:00
1 parent 5265783164
commit 852ce401e7
37 files changed
+375 -1125

No files matched your search

+1 -1
View File
@@ -31,7 +31,7 @@ CREATE TABLE my_nodes (
);
-- 3. nodes — известные удалённые узлы (получаем через msg_transport от utun)
-- 3. nodes — известные удалённые узлы (получаем через utun)
CREATE TABLE nodes (
node_id INTEGER PRIMARY KEY,
name TEXT,
-1
View File
@@ -89,7 +89,6 @@ set(UTUN_COMMON_SOURCES
${SRC_DIR}/transport_layer/etcp_api.c
${SRC_DIR}/transport_layer/etcp_connect.c
${SRC_DIR}/control_server.c
${SRC_DIR}/msg_transport.c
${SRC_DIR}/firewall.c
${SRC_DIR}/eim_nat.c
${SRC_DIR}/nat_transport.c
-6
View File
@@ -66,10 +66,6 @@ static const QSet<QString> TCP_PROXY_SERVER_KEYS = {
"enabled", "tcp_recv_buf"
};
static const QSet<QString> MSG_TRANSPORT_KEYS = {
"port"
};
static const QSet<QString> NETWORK_KEYS = {
"id", "pubkey", "signing_key"
};
@@ -97,7 +93,6 @@ static bool isSectionValid(const QString& section) {
if (section == "routing" || section == "route") return true;
if (section == "tcp_proxy_client") return true;
if (section == "tcp_proxy_server") return true;
if (section == "msg_transport") return true;
if (section == "ntp") return true;
return false;
}
@@ -115,7 +110,6 @@ static const QSet<QString>* keysForSection(const QString& section) {
if (section == "routing" || section == "route") return &ROUTING_KEYS;
if (section == "tcp_proxy_client") return &TCP_PROXY_CLIENT_KEYS;
if (section == "tcp_proxy_server") return &TCP_PROXY_SERVER_KEYS;
if (section == "msg_transport") return &MSG_TRANSPORT_KEYS;
if (section == "ntp") return &NTP_KEYS;
return nullptr; // [debug] — free-form, no key validation
}
+2 -1
View File
@@ -27,6 +27,7 @@ extern "C" {
#include "db_sync.h"
#include "gui_bridge.h"
#include "topo_node_sqlite.h"
#include "topo_node.h"
}
#define ETCP_RT_ID_CHAT 0x11
@@ -88,7 +89,7 @@ void UtunNode::send(uint64_t dstNodeId, const QByteArray& data) {
struct ll_entry* entry = queue_entry_new(data.size());
if (!entry) return;
memcpy(entry->data, data.constData(), data.size());
etcp_route_send(m_instance, dstNodeId, entry, 0);
etcp_route_send(m_instance, TOPO_GROUP_UTUN, dstNodeId, entry, 0);
}
QString UtunNode::nodeIdHex() const {