Skip to content

Implement complete NetworkzeroMonitor application#6

Draft
Copilot wants to merge 3 commits intoAntwerpdesigns-Seed-Root-Mainfrom
copilot/complete-program-functionality
Draft

Implement complete NetworkzeroMonitor application#6
Copilot wants to merge 3 commits intoAntwerpdesigns-Seed-Root-Mainfrom
copilot/complete-program-functionality

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

The repository was a skeleton with only a README stub. This PR implements the full NetworkzeroMonitor application — a cross-platform Python network diagnostics tool branded for Ionity (Pty) Ltd.

Core engine (network_monitor.py)

  • NetworkMonitor: ping with RTT parsing, DNS resolution (dnspython + socket fallback), connectivity quality check, local network info + interface stats via psutil, per-interface traffic counters, port scanner
  • PiHoleMonitor: Pi-hole REST API integration (status / summary / top blocked); error messages sanitize auth= tokens to prevent API key leakage via urllib3 exception strings

Interfaces

  • CLI (networkzero_cli.py): 7 subcommands — ping, dns, status, ports, traffic, pihole, monitor
  • GUI (networkzero_gui.py): 7-tab Tkinter app — Dashboard, Ping, DNS Lookup, Pi-hole, Live Monitor, Port Scanner, Traffic; all network I/O runs on daemon threads

Setup & launchers

  • setup.sh / setup.bat: create venv, install dependencies
  • run_cli.sh/bat, run_gui.sh/bat: one-command launchers that guard against missing venv
  • config.ini: user-editable defaults (hosts, DNS servers, Pi-hole URL/key, window size, theme)

Tests

25 unit tests covering all public APIs; Pi-hole tests use unittest.mock so no live Pi-hole is required.

python test_networkzero.py          # run unit tests
python test_networkzero.py --demo   # manual smoke test against localhost

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.ipify.org
    • Triggering command: /usr/bin/python python test_networkzero.py (dns block)
    • Triggering command: /usr/bin/python python networkzero_cli.py status (dns block)
    • Triggering command: /usr/bin/python python test_networkzero.py --demo (dns block)
  • cloudflare.com
    • Triggering command: /usr/bin/ping ping -c 1 -W 2 cloudflare.com -j ACCEPT (dns block)
    • Triggering command: /usr/bin/ping ping -c 1 -W 2 cloudflare.com (dns block)
    • Triggering command: /usr/bin/ping ping -c 1 -W 2 cloudflare.com -j DROP (dns block)
  • github.com (HTTP Only)
    • Triggering command: REDACTED, pid is -1 (packet block)
  • google.com
    • Triggering command: /usr/bin/ping ping -c 1 -W 2 google.com (dns block)
    • Triggering command: /usr/bin/ping ping -c 1 -W 2 google.com _ _ _ _ --print-diagnostics-summary --print-metrics-summary (dns block)
  • this.host.does.not.exist.invalid
    • Triggering command: /usr/bin/ping ping -c 1 -W 1 this.host.does.not.exist.invalid (dns block)
    • Triggering command: /usr/bin/ping ping -c 1 -W 1 this.host.does.not.exist.invalid r cal/bin/git (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits April 14, 2026 10:54
- network_monitor.py: Core monitoring engine (NetworkMonitor + PiHoleMonitor)
  - Ping host with RTT parsing
  - DNS resolution with dnspython + socket fallback
  - Internet connectivity quality check
  - Local network info + interface stats via psutil
  - Per-interface traffic counters
  - Port scanner
  - Pi-hole API integration (status/summary/top blocked)

- networkzero_cli.py: Full CLI with 7 commands
  - ping, dns, status, ports, traffic, pihole, monitor

- networkzero_gui.py: Tkinter GUI with 7 tabs
  - Dashboard, Ping, DNS Lookup, Pi-hole, Live Monitor, Port Scanner, Traffic

- Supporting files: setup.sh/bat, run_cli.sh/bat, run_gui.sh/bat, config.ini
- test_networkzero.py: 25 unit tests (all passing)
- README.md: Full documentation

Agent-Logs-Url: https://github.com/AntwerpDesignsIonity/NetworkzeroMonitor/sessions/b4accdbc-220d-4921-b773-5a6231dde98e

Co-authored-by: AntwerpDesignsIonity <211600625+AntwerpDesignsIonity@users.noreply.github.com>
- network_monitor.py: Sanitize Pi-hole API error messages to redact
  auth token values that may appear in urllib3 exception strings
- config.ini: Align window size with GUI defaults (1024x720)
- networkzero_gui.py: Remove unused 'app' variable in main()
- test_networkzero.py: Test DNS fallback via public check_dns_resolution()
  instead of the private _dns_via_socket() method

Agent-Logs-Url: https://github.com/AntwerpDesignsIonity/NetworkzeroMonitor/sessions/b4accdbc-220d-4921-b773-5a6231dde98e

Co-authored-by: AntwerpDesignsIonity <211600625+AntwerpDesignsIonity@users.noreply.github.com>
Copilot AI changed the title [WIP] Complete the program functionality Implement complete NetworkzeroMonitor application Apr 14, 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