Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiFlow

WiFlow

Auto-joins your Wi-Fi and signs you through a SonicWall captive portal — so you don't have to.

License: MIT Platform Electron

WiFlow is a cross-platform (macOS + Windows) Electron desktop app that joins a Wi-Fi network and logs into a SonicWall captive portal automatically. The login runs inside Electron's own browser window, so there's no Playwright or separate Chromium to install — it's the lightweight successor to the original Python login.py tool.

Features

  • Multiple connection profiles — store Wi-Fi SSID + password, firewall username + password, and the login URL per profile in a local SQLite DB. Add, edit, and delete from the sidebar.
  • One-click connectConnect Now runs the whole flow in order:
    1. Ensure you're on the profile's Wi-Fi — checks the current SSID (or, when macOS hides it, whether the firewall is reachable) and joins the network if needed. It switches you onto the right Wi-Fi even if another network already has internet.
    2. Probe internet — if you're already online, it stops.
    3. Captive-portal login — fills the SonicUI form and submits it.
  • Editable login URL — defaults to https://192.168.0.1/sonicui/7/login/#/.
  • Cross-platform Wi-Fi joinnetworksetup on macOS, a WPA2-PSK netsh profile on Windows.

Install

Pre-built installers aren't published yet — build from source (see Build installers) or run in dev mode (see Develop).

On macOS, opening the .dmg shows the usual install window — drag WiFlow onto the Applications shortcut, then eject the disk image.

Note: unsigned builds trigger Gatekeeper on macOS and SmartScreen on Windows. See Notes for how to open them, or add a signing certificate for frictionless distribution.

Develop

npm install      # also rebuilds better-sqlite3 for Electron (postinstall)
npm start        # run in dev

Test only the Wi-Fi join, without Electron or the login flow:

node src/main/try-wifi.js "<SSID>" "<password>" [waitSeconds]

Build installers

Native modules don't cross-compile — build each target on its own OS (or in CI):

npm run dist:mac   # -> dist/*.dmg          (run on macOS)
npm run dist:win   # -> dist/*-setup.exe     (run on Windows)

The mac build matches the build machine's architecture (e.g. arm64). For a build that also runs on Intel Macs, append -- --universal.

The DMG install window's artwork lives at build/background.png (+ @2x) and is committed, so building needs no extra tooling. To change it, edit and rerun build/make-dmg-background.sh (needs ImageMagick) — its geometry must stay in sync with the dmg block in electron-builder.yml.

How the captive-portal login works

The SonicUI login is driven in a visible Electron BrowserWindow. A hidden or background window gets throttled by Chromium and stalls the single-page app — the headed Python login.py is the working reference. The window opens during login and closes once internet is confirmed. An injected script fills the username/password fields and fires a full mouse-event click on the real login button.

Data & configuration

  • Profiles are stored in a SQLite DB (firewall.db) in Electron's per-user userData directory.
  • Passwords are stored as plaintext (no OS keychain, so no macOS "Safe Storage" prompt). See Security for the threat model.

Security

WiFlow stores connection passwords as plaintext in the local SQLite DB. There is no OS-keychain or safeStorage encryption.

Threat model: this is a single-user, local-machine convenience tool. Anyone with read access to your user account's files can read the stored passwords. That trade-off is intentional — it avoids a keychain prompt on every launch — but you should be aware of it:

  • Don't run WiFlow on a shared or untrusted machine.
  • Use it only for credentials you're comfortable storing unencrypted at rest.
  • The DB never leaves your machine and passwords are never sent to the renderer process; they're used only by the main process during the connect flow.

Found a vulnerability? Please open an issue (or contact the maintainer privately for anything sensitive) rather than disclosing it publicly.

Notes

  • Unsigned builds trigger Gatekeeper (macOS: right-click → Open the first time, or xattr -dr com.apple.quarantine "<App>.app") and SmartScreen (Windows). Add an Apple Developer ID / code-signing cert for frictionless distribution.
  • macOS SSID detection needs Location Services. Without it, the app falls back to firewall reachability, so the connect flow still works. If your Mac keeps auto-switching off the target network, raise its priority (or "Forget" the competing network) in System Settings → Wi-Fi.
  • DevTools are disabled (webPreferences.devTools = false). Remove that line in src/main/index.js to re-enable them for debugging.
  • Windows Wi-Fi uses a WPA2-PSK netsh profile; WPA3/enterprise networks need a different profile template.
  • Requires macOS 10.15+ (Electron 31 minimum).

Contributing

Issues and pull requests are welcome. For larger changes, please open an issue first to discuss what you'd like to change.

Author

Built by @jasim-k.

License

MIT — current version: 1.0.0

About

Cross-platform desktop app that auto-joins Wi-Fi and signs you through a SonicWall captive portal.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages