NetCheckMonitor Network Connection Monitor (Portable Windows Edition)
===================================================================

Version 0.9.21

Interface language
- On first launch, choose Traditional Chinese or English. The choice is saved and the prompt is not shown again.
- Change the interface language later from Settings. The new language is applied the next time the app starts.
- The app no longer selects a language from the Windows system language.

Basic use
1. Run NetCheckMonitor.exe.
2. The default check interval is 60 seconds and can be changed before starting.
3. To use your own websites or IP addresses, open Settings, choose custom targets, and enter one to three targets.
4. Select Start Monitoring. While active, the button is disabled to prevent accidental interruption of a long-running test. The program continues in the system tray when minimized.
   The first failure triggers a fast retry after 5 seconds; consecutive failures confirm an outage. Prolonged outages use a lower retry frequency, but never a longer interval than the period configured on the main screen.
   The system tray icon remains visible while monitoring: green means online, red means a confirmed outage, orange means checking, and gray means paused.
   The main window shows the current adapter, connection type (wired/Wi-Fi/VPN), and Wi-Fi signal percentage. Adapter changes are stored in CSV, HTML, and PDF reports.
5. Select Pause for periods that should not count, then Resume to continue.
6. A live report can be created or a PDF downloaded without interrupting checks. Reports include all historical monitoring data that has not been cleared.
7. View Report remains available while monitoring. To finish testing, use Exit and Stop Monitoring in the lower-right corner.

Network speed tests
- Speed testing is currently a Beta feature and is available only as an optional scheduled Cloudflare test; there is no manual speed-test button on the main window. Enable it and choose Quick (up to about 25 MB), Standard (up to about 130 MB), or Full (up to about 400 MB) under Settings > Scheduled Speed Test Settings (Beta).
- Scheduled testing is disabled by default, defaults to every 24 hours, and supports 1–168 hours. It runs only while monitoring is active and not paused; missed tests are not run repeatedly after restart.
- Metered, roaming, or over-limit Windows connections are skipped by default. If explicitly allowed, every scheduled run still presents two warnings and requires confirmation.
- The speed-test settings page includes the independent HTML speed trend report plus official links to Speedtest and Chunghwa Telecom HiNet. The report covers download/upload trends, daily summaries, latency, jitter, transferred data, adapter, and Wi-Fi signal without affecting outage statistics.
- Cloudflare results may differ from Speedtest or Chunghwa Telecom because the services use different servers, routes, and measurement methods. Results are for trend and troubleshooting reference only.
- Standard and Full tests use up to eight transfer streams to reduce single-connection under-reporting on fast fiber. Cloudflare and Speedtest use different servers, routes, and calculations, so reasonable differences can remain.
- Tests are at least 15 minutes apart, and the cooldown persists across restarts. Cloudflare publishes no fixed limit for its speed-test endpoints; HTTP 403/429 triggers at least a 60-minute pause, honors a longer Retry-After, and progressively backs off up to 24 hours after repeated rejection.
8. Use Exit and Stop Monitoring in the lower-right corner so records are flushed and the final report is created before the program closes.

Event notes
- After monitoring starts, select Event Note immediately to the right of Pause in the main action row. It also remains available while monitoring is paused.
- Enter up to 500 characters or use quick entries for restarting the modem, wireless router, or computer, rain, and thunder.
- The note and save time are written immediately to the primary CSV and local recovery copy, then integrated into the Outage Events and Event Notes table. Purple markers show notes on 24-hour timelines.
- In HTML reports, hover near a connectivity or purple note marker to view its time, status, and note details.
- Event notes are troubleshooting markers only. They do not increase outage counts or change outage duration or percentage calculations.

Monitoring target settings
- Built-in mode tries the Microsoft, Google, and Cloudflare public connectivity endpoints in order.
- Custom mode accepts up to three websites or IP addresses in order; the first success marks the check online.
- Enter https://example.com/status, example.com, or an IP such as 1.1.1.1. Without a scheme, websites use HTTPS and IPs use HTTP.
- Only HTTP / HTTPS are accepted. Blank, malformed, duplicate, or credential-containing targets cannot be saved.
- Settings are stored in NetCheckMonitor.settings.json beside the executable for portability; previous AppData settings are migrated once automatically.
- Start after Windows sign-in and Start monitoring automatically when the app opens are separate options. Unfinished-session recovery is handled first.
- Startup checks for an existing NetCheckMonitor instance. A duplicate launch shows the existing window instead of starting another monitoring process.
- Settings remain available while monitoring. Target changes save the current session and report before monitoring restarts automatically; startup-option-only changes do not interrupt monitoring.
- Sleep protection and Windows shutdown/restart protection are separate options. Sleep protection is enabled by default; shutdown protection is disabled by default. When shutdown protection is enabled, use Exit and Stop Monitoring before shutting down. Forced updates, power loss, and hardware resets can still interrupt the app.
- Optional advanced layered diagnostics run only after an HTTPS failure and check the adapter, default gateway, DNS, IPv4, IPv6, HTTPS target, and Wi-Fi signal. Toggling this option while monitoring takes effect immediately without restarting the session.

