mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:18:28 +00:00
Gateway UX: harden remote ws guidance and onboarding defaults
This commit is contained in:
committed by
Peter Steinberger
parent
6fda04e938
commit
8a3d04c19c
@@ -42,6 +42,11 @@ export async function noteSecurityWarnings(cfg: OpenClawConfig) {
|
||||
(resolvedAuth.mode === "token" && hasToken) ||
|
||||
(resolvedAuth.mode === "password" && hasPassword);
|
||||
const bindDescriptor = `"${gatewayBind}" (${resolvedBindHost})`;
|
||||
const saferRemoteAccessLines = [
|
||||
" Safer remote access: keep bind loopback and use Tailscale Serve/Funnel or an SSH tunnel.",
|
||||
" Example tunnel: ssh -N -L 18789:127.0.0.1:18789 user@gateway-host",
|
||||
" Docs: https://docs.openclaw.ai/gateway/remote",
|
||||
];
|
||||
|
||||
if (isExposed) {
|
||||
if (!hasSharedSecret) {
|
||||
@@ -61,6 +66,7 @@ export async function noteSecurityWarnings(cfg: OpenClawConfig) {
|
||||
`- CRITICAL: Gateway bound to ${bindDescriptor} without authentication.`,
|
||||
` Anyone on your network (or internet if port-forwarded) can fully control your agent.`,
|
||||
` Fix: ${formatCliCommand("openclaw config set gateway.bind loopback")}`,
|
||||
...saferRemoteAccessLines,
|
||||
...authFixLines,
|
||||
);
|
||||
} else {
|
||||
@@ -68,6 +74,7 @@ export async function noteSecurityWarnings(cfg: OpenClawConfig) {
|
||||
warnings.push(
|
||||
`- WARNING: Gateway bound to ${bindDescriptor} (network-accessible).`,
|
||||
` Ensure your auth credentials are strong and not exposed.`,
|
||||
...saferRemoteAccessLines,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user