| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- # Mismo .env que la versión Node (mismas variables, mismo formato).
- # NODE_ENV no aplica al binario Go (se ignora si está presente).
- PORT=3000
- STATIC_DIR=../app/dist # opcional; tiene prioridad sobre el frontend embebido
- DATA_DIR=./data
- SESSION_SECRET= # opcional; autogenerado y persistido en kv si falta
- AUTH_USER=admin
- AUTH_PASS=cambia-esto # hash bcrypt en kv tras primer login
- DEMO_MODE=0 # 1 = dataset de demostración (sin escribir en la BD)
- MAX_SSE_CLIENTS=10
- # --- Sondeo del poller (#715) ---
- # Cadencia del sondeo SSH de routers del poller, en segundos. Entero > 0.
- # Default 30 (antes 5 s hardcoded): sondeos muy frecuentes añaden carga SSH
- # visible en routers pequeños, inesperada para un monitor de solo lectura.
- NETPULSE_POLL_INTERVAL=30
- # --- Modo live ---
- # Routers: la tabla `routers` de SQLite es la fuente de verdad y nace VACÍA.
- # En el primer arranque se autodetecta la puerta de enlace (ip route + sondeo
- # SSH) y el resto se añade desde Ajustes. ROUTERS_JSON solo se usa como
- # semilla opcional si la tabla está vacía.
- # ROUTERS_JSON=[{"id":"flint2","name":"Gateway","host":"192.168.1.1","type":"glinet"},{"id":"living","host":"192.168.1.2","type":"openwrt"}]
- SSH_KEY_PATH=~/.ssh/id_ed25519
- ADGUARD_URL=http://192.168.1.1
- ADGUARD_USER=admin
- ADGUARD_PASS=
- # Interfaz(es) WireGuard a sondear (#713). "auto" (o vacío) descubre TODAS
- # las interfaces del router y agrega sus peers. Un valor explícito (una
- # interfaz o una lista separada por comas, p. ej. "wg0" o "wg0,wg1") actúa
- # como filtro y solo sondea esas interfaces.
- WG_INTERFACE=auto
- # Reverse DNS fallback for device names: a device nothing else named (no DHCP
- # hostname, reservation, alias or mDNS) takes its forward-confirmed PTR name.
- # Private and link-local addresses only. 0 = off.
- # NETPULSE_RDNS=1
- # --- Auto-rearme de agentes (Fase 6.1+) ---
- # 1 = el supervisor rearma automáticamente los agentes cuyo último push
- # expiró (TTL). Opt-in: nada autónomo sobre equipamiento de red sin
- # confirmación explícita. Cooldown entre intentos automáticos por slug.
- NETPULSE_AUTO_REARM=0
- NETPULSE_AUTO_REARM_COOLDOWN_S=600
- # Escalado del supervisor (#457): reinstalar el agente completo cuando un
- # rearme no lo recupera (p. ej. binario perdido tras un sysupgrade).
- # Requiere NETPULSE_PUBLIC_URL (URL con la que los routers alcanzan al server).
- NETPULSE_AUTO_REINSTALL=0
- #NETPULSE_AUTO_REINSTALL_COOLDOWN_S=3600
- #NETPULSE_PUBLIC_URL=http://192.168.1.226:3000
- # --- Alertas de ghost port (#419) ---
- # 1 = activa alertas "Ghost port: X went silent". Default 0 (deshabilitado)
- # porque la deteccion sigue dando falsos positivos en algunos agentes.
- GHOST_PORT_ENABLED=0
- # 1 = servidor en el propio router: la config llega de /etc/config/netpulse
- # (sección server, mismas claves en minúscula: port, data_dir, auth_pass…),
- # AUTH_PASS es opcional (primer arranque: contraseña aleatoria en logread y
- # en netpulse.server.auth_pass) y la DB usa journal DELETE (sin -wal en
- # flash). Es configuración, no compilación: el mismo binario sirve para el
- # CT (sin la variable, todo funciona exactamente como hoy).
- NETPULSE_ONBOX=0
- # --- HTTPS adicional (#696) ---
- # 1 = servimos también HTTPS en un listener propio (NETPULSE_TLS_PORT),
- # manteniendo el HTTP de PORT intacto (los agentes y el updater siguen
- # hablando HTTP; la UI/PWA puede usar HTTPS sin romper la flota). Opt-in:
- # sin la variable, el arranque es idéntico al actual. El modo on-box ya
- # sirve HTTPS en PORT y no necesita esta variable.
- NETPULSE_TLS_ENABLED=0
- NETPULSE_TLS_PORT=3443
- # Certs del usuario (opcional, ambos o ninguno): se CARGAN tal cual para
- # servir HTTPS válido (p. ej. para instalar la PWA). Si no se configuran,
- # se genera un autofirmado en DATA_DIR/cert.pem + DATA_DIR/key.pem al
- # arrancar (con el aviso del navegador, sin validez de PWA).
- #NETPULSE_TLS_CERT=/ruta/a/fullchain.pem
- #NETPULSE_TLS_KEY=/ruta/a/privkey.pem
- # --- FORK: HTTPS with the server's own private CA (docs/https.md) ---
- # Usually turned on from Settings > HTTPS, with no restart; these only
- # matter to fix it here instead. With NETPULSE_TLS_ENABLED=1 and
- # NETPULSE_TLS_CA=1 the extra listener serves a certificate signed by the
- # server's own CA (DATA_DIR/tls), which you install once on your devices;
- # the switch in Settings is then locked on.
- #NETPULSE_TLS_CA=1
- # Extra names or addresses the certificate should cover, comma-separated
- # (the host's own addresses and names are found by themselves). Only
- # private addresses and local names can be covered.
- #NETPULSE_TLS_NAMES=
- # What plain HTTP on PORT may still do: full | migrate | redirect. Set it
- # to lock the mode - and set it to "full" to get plain HTTP back if HTTPS
- # ever becomes unreachable.
- #NETPULSE_HTTP_MODE=
|