Reports
- Gmail delivery and Google Drive backup outcomes are recorded in NetCheck_Delivery_<computer>-<ID>.csv with SUCCESS, FAILED, or SKIPPED status. Detail includes the action, data date, and a sanitized single-line error summary.
- Delivery logs never contain OAuth tokens or message bodies and are included by Export All Data Backup ZIP.
- CSV contains the raw check history.
- HTML is an offline cumulative graphical report built from every saved CSV that has not been cleared.
- PDF can include all saved data or a selected date range.
- Reports show daily statistics, longest/average/shortest outages, 95th-percentile and maximum latency, average latency variation, outage events, and a 24-hour timeline.
- A cumulative `_Cumulative_Live.html` report is refreshed every 10 minutes while monitoring.
- Actual monitoring sessions are accumulated separately. App-not-running, powered-off, between-session, and sessions containing no CHECK records are excluded from effective monitoring time and outage percentage.
- Daily outage percentage = confirmed outage time / effective monitoring time x 100%. Paused and interrupted periods are also excluded.
- Enabling or disabling advanced diagnostics changes only the layered evidence collected after failures. It does not change outage detection or statistics, so availability, outage duration, and percentages remain directly comparable. Reports mark failures recorded without diagnostics as "Advanced diagnostics not performed."

Google Drive backup
1. Open Settings > Google Drive Backup Settings.
2. Select Sign in to Google Drive and authorize your own account in the system browser.
3. Set the daily backup time. No Google Cloud project or credential download is required.
- NetCheckMonitor creates or reuses Drive / Net_Check, creates a child folder named after this computer, and uploads the complete PDF and raw CSV there.
- If scheduled speed testing is enabled and records exist for that day, Drive backup and the Gmail daily message also include a daily speed-test HTML report and raw speed-test CSV. Days without speed-test records still deliver the normal monitoring report.
- The app requests only drive.file access.
- Windows DPAPI encrypts the refresh token for the current Windows account.
- The program must remain running for an on-time backup.
NetCheck Viewer remote settings
- After Drive is connected, NetCheckMonitor creates NetCheck_Control.json in this computer’s backup folder.
- After Google Drive for desktop synchronizes it, Viewer can request a 10-3600 second monitoring interval and a 00:00-23:59 daily backup time.
- The monitor checks every five minutes and writes the applied values, time, and applied or rejected result back to the control file and Delivery CSV.
- The control file cannot send commands, executables, paths, or arbitrary URLs.

Gmail daily reports and recovery notifications
1. Open Settings > Gmail Report & Notification Settings.
2. Select Sign in to Gmail, sign in with your own Google account, and grant send permission.
3. Choose daily PDF/CSV reports, recovery notifications, and the daily delivery time, then save.
4. Select Send Test Email to verify delivery.
- Sender and recipient are fixed to the same signed-in account; no other recipient can be entered.
- The app requests send permission only and cannot read the Gmail mailbox.
- During a complete outage the recovery notice is encrypted locally, then sent after connectivity returns with automatic retry after temporary failures.
- Gmail and Google Drive use separate grants.

Data protection
- Every result is immediately force-flushed to disk.
- A recovery copy is stored in %LOCALAPPDATA%\NetCheck\Recovery.
- Active state is saved to %LOCALAPPDATA%\NetCheck\Monitor\active-session.json. A manual launch asks whether to resume the original CSV. When both startup options are enabled and Windows launches the app at sign-in, the session resumes automatically without confirmation.
- Time when the app was not running is marked and excluded. A normal stop removes the active-session state.
- The X button or Alt+F4 minimizes the app to the system tray instead of exiting. The first use shows a one-time reminder to exit safely with the lower-right Exit and Stop Monitoring button.
- The program prevents automatic Windows system sleep while monitoring, although the display may turn off.
- Do not unplug a USB drive containing the running program.
- Only Clear All Data in Settings resets future cumulative reports to an empty data set.

Official website and update checks
- The About page includes official-website and GitHub project links. Online Update downloads, verifies, replaces, and restarts to the latest production version from the NetCheck website.
- If the program is under a protected folder such as Program Files, Windows displays one UAC administrator-permission prompt after the update is verified. Approving it completes replacement and restart automatically.
- Active monitoring is safely preserved and resumed after the update; the updater never modifies `NetCheck_Data`.
- The official website is queried only when the button is selected; there is no background polling, and rapid repeated checks are throttled.
- Only HTTPS URLs on the official host and fixed download path are accepted. Manifest size, ZIP size, SHA-256, safe ZIP paths, internal file hashes, product name, and version must all pass validation.
- Update outcomes are recorded in `NetCheck_Data\NetCheck_Update.csv`; the current version keeps running when download or verification fails.

Requirements
- Windows 10 or Windows 11
- .NET Framework 4.8
- Microsoft Edge for PDF generation
- Internet access and a default browser for Google Drive backup

Author
Liao A-Hui (廖阿輝)
chehui@gmail.com
https://ahui3c.com
