From cbb329b44b5aadba14c131af0cb863dfcb2bc018 Mon Sep 17 00:00:00 2001 From: wanjinhao1 <394959433@qq.com> Date: Sat, 10 Oct 2026 20:11:01 +0800 Subject: [PATCH 1/4] Add nodes.lan_bind_all opt-in before binding the LAN listener to 0.0.0.0 Fixes #177: the LAN device listener now binds loopback unless the new nodes.lan_bind_all flag opts into all interfaces. Exposure is surfaced as a warning in `sentient doctor` (lan listener row) and the desktop Settings Advanced section, and lan_status reports bind_all. --- .../features/settings/sections/Advanced.tsx | 11 ++++ desktop/src/lib/types.ts | 9 ++++ sentient/cli.py | 12 +++++ sentient/config/schema.py | 5 ++ sentient/nodes/lan.py | 2 +- sentient/nodes/service.py | 18 ++++++- tests/nodes/test_lan_bind.py | 50 +++++++++++++++++++ 7 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 tests/nodes/test_lan_bind.py diff --git a/desktop/src/features/settings/sections/Advanced.tsx b/desktop/src/features/settings/sections/Advanced.tsx index 31c56d185..d9a7a54dc 100644 --- a/desktop/src/features/settings/sections/Advanced.tsx +++ b/desktop/src/features/settings/sections/Advanced.tsx @@ -56,6 +56,17 @@ export function AdvancedSection({ query }: SectionProps) { {backend.state === 'ready' ? (socket === 'open' ? 'Running · live connection open' : 'Running · reconnecting') : backend.state} + {config.data?.nodes?.lan_enabled && config.data?.nodes?.lan_bind_all && ( + + + + Exposed to your network + + + )}