Skip to content

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

Open
Tarkiin wants to merge 2 commits into
henrypp:masterfrom
Tarkiin:feat/traffic-columns
Open

feat: add download, upload and total traffic columns to connections list#2100
Tarkiin wants to merge 2 commits into
henrypp:masterfrom
Tarkiin:feat/traffic-columns

Conversation

@Tarkiin

@Tarkiin Tarkiin commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This PR implements three new columns in the Connections tab to measure network traffic for TCP connections (IPv4 and IPv6):

  • ↓ Speed: Current download speed (updated every 3 seconds).
  • ↑ Speed: Current upload speed (updated every 3 seconds).
  • Total: Accumulated bytes (download + upload) transferred since the connection was detected by simplewall.

Technical details:

  1. TCP Traffic Measurement: Uses GetPerTcpConnectionEStats / SetPerTcpConnectionEStats APIs from IP Helper.
  2. Robustness: If the connection stats API fails or lacks administrator privileges, it fails gracefully without crashes, leaving values at zero or empty.
  3. Format & Sorting: Numbers are automatically formatted (B, KB, MB, GB, TB) and fully sortable.
  4. Localization: Added IDS_TOTAL string key to resources, !example.txt template, and Spanish.ini.
  5. UDP Support: UDP connections show empty fields due to lack of native per-connection stats in Windows without complex ETW/WFP overhead.
  6. Routine Compatibility: Adjusted item insertion in the ListView to INT_MAX for broader compatibility with different versions of the routine library.
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.

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