build: extract libutun.a from src/ + add db_sync module + etcp API, BBR improvements

- Add libutun.a (noinst) containing all src/*.c except utun.c
- utun binary now links libutun.a + libuasync.a
- tests/Makefile.am simplified: all tests link libutun.a instead of
  manual .o file lists (removed ~70 lines of boilerplate)
- Add db_sync module: distributed content-addressed DB with LMDB
  backend, peer-to-peer sync via etcp_router (svc 0x20)
- etcp API: etcp_send_in_order(), etcp_clear_inflight_queues(),
  verify_packet_signature(), BBR getters
- BBR: adaptive threshold (1/4 of pipe-min instead of hardcoded)
- route_bgp/etcp_connect: STCP transport support in NODEINFO
- conn_mgr: NODEINFO_ADDRS doc for nat_type/transport/proto fields
- Cleanup: removed AUDIT_FINDINGS.txt, filelist.txt, nat.txt
This commit is contained in:
Evgeny committed 2026-07-06 11:42:13 +03:00
1 parent 7139969acd
commit 8756f561be
23 files changed
+1508 -786

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
Структура БД:
1. table nodes - список всех известных узлов (или пользователей)
node_id
node_pubkey
last_seen
1A. ip_addr
node_id
ip_addr
port
2. table groups - список всех известных групп
group_id
group_pubkey - privkey известен суперадминам группы. соответственно админские настройки могут менять владельцы privkey.
3. table group_members - список пользователей групп
node_id
group_id
parent_node_id
parent_node_sign - приглашая узел, parent node должен сделать подпись для нового мембера. таким образом все мемберы выстраиваются в дерево (кто кого пригласил)
4. table group_actions - настройки групп и действия админов. могут менять все кому известен админский ключ.
group_id
action_name - например забанить node_id и всех вниз по дереву
action_value
node_id - опциональное поле
node_sign - подпись ключом ноды
sign - подпись ключом админа группы (всех полей выше включая node_id/sign)
5. table messages - собственно сообщения
group_id
node_id
node_sign
content_type
content
timestamp