Skip to content

feat: add gateway.trustedNetworks for ws:// over encrypted mesh networks#2

Merged
usertlm merged 25 commits intomainfrom
fix/trusted-networks-ws
Feb 28, 2026
Merged

feat: add gateway.trustedNetworks for ws:// over encrypted mesh networks#2
usertlm merged 25 commits intomainfrom
fix/trusted-networks-ws

Conversation

@usertlm
Copy link
Copy Markdown
Owner

@usertlm usertlm commented Feb 28, 2026

Summary

Add trustedNetworks config option to allow plaintext ws:// connections over trusted encrypted networks like WireGuard, Tailscale, or VPNs.

Problem

OpenClaw v2026.2.19 introduced a security check that blocks ws:// connections to non-loopback addresses. This breaks existing deployments using encrypted mesh networks (WireGuard, Tailscale) where the transport is already encrypted at the network layer.

Users are forced to use wss:// which requires:

  • Opening port 443 to the internet
  • Setting up SSL certificates
  • Or using SSH tunnels

Solution

Add gateway.trustedNetworks configuration option that specifies CIDR subnets to trust for ws:// connections:

{
  "gateway": {
    "trustedNetworks": ["100.64.0.0/10", "10.0.0.0/8"]
  }
}

This allows ws:// connections from Tailscale (100.64.0.0/10) and WireGuard (10.0.0.0/8) networks without security warnings.

Files Changed

  • src/config/types.gateway.ts: Add trustedNetworks option
  • src/gateway/net.ts: Modify isSecureWebSocketUrl to check trusted networks
  • src/gateway/client.ts: Pass trustedNetworks to security check
  • src/gateway/call.ts: Pass trustedNetworks to security check

Security

  • Default behavior unchanged (ws:// to non-loopback still blocked)
  • Only explicitly trusted networks bypass the check
  • Maintains protection against MITM attacks on untrusted networks

Closes openclaw#21192

vincentkoc and others added 25 commits February 27, 2026 07:38
* Dependencies: make @discordjs/opus an optional peer

* Dependencies: bump node-llama-cpp peer to 3.16.2

* Dependencies: pin Google auth deps to warning-free versions

* CI: reduce Dependabot cooldown to 2 days

* CI: fix invalid Dependabot npm registry config

* CI: restore Dependabot npm registry with token auth

* Dependencies: remove global Google auth pnpm overrides

* CI: make Dependabot updates daily

* Dependencies: restore optional install semantics for @discordjs/opus

* CI: keep Docker Dependabot interval weekly
…nclaw#17874)

* feat(memory-lancedb): add custom baseUrl and dimensions support

* fix(memory-lancedb): strict model typing and safe dimension resolution

* style: fix formatting in memory-lancedb config

* fix(memory-lancedb): sync manifest schema with new embedding options

---------

Co-authored-by: OpenClaw Bot <[email protected]>


Verified:
- pnpm build
- pnpm check
- pnpm test:macmini (fails in this environment at src/daemon/launchd.integration.test.ts beforeAll hook timeout; merged with Tak override)

Co-authored-by: rodrigouroz <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Land contributor PR openclaw#29032 by @maloqab with Slack native alias docs, integration tests, and changelog entry.

Co-authored-by: maloqab <[email protected]>
- Remove trailing blank line after Jonathan Taylor entry
- Escape underscore in @jlehman_ X handle

Fixes openclaw#29039
…nclaw#26050) thanks @bmendonca3

Verified:
- pnpm install --frozen-lockfile
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: bmendonca3 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
… custom provider probes (openclaw#27380)

* fix(onboard): increase verification timeout and reduce max_tokens for custom provider probes

The onboard wizard sends a chat-completion request to verify custom
providers.  With max_tokens: 1024 and a 10 s timeout, large local
models (e.g. Qwen3.5-27B on llama.cpp) routinely time out because
the server needs to load the model and generate up to 1024 tokens
before responding.

Changes:
- Raise VERIFY_TIMEOUT_MS from 10 s to 30 s
- Lower max_tokens from 1024 to 1 (verification only needs a single
  token to confirm the API is reachable and the model ID is valid)
- Add explicit stream: false to both OpenAI and Anthropic probes

Closes openclaw#27346

Made-with: Cursor

* Changelog: note custom-provider onboarding verification fix

---------

Co-authored-by: Philipp Spiess <[email protected]>
When an agent triggers a gateway restart in supervised mode, the process
exits expecting launchd KeepAlive to respawn it. But ThrottleInterval
(default 10s, or 60s on older installs) can delay or prevent restart.

Now calls triggerOpenClawRestart() to issue an explicit launchctl
kickstart before exiting, ensuring immediate respawn. Falls back to
in-process restart if kickstart fails.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
* agents: auto-discover Ollama models without API key

* tests: cover Ollama autodiscovery warning behavior
openclaw#28295) thanks @zhoulongchao77

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: zhoulongchao77 <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
…#27884) (openclaw#27928) thanks @joelnishanth

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: joelnishanth <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
…penclaw#28822)

Merged via squash.

Prepared head SHA: 83d4329
Co-authored-by: lailoo <[email protected]>
Co-authored-by: velvet-shark <[email protected]>
Reviewed-by: @velvet-shark
…I calls (openclaw#28907) thanks @Glucksberg

Verified:
- pnpm build
- pnpm check
- pnpm test:macmini

Co-authored-by: Glucksberg <[email protected]>
Co-authored-by: Tak Hoffman <[email protected]>
Add trustedNetworks config option to allow plaintext ws:// connections
over trusted encrypted networks like WireGuard, Tailscale, or VPNs.

Without this, users behind encrypted mesh networks are forced to use
wss:// which requires opening ports or setting up certificates.

Example config:
{
  gateway: {
    trustedNetworks: ["100.64.0.0/10", "10.0.0.0/8"]
  }
}

Fixes openclaw#21192
@usertlm usertlm merged commit 2d05a42 into main Feb 28, 2026
2 of 9 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.

[Feature]: Add gateway.trustedNetworks to allow ws:// over encrypted mesh networks (WireGuard/VPNs)