Skip to content

block new connections toggle#34

Merged
Lash-L merged 2 commits into
mainfrom
block_new_connections
May 16, 2026
Merged

block new connections toggle#34
Lash-L merged 2 commits into
mainfrom
block_new_connections

Conversation

@Lash-L
Copy link
Copy Markdown
Contributor

@Lash-L Lash-L commented May 16, 2026

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a configurable “new connections” toggle that can block new app login/onboarding flows and first-time MQTT vacuum onboarding while preserving existing auth/session functionality.

Changes:

  • Adds admin.new_connections_enabled config defaults and generated config entries.
  • Exposes the toggle in the standalone admin UI/API and auth status payload.
  • Blocks selected HTTP onboarding/login/sync routes and unknown-device MQTT onboarding candidates when disabled.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
config.example.toml Documents the new admin config setting.
src/roborock_local_server/config.py Loads new_connections_enabled into admin config.
src/roborock_local_server/configure.py Emits the new setting in generated config.
src/roborock_local_server/ha_addon.py Emits the new setting for Home Assistant add-on config.
src/roborock_local_server/server.py Adds toggle accessors, admin mutation, HTTP blocking, and MQTT proxy wiring.
src/roborock_local_server/standalone_admin.py Replaces protocol-auth UI toggle with new-connections UI/API handling.
src/roborock_local_server/bundled_backend/mqtt_tls_proxy_server/server.py Rejects onboarding MQTT candidates when the toggle is disabled.
tests/conftest.py Adds test config support for the new setting.
tests/test_admin_api.py Covers admin toggle API/UI text and onboarding blocking.
tests/test_config.py Covers config default loading.
tests/test_configure.py Covers generated config output.
tests/test_ha_addon.py Covers HA add-on generated config output.
tests/test_mqtt_tls_proxy.py Covers MQTT onboarding rejection when disabled.
tests/test_protocol_auth.py Covers login/onboarding route blocking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/roborock_local_server/server.py Outdated
@classmethod
def _new_connection_flow_for_path(cls, clean_path: str) -> str | None:
normalized = cls._normalized_path(clean_path)
if normalized in {"/region", "/nc/prepare", "/user/devices/newadd"}:
@Lash-L Lash-L merged commit dc6e62e into main May 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants