feat: add tailnet and auto bind mode support

OpenClaw natively supports 'tailnet' and 'auto' bind modes but the
addon rejected them in oc_config_helper.py validation and the config.yaml
schema didn't list them as valid options.

- oc_config_helper.py: expand bind_mode validation to accept 'tailnet'
  and 'auto' in addition to 'loopback' and 'lan'
- config.yaml: add 'tailnet' and 'auto' to schema and document them
  in the options comments

Users running Tailscale as a separate HA addon (non-userspace mode)
can now set gateway_bind_mode: tailnet to restrict gateway access
exclusively to their Tailscale network — no iptables rules needed.

Closes #59
This commit is contained in:
Nathan Guenther
2026-02-20 11:44:43 -05:00
parent 13417f4439
commit adbfcfee72
2 changed files with 8 additions and 6 deletions
+4 -2
View File
@@ -57,8 +57,10 @@ options:
gateway_mode: local
# Gateway network bind mode:
# - loopback: bind to 127.0.0.1 only (local access only, more secure)
# - loopback: bind to 127.0.0.1 only (local access only, most secure)
# - lan: bind to all interfaces (accessible from local network)
# - tailnet: bind to Tailscale IP only (accessible only via Tailscale — recommended for remote access)
# - auto: prefer loopback; use tailnet if Tailscale is available
# Default is loopback for security.
gateway_bind_mode: loopback
@@ -95,7 +97,7 @@ schema:
clean_session_locks_on_start: bool?
clean_session_locks_on_exit: bool?
gateway_mode: list(local|remote)?
gateway_bind_mode: list(loopback|lan)?
gateway_bind_mode: list(loopback|lan|tailnet|auto)?
gateway_port: int(1,65535)?
enable_openai_api: bool?
allow_insecure_auth: bool?