VIT AutoConnect signs you in · stays quiet
Documentation

VIT AutoConnect (MVP)

Windows tray app that detects the VIT Wi-Fi captive portal and logs you in automatically, using credentials stored via Windows DPAPI. Implements the PRD's MVP scope (sections 1–14).

Using it

  1. Run VITAutoConnect.exe. Nothing to install — it is self-contained.
  2. Enter your VIT ID and password once in the setup screen, then Save & Connect.
  3. It sits in the system tray. When you join VIT Wi-Fi and the portal gets in the way, it signs you in — no browser, no typing.

Right-click the tray icon for Connect / Retry, Settings, and View log. "Start with Windows" is on by default and can be turned off in Settings.

You do not need to configure a portal address. The app reads the login page off the portal itself at the moment it intercepts you — that is how it learns the endpoint, the field names, and the hidden session fields your campus appliance requires.

Requirements to build

dotnet build -c Release
      dotnet run
      

There are no external NuGet dependencies — DPAPI is called directly via P/Invoke instead of the System.Security.Cryptography.ProtectedData package, so dotnet restore works fully offline.

Tests

tests/PortalTests stands up a real HTTP server that behaves like a captive portal (302-to-login, login page substituted inline, meta-refresh splash, session cookies, hidden fields, wrong-password rejection) and drives the real discovery and authentication code against it:

cd tests/PortalTests
      dotnet run
      

40 checks, exit code 0 when they all pass. This runs on any OS — the portal logic is deliberately free of Windows dependencies so it can be tested away from campus.

How it decides what to do

Step File
FR-1 Tray app App/TrayController.cs
FR-2 Network detection Network/NetworkMonitor.cs
FR-3 VIT network ID Network/VITNetworkDetector.cs, Network/WlanInterop.cs
FR-4 Captive portal detection Network/ConnectivityChecker.cs
FR-5 Portal discovery + auth Auth/PortalDiscovery.cs, Auth/VITAuthenticator.cs
FR-6 Verification TrayController.AuthenticateAsync (re-probes after login)
FR-7 Retry strategy Auth/AuthRetryPolicy.cs
FR-8 Credential storage Security/CredentialStore.cs, Security/Dpapi.cs
FR-9 Manual control Tray menu "Connect / Retry"
FR-10 Logging Diagnostics/AppLogger.cs
Setup / Settings UI UI/SetupWindow.cs, UI/SettingsWindow.cs
Start with Windows App/StartupManager.cs

If it doesn't sign you in

The tray tooltip says what it is doing, and View log has the detail. The app is deliberately honest about why it is not acting, so a network it won't touch is never a silent hang:

What is not verified

The portal and authentication paths are covered by the tests above. The Windows-only pieces — reading the SSID through wlanapi.dll (Network/WlanInterop.cs), DPAPI credential encryption, the tray icon, and "Start with Windows" — are compiled but cannot be executed on the Linux host that builds this release. The WLAN struct offsets were re-checked by hand against the Windows SDK layout (WLAN_CONNECTION_ATTRIBUTES: 4-byte state + 4-byte mode + 512-byte profile name, so the SSID sits at offset 520), and the read now retries transient failures and logs each Win32 error code. But first run on a real laptop is still the real test — if the tray says it can't identify the network, the log now names the exact failing WLAN call.

Security notes

Built on Helstify