Skip to content

feat: add download, upload and total traffic columns to connections list#2100

Merged
henrypp merged 1 commit into
henrypp:masterfrom
Tarkiin:feat/traffic-columns
Jul 22, 2026
Merged

feat: add download, upload and total traffic columns to connections list#2100
henrypp merged 1 commit into
henrypp:masterfrom
Tarkiin:feat/traffic-columns

Conversation

@Tarkiin

@Tarkiin Tarkiin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This PR adds three traffic columns to the Connections tab for TCP connections (IPv4 and IPv6):

  • ↓ Speed: Current download speed, refreshed with the network monitor.
  • ↑ Speed: Current upload speed, refreshed with the network monitor.
  • Total: Accumulated download + upload bytes since the connection was detected by simplewall.

Technical details

  1. Uses GetPerTcpConnectionEStats / SetPerTcpConnectionEStats and their IPv6 equivalents from IP Helper.
  2. Fails gracefully when TCP extended statistics are unavailable or cannot be enabled.
  3. Uses routine's _r_sys_gettickcount64 and _r_format_bytesize64 helpers.
  4. Traffic columns are numerically sortable.
  5. Adds IDS_TOTAL to resources, !example.txt, and Spanish.ini.
  6. UDP rows remain empty because Windows does not expose equivalent per-connection UDP statistics through this API.

The branch has been rewritten on top of the current master source.

image

@henrypp

henrypp commented Jun 30, 2026

Copy link
Copy Markdown
Owner

there is errors:

_r_listview_additem (hwnd, IDC_NETWORK, INT_MAX
adds item with INT_MAX which adds item to nowhere, but INT_ERROR adds to latest item

GetTickCount64
routine already have _r_sys_gettickcount64

@Tarkiin

Tarkiin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

Thank you for the review! Both issues have been fixed:

  1. INT_ERROR restored — Reverted the listview insertion index back to INT_ERROR as it was originally. Sorry for the unnecessary change.
  2. _r_sys_gettickcount64 — Replaced GetTickCount64() with _r_sys_gettickcount64() from routine.
    Both fixes are already pushed to this PR branch.

@henrypp

henrypp commented Jul 21, 2026

Copy link
Copy Markdown
Owner

now rewrite PR required! bcs a lot of changed in source, i think almost complete code rewritten

@Tarkiin
Tarkiin force-pushed the feat/traffic-columns branch from 92f5054 to ee2a86a Compare July 22, 2026 10:24
@Tarkiin

Tarkiin commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Rewritten on top of current master (42f0e61) and force-pushed as ee2a86a.

  • Resolved the conflicts in src/listview.c, src/resource.h, and src/resource.rc.
  • Kept INT_ERROR for listview insertion.
  • Uses _r_sys_gettickcount64 and routine's _r_format_bytesize64.
  • Preserved the new resource IDs from current master (IDS_TOTAL is now 280).

GitHub now reports no conflicts with the base branch.

@henrypp
henrypp merged commit 4c7facf into henrypp:master Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants