Multi-Router Support
Save credentials for multiple routers and switch between them seamlessly.
WRTune supports managing multiple OpenWRT routers from a single app. Each routerโs data is fully isolated.
Saving Routers ๐
When logging in, enable the โSave credentialโ checkbox (enabled by default). Your router is added to the saved routers list.
The login page shows a dropdown (โผ) on the IP field to access saved routers, or tap the lock icon on the password field.
Saved Routers Sheet ๐
From the login page:
- Tap a saved router โ Auto-fills the form and connects with stored credentials
- Swipe left to remove โ Shows confirmation dialog, then cascade-deletes all data for that router
Router Switcher ๐
From the dashboard (tap the logout/power button):
- Shows the currently connected router plus other saved routers
- Tap another router โ Switches to it with auto-login using stored credentials
- Logout โ Clears the current session, returns to login, keeps saved routers
- Remove โ Cascade-deletes all data for that router
Data Isolation ๐
Every per-router setting uses a {ip}_ prefix in SharedPreferences and FlutterSecureStorage. This means:
- Passwords, session tokens, and credentials are scoped per router
- Client caches, feature preferences, and settings donโt mix between routers
- Removing a router via cascade delete removes all 25+ child keys in one operation
Key Scoping Examples ๐
| Key Pattern | Purpose |
|---|---|
{ip}_router_username | SSH/HTTP username |
{ip}_router_password | SSH/HTTP password (SecureStorage) |
{ip}_last_connected | Last login timestamp |
{ip}_show_statistics | Statistics tab visibility |
{ip}_adh_enabled | AdGuard Home toggle |
nlbwmon_installed_{ip} | nlbwmon capability cache |
wrtune_wol_recent_{ip} | Recent WOL MACs |
Legacy Migration ๐
If you upgraded from an older single-router version, WRTune runs a silent migration:
- Reads old unscoped keys (e.g.,
router_ip,router_password) - Copies values to new scoped keys (
{old_ip}_*) - Sets
saved_router_ips = [old_ip],active_router_ip = old_ip - Deletes old unscoped keys
Your router data is preserved and you start fresh with multi-router support enabled.