evgeny
367d5564e4
unify TCP_SOCKET into ETCP_SOCKET with is_tcp flag; add local+remote addr to member detail links with arrow display
2026-08-10 12:06:32 +03:00
evgeny
7eb10aaadb
move is_server indicator from per-connection to per-link in member detail and links JSON
2026-08-10 10:58:14 +03:00
evgeny
bbae170593
add server/client (S/C) indicator based on ETCP_LINK.is_server in connection monitor, member detail, and Android JSON
2026-08-10 10:47:52 +03:00
evgeny
2b27594ced
add proxy server/client indicator (S/C) in connection monitor
2026-08-10 10:30:07 +03:00
evgeny
3c0f5b2fbe
fix: MemberLinkSnap/MemberSockSnap port int→uint16_t avoids stack garbage
2026-08-10 10:03:43 +03:00
Evgeny
27aa6ac8f0
Убрал DEBUG_CATEGORY_DEBUG: сообщения разбросаны по модульным категориям (+CHAT=25, MEDIA=23)
2026-08-09 17:24:15 +03:00
evgeny
2eb7ce7c1e
etcp: переупорядочить close + защита state==2 во всех API-точках; topo: правильная очистка group nodes и registry; chat/member: новый модуль member_sync; chatgui: обновления транспорта и UI
2026-08-09 12:39:53 +03:00
evgeny
eaeb763412
e2e: AES-128-CCM encryption via BGP router (ROUTER_FLAG_ENCRYPTED), ECDH key per peer-pair from NODEINFO pubkeys, cache 8 entries
...
- etcp_router.h/c: new flag ROUTER_FLAG_ENCRYPTED (0x04), etcp_route_send_encrypted(), inflight/retrans/send_q support
- utun_instance.h: e2e_ctx_cache[8] — per-peer sc_context_t cache with derived session key
- topo_node.c: topo_node_sign_self() — single point for Ed25519 self-signing of NODEINFO
- topo_node.c: fix stale x25519_self_sig after address update (topo_node_sign_self call)
- nat_detection.c: fix stale x25519_self_sig after in-place socket meta modification
- test_etcp_router_unit: 5 E2E tests (basic round-trip, no NODEINFO drop, tampered, cache reuse, ENCRYPTED+SIGNED combined)
- builds clean, 70/70 tests pass
2026-08-09 08:19:20 +03:00
evgeny
691ec8046f
encrypt overhead fix (33→36, noencrypt_len), mtu default 1280, connmonitor window, total_decrypted for TCP, check.sh
2026-08-08 16:56:32 +03:00
evgeny
0a6fb8019f
etcp: TCP links skip remote keepalive gating; chatgui: show interface names in member detail, fix destructor callbacks
2026-08-08 07:31:38 +03:00
evgeny
60c78f318e
fix: auto_socket TCP duplicate sockets + NAT v4 address resolution
...
auto_socket.c: create_iface_tcp_socket returns stcp_server* instead of int,
ifa->v4_tcp/ifa->v6_tcp now properly track the created server, preventing
duplicate bind/listen on every reconcile_iface call.
etcp_connections.c: tcp_socket_add now resolves interface_addr via
get_interface_ip_by_index/get_interface_ipv6_addr_nl for any type (not just
PUBLIC), preventing NAT TCP v4 sockets from being destroyed due to INADDR_ANY.
2026-08-07 20:06:30 +03:00
evgeny
bc8678ae1b
cp
2026-08-07 12:21:41 +03:00
evgeny
451021b292
stcp: ed25519 pubkey exchange in handshake, fix instance destroy segfault, fix chat_tcp_test
...
- u_async.c: process immediate_queue BEFORE epoll_wait in uasync_poll
- stcp_link.c: defensive NULL etcp_conn/etcp_link in stcp_link_close
- utun_instance.c: move stcp_server_list_destroy_all to Phase J (before ETCP),
add deferred drain in both Phase J and L
- stcp.h/c: STCP_HS_ENC_CLIENT 6→38, STCP_HS_ENC_SERVER 7→39,
exchange ed25519_pubkey in both handshake directions
- etcp_connections.c: copy peer_ed25519 from STCP to ETCP_CONN in
etcp_link_enter_ready_tcp; guard link->etcp in tcp_link_close_cb
- chat_sync.c: fix lk->conn NULL dereference for TCP links
- test_stcp.c: update stcp_server_create/stcp_client_connect callsites
- tools/chat_tcp_test: change transport udp→tcp
2026-08-07 00:48:27 +03:00
evgeny
4405bc5b9e
refactor: STCP connections as ETCP links (is_tcp)
...
- Add is_tcp, tcp_link, tcp_reconnect_* fields to ETCP_LINK
- Remove transport_link from ETCP_CONN, add tcp_link_count
- stcp_link: replace embedded etcp_conn with pointer; add etcp_link backpointer
- stcp_link: link_rx_cb routes ETCP data to etcp_conn_input
- stcp_link: call on_close_cb in close
- New TCP functions: etcp_link_enter_ready_tcp, etcp_tcp_link_start_connect,
etcp_tcp_link_start_reconnect, tcp_link_close_cb, etcp_tcp_send
- etcp_link_new: handle NULL conn for TCP links; skip enter_init for TCP
- etcp_link_close: close stcp_link for TCP
- etcp_encrypt_send: redirect TCP to etcp_tcp_send (skips AES-CCM)
- tcp_server_on_link: create ETCP_LINK(is_tcp=1) + enter_ready_tcp
- etcp_connect: TCP addrs -> etcp_tcp_link_start_connect
- Remove ctx->tcp_link/tcp_ready
- test_stcp_traffic: find stcp_link via links->is_tcp instead of transport_link
- 66/68 tests pass; 2 STCP tests expected to fail (integration not complete)
2026-08-06 22:14:32 +03:00
evgeny
4e56590958
fix(chat): node online status race, WELCOME peer_needed off-by-one, JOIN missing proto byte
...
- node_put/node_update_verified: set online=1 on INSERT (nodes created when conn is UP)
- channel_peers_all: fix peer_needed calculation (atl byte was missing)
- cs_send_channel_join: add proto byte to address serialization matching all parsers
2026-08-06 01:18:27 +03:00
evgeny
d025e799ce
chatgui: clean up log — remove spam, move messages to proper categories
...
A-B: Remove gui_bridge_post_uasync_fn log, MainWindow::onMessageReceived, InputBar send text
B1: Move lifecycle messages to GENERAL (utun_node, main, mainwindow, animtimer, sound_manager, messagelist, db_manager)
B2: Move chat events to CHAT_SYNC (MSG_RECEIVED, CHANNEL_UPDATED, CHANNEL_PEERS_ONLINE, DB_READY)
B3: Move peer/connect events to MEMBER_SYNC (CONNECT_RESULT, NEW_PEER, AUTO_CONNECT, NODE_CHANGED)
C: Lower level of C-side spam (recalc, send OK, PUSH ACK, connect_channel) INFO->DEBUG
D: Fix duplicate PUSH log line in db_sync.c
E: Add debounce to CHANNEL_PEERS_ONLINE — log only on change
Misc: Remove sort=0 from ChannelList::loadChannels, improve DB_READY message
2026-08-05 12:50:27 +03:00
evgeny
d0d830dff5
add chat_sync_invite_to_channel_with_addrs — connect with addresses, send CHANNEL_INVITE, 3s timeout, post result to GUI
2026-08-04 23:14:03 +03:00
evgeny
8ebb009737
move INV button from footer into channel delegate rows (second button left of plus)
2026-08-04 22:57:36 +03:00
evgeny
5dcf1311cb
split InviteDialog into ShareInviteDialog + InviteByLinkDialog, add INV button to channel list
2026-08-04 22:42:22 +03:00
evgeny
adce967951
invitedialog: fix IPv4 byte order, show v6 prefix, add channel_id to diagnostic
2026-08-04 22:30:56 +03:00
evgeny
e96bd37004
invitedialog: show decoded link info on text change (paste), not just on Send click
2026-08-04 22:23:54 +03:00
evgeny
57850963f0
add error logging to all silent returns in chat_sync invite/join chain + GUI self-invite check
2026-08-04 22:20:01 +03:00
Evgeny
47aadae93a
media_download: fix md_mkdir_parent for Windows (drive letter, backslash), add errno to fopen errors, sanitize base_filename with WARNING
2026-08-04 19:09:46 +03:00
Evgeny
90eb961c37
chatgui: postChatSetting в хедер, chat_core_get_inst include, chat→chatserver
2026-08-04 17:28:05 +03:00
evgeny
e9d78f5cc5
1
2026-08-04 15:29:25 +03:00
evgeny
d3995b6298
desktop messagelist: decode *<b64> prefix for media message display
...
setVoiceMessageRoles now checks for '*' marker, translates URL-safe
base64 (-_ → +/) and decodes to restore original display data.
Fixes attachment filenames and voice waveform for new messages.
2026-08-03 23:17:28 +03:00
evgeny
43ac6a47e5
attachments: preview bar + combined send (Android + desktop)
...
Android: file picker → pending preview bar (name+size+X) →
combined send with text; cache copy, save dialog for downloads
Desktop: attach stores pending, preview bar before send,
combined with text in onSendClicked
C: attachment_sender.c — include filename in msg data for display
2026-08-03 22:36:33 +03:00
evgeny
9a5a38c0b3
chatgui: TCP link status via stcp_link_is_ready
2026-08-03 21:04:46 +03:00
evgeny
30eda19754
fix: invite не затирает имя узла, имя читается из member_sync peers.userinfo
...
- conn_mgr_core.c: убрана запись node_name из cm_handle_invite_info_resp
- topo_node_sqlite.c: name в nodes не перезаписывается пустой строкой
- android_jni_bridge.c: bridge_get_node_name читает peers_<ch>.userinfo если nodes.name пуст
2026-08-03 18:50:11 +03:00
evgeny
70ebde7a81
chat: user-friendly INFO logs for invite/connect flow
...
- chat_sync.c: invite entry, JOINED/TIMEOUT messages
- conn_mgr_core.c: invite start (addrs+udp+tcp), NCD UP/DOWN/TIMEOUT,
TCP connect/ready/close, membership check send/receive/confirm/deny,
overall timeout
- node_conn_direct.c: NCD event names instead of numbers
2026-08-02 20:32:01 +03:00
evgeny
d867e9160e
android: member list screen + link status dots, ipv6 autoconnect fixes
...
Android chatgui:
- New MemberListScreen with member list, detail card, edit dialog
- Link status dots (green/red/grey) per address in detail card (1s poll)
- Self-node name coloured green
- ChatScreen: people icon in TopAppBar
IPv6 autoconnect fixes (3 bugs in conn_mgr/topo):
- topo_node_sqlite_node_load: load v6 addresses from DB
- topo_node_registry_store: merge v6_addrs into existing node
- cm_sock_v6_classify: wildcard [::] treated as CM_V6_DIR
- cm_add_v6_link: htons(port) was missing
Memory fixes:
- strdup→u_strdup in bridge (7 instances)
- u_realloc cap update before success check (3 instances)
- char sql[256]→[512] for truncated SELECT
Chat member hash now includes addresses for change detection
Linux chatgui:
- Link status dots in AccountList detail panel (1s poll)
- Self-node name in green in member list
2026-08-01 23:40:58 +03:00
evgeny
42e86b728d
chatgui: IPv4+IPv6 dual-stack listen by default
...
- Default config creates [server:lan] (0.0.0.0) + [server:lan6] ([::])
- Network settings save also writes [server:lan6] section
- Sets IPV6_V6ONLY=1 on IPv6 sockets to avoid conflict with IPv4
- interface_addr for [::] bind prefers permanent IPv6 over temporary
2026-08-01 19:52:28 +03:00
evgeny
4e1641120c
voice playback: miniaudio cursor ground truth + EMA smooth decay
...
- SoundManager: add currentPcmCursor()/isCurrentPcmPlaying() via ma_sound_get_cursor_in_pcm_frames / ma_sound_is_playing
- messagedelegate: replace wall-clock position tracking with real miniaudio cursor, remove 200ms hardcoded delay
- messagedelegate: end-of-playback detection via isCurrentPcmPlaying() instead of wall-clock comparison (was killing audio ~200ms early)
- messagedelegate: EMA smoothing of displayFrac/displayElapsed (0.15 factor, 16ms timer)
- messagedelegate: timer continues after audio stops to animate EMA decay to 0 (not mouse-move dependent)
- media_delivery: download progress callback, Ed25519 sig verify, author fallback, content hash check
- conn_mgr: already-connected returns OK with callback instead of error
- chatgui: voice download-pending auto-play, file download progress bar, media bar colors
2026-07-31 00:17:03 +03:00
evgeny
b5e4a0aafa
feature: media auto-download + manual download + UI download state indication (Android + desktop)
...
C-layer:
- chat_event.h: CHAT_EVT_ATTACHMENT_DOWNLOADED (14)
- chat_msg.c: fixed md_auto_download (non-NULL done_cb, correct media_base from db_path, use chat_setting for autoload checks)
- chat_msg.c: added chat_core_attachment_download + trampoline for manual download
- chat_core.h: exported attachment_dl_req + trampoline
Android (Kotlin + JNI):
- Message: downloadState field (parse from localAttrs)
- ChatRepository: parse localAttrs for download state
- NativeLib: attachmentDownload() JNI
- MessageBubble: FileBubble with download status icon + tap-to-download
- ChatViewModel: downloadAttachment() + CHAT_EVT_ATTACHMENT_DOWNLOADED handler
- ChatScreen: wire onDownloadFile handler
- android_jni_bridge: utun_bridge_attachment_download + JNI + localAttrs in JSON
Desktop (Qt/C++):
- messagedelegate.h: MsgFileDownloadStateRole, MsgChannelIdRole
- messagelist.cpp: parse localAttrs for file download state
- messagedelegate.cpp: FileBubble with download icon/text + click handler via chat_core_attachment_download_trampoline
- gui_bridge.h: GUI_EVT_ATTACHMENT_DOWNLOADED (14) + callback typedef
- gui_bridge_impl.cpp: event dispatch + setter
- mainwindow.cpp: callback registration -> refresh message list
2026-07-30 00:01:38 +03:00
evgeny
06aaff7971
chat_settings: [chat] config section + live sync + fix test segfault
...
- New chat_setting.c/h: unified chat settings API (int/str getters)
- Config parser supports [chat] section, calls chat_setting_set per key
- chat_core exposes chat_core_set_setting / trampoline for GUI bridge
- chatgui: AudioDevice + Storage pages persist to [chat] config + live apply
- chatgui-android: ConfigProvider, NativeLib, headless handle chat settings
- MessageList: 200 msg limit, fixed saveChannelState via trampoline
- test_media_delivery_full: fix segfault at shutdown (mon() timer vs freed conns)
2026-07-29 21:18:49 +03:00
evgeny
13863563c7
feat: media_async + media_index modules, media_files table, tests
...
- media_async: thread-per-task async engine with primitives (sha256, sign, copy, uuid, file_size)
- media_index: media_files DB table with register_async for indexing chunks
- chat_msg: async media submission via register_async, simplified chat_msg_submit fields
- voice_recorder/attachment_sender: write single file (no chunk splitting on caller side)
- inputbar/messagelist: updated to new simplified submit interface
- test_media_async: 4-thread stress test (200K ops / 2 sec, 0 errors)
- test_media_index: 9 cases covering commit edge cases + async flow
- build: Makefile.am, CMakeLists.txt, utun_sources.cmake updated
2026-07-29 14:15:10 +03:00
evgeny
4f9849fab0
unify voice waveform format: base64 wf={100chars};dur={ms}; for both desktop and Android
...
- inputbar.cpp: CSV waveform → base64 log-scale (same as voice_recorder.c)
- messagelist.cpp: sendVoiceMessage removes displayName|dur_sec| prefix, uses wfStr directly
setVoiceMessageRoles: decodes new format wf={base64};dur={ms};|... from data field
- messagedelegate.cpp: waveform values now pre-normalized 0..1, no log recalculation needed
- VoiceEncoder: no changes needed (was already compatible)
Both platforms now store identical format in chat_msg_submit.data:
wf=ABCDef...100chars;dur=NNNN;|file_size|block_size|num_blocks|sigs_hex
2026-07-29 01:43:11 +03:00
evgeny
8aa5ae09bf
icons: replace emoji text with PNG resources + add media_dir debug logs
2026-07-29 01:27:23 +03:00
evgeny
0ac091e2dc
unify compressor: remove C++ duplicate audiocompressor, use lib/audio_compressor.c in chatgui
2026-07-29 00:52:05 +03:00
evgeny
51cedfadec
android: voice messages + attachments architecture plan, build fixes
2026-07-28 23:07:23 +03:00
evgeny
4f9fd2edaf
invite: add proto field (UDP/TCP/BOTH) to invite link binary format
...
Format per v4 addr: family(1) + socketId(1) + proto(1) + addr(4) + port(2) = 9 bytes (was 8)
Proto values: 0x01=UDP, 0x02=TCP, 0x03=BOTH
Affects: invite_link_c.h/c (Android), invite_link.h/cpp (desktop), chat_sync.c, conn_mgr.c, joindialog.cpp, utun_node.cpp
2026-07-28 00:34:07 +03:00
Evgeny
c61cb1e448
ffmpeg: add build script and CMake integration
2026-07-27 17:59:07 +03:00
Evgeny
1b94969955
media_blocks: fix missing QJsonArray include
2026-07-27 17:16:02 +03:00
Evgeny
bcf7df24d1
media: Ed25519-подписи блоков, local_attrs, MediaBlockReader, файловые вложения
2026-07-27 17:09:31 +03:00
Evgeny
09d870be5e
feat: voice playback delay compensation + waveform click-to-seek
2026-07-27 14:53:53 +03:00
Evgeny
0b106e2452
fix: mic test level bar dynamic color too
2026-07-27 14:25:47 +03:00
Evgeny
d9a8ddd14b
исправлены include-пути в chatgui GUI-файлах и utun_node.cpp после переноса chat в src/chat/
2026-07-27 13:35:40 +03:00
Evgeny
3b78778524
fix: level bar dynamic color — red only above 85%
2026-07-27 12:20:06 +03:00
Evgeny
9f8cd2a10e
fix: immediate compressor apply + dead code removal + qDebug→DEBUG_* conversion
2026-07-27 12:11:50 +03:00
Evgeny
3fb0134740
fix: use DEBUG_* macros instead of qDebug in AudioRecorder/AudioCompressor
2026-07-27 11:56:49 +03:00