Skip to content

Add local TCP/UDP probe listener and MTR pass/fail reporting#19

Merged
ehsanking merged 1 commit intomainfrom
ehsan/create-tcp/udp-connectivity-listener
Apr 2, 2026
Merged

Add local TCP/UDP probe listener and MTR pass/fail reporting#19
ehsanking merged 1 commit intomainfrom
ehsan/create-tcp/udp-connectivity-listener

Conversation

@ehsanking
Copy link
Copy Markdown
Owner

Motivation

  • Provide a minimal, dependency-free listener that can be enabled on an Iran-hosted server to verify TCP/UDP reachability without requiring internet egress or extra packages.
  • Make test results easier for non-technical users by showing MTR as a clear pass/fail (tick/cross) with loss% instead of relying on an opaque numeric score.

Description

  • Added a new CLI command listener that starts a local TCP and/or UDP echo probe using Node built-ins (net and dgram) and is configurable via --host, --port, and --protocol.
  • Integrated an MTR stage into the connectivity checks (mtrAvailable, mtrLossPercent, mtrRawSample, and stageResults.mtr) by invoking mtr when present and mapping loss to pass/fail/no-data/unavailable.
  • Updated detailed CLI reporting to display MTR as a check/ cross plus loss% for provider best-connections and per-connection details, replacing the user-facing provider score line with the MTR result for clarity.
  • No new dependencies were introduced and existing scoring/behaviour remain intact for other programmatic outputs.

Testing

  • Ran the automated test suite with npm test and all tests passed (6 tests, 0 failures).

Codex Task

@ehsanking ehsanking merged commit d962856 into main Apr 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant