All router connection settings are read from environment variables at runtime. There is no database-backed settings panel — values in yourDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/KevinCruz-cell/Redes-de-comunicaciones-/llms.txt
Use this file to discover all available pages before exploring further.
.env file take effect immediately on the next request.
Environment variables
The following variables control how the application connects to your router. None of them are included in.env.example by default; add them manually after copying the file.
| Variable | Default | Required | Description |
|---|---|---|---|
ROUTER_IP | 192.168.10.1 | Yes | IP address of the OpenWrt router on your local network |
ROUTER_USER | root | Yes | SSH username; OpenWrt’s default administrative account is root |
ROUTER_PASSWORD | (empty string) | Yes | SSH password configured on the router |
ROUTER_PORT | 22 | No | SSH port; change only if you have moved SSH to a non-standard port |
ROUTER_TIMEOUT | 5 | No | Seconds to wait when checking router reachability over HTTP |
SSH connection
Configuration and monitoring commands are executed over SSH using phpseclib 3. TheSystemRouterService class opens a new SSH2 connection for every request that needs to run a shell command:
SystemRouterService::exec() establishes, uses, and implicitly closes one SSH session. This is a per-request, stateless design — no persistent SSH tunnel is maintained between requests.
Commands run on the router include UCI reads and writes, /proc file reads for memory and CPU info, and standard Linux utilities (uptime, date, ip, free). No custom software needs to be installed on the router.
phpseclib is a pure-PHP SSH implementation. It does not depend on the system
ssh binary or any PHP extension beyond those already required by Laravel.HTTP authentication flow
Before any SSH commands can run, the user must authenticate through the login form. The authentication flow uses the router’s LuCI web interface rather than SSH credentials directly:Reachability check
On form submission,
RouterService::isReachable() performs an HTTP GET to http://{ROUTER_IP}/cgi-bin/luci/ with a timeout of ROUTER_TIMEOUT seconds. If the request fails or times out, the login is rejected before credentials are ever sent.LuCI credential validation
RouterService::login() posts the username and password as a form to http://{ROUTER_IP}/cgi-bin/luci. A successful login returns an HTTP 302 redirect with a Set-Cookie header containing a sysauth token.Session storage
On success, the following values are written to the PHP session:The
router_logged_in key is the gate checked by route middleware for all protected pages. The router_sysauth cookie value is stored so that subsequent requests can re-validate the LuCI session if needed.Logout
CallingPOST /logout invokes RouterLoginController::logout(), which removes all five session keys and redirects to /login:
Network requirements
- The server running this Laravel application must be on the same local network as the router.
- The default router address is
192.168.10.1. If your router uses a different address, updateROUTER_IPaccordingly. - Both SSH (port 22 by default) and HTTP (port 80, for LuCI) must be reachable from the application server.
- A direct Ethernet connection is more reliable than Wi-Fi for SSH-based management.
Next steps
Dashboard
See what live data the dashboard fetches over SSH after you are authenticated.
API reference
Explore the authentication endpoints exposed by the Laravel application.