mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 23:02:02 +03:00
refactor: route browser control via gateway/node
This commit is contained in:
@@ -279,7 +279,6 @@ const FIELD_LABELS: Record<string, string> = {
|
||||
"ui.seamColor": "Accent Color",
|
||||
"ui.assistant.name": "Assistant Name",
|
||||
"ui.assistant.avatar": "Assistant Avatar",
|
||||
"browser.controlUrl": "Browser Control URL",
|
||||
"browser.snapshotDefaults": "Browser Snapshot Defaults",
|
||||
"browser.snapshotDefaults.mode": "Browser Snapshot Mode",
|
||||
"browser.remoteCdpTimeoutMs": "Remote CDP Timeout (ms)",
|
||||
|
||||
@@ -14,16 +14,7 @@ export type BrowserSnapshotDefaults = {
|
||||
};
|
||||
export type BrowserConfig = {
|
||||
enabled?: boolean;
|
||||
/** Base URL of the clawd browser control server. Default: http://127.0.0.1:18791 */
|
||||
controlUrl?: string;
|
||||
/**
|
||||
* Shared token for the browser control server.
|
||||
* If set, clients must send `Authorization: Bearer <token>`.
|
||||
*
|
||||
* Prefer `CLAWDBOT_BROWSER_CONTROL_TOKEN` env for ephemeral setups; use this for "works after reboot".
|
||||
*/
|
||||
controlToken?: string;
|
||||
/** Base URL of the CDP endpoint. Default: controlUrl with port + 1. */
|
||||
/** Base URL of the CDP endpoint (for remote browsers). Default: loopback CDP on the derived port. */
|
||||
cdpUrl?: string;
|
||||
/** Remote CDP HTTP timeout (ms). Default: 1500. */
|
||||
remoteCdpTimeoutMs?: number;
|
||||
|
||||
@@ -58,21 +58,6 @@ export type SandboxBrowserSettings = {
|
||||
* Default: false.
|
||||
*/
|
||||
allowHostControl?: boolean;
|
||||
/**
|
||||
* Allowlist of exact control URLs for target="custom".
|
||||
* When set, any custom controlUrl must match this list.
|
||||
*/
|
||||
allowedControlUrls?: string[];
|
||||
/**
|
||||
* Allowlist of hostnames for control URLs (hostname only, no ports).
|
||||
* When set, controlUrl hostname must match.
|
||||
*/
|
||||
allowedControlHosts?: string[];
|
||||
/**
|
||||
* Allowlist of ports for control URLs.
|
||||
* When set, controlUrl port must match (defaults: http=80, https=443).
|
||||
*/
|
||||
allowedControlPorts?: number[];
|
||||
/**
|
||||
* When true (default), sandboxed browser control will try to start/reattach to
|
||||
* the sandbox browser container when a tool call needs it.
|
||||
|
||||
@@ -130,9 +130,6 @@ export const SandboxBrowserSchema = z
|
||||
headless: z.boolean().optional(),
|
||||
enableNoVnc: z.boolean().optional(),
|
||||
allowHostControl: z.boolean().optional(),
|
||||
allowedControlUrls: z.array(z.string()).optional(),
|
||||
allowedControlHosts: z.array(z.string()).optional(),
|
||||
allowedControlPorts: z.array(z.number().int().positive()).optional(),
|
||||
autoStart: z.boolean().optional(),
|
||||
autoStartTimeoutMs: z.number().int().positive().optional(),
|
||||
})
|
||||
|
||||
@@ -134,8 +134,6 @@ export const ClawdbotSchema = z
|
||||
browser: z
|
||||
.object({
|
||||
enabled: z.boolean().optional(),
|
||||
controlUrl: z.string().optional(),
|
||||
controlToken: z.string().optional(),
|
||||
cdpUrl: z.string().optional(),
|
||||
remoteCdpTimeoutMs: z.number().int().nonnegative().optional(),
|
||||
remoteCdpHandshakeTimeoutMs: z.number().int().nonnegative().optional(),
|
||||
|
||||
Reference in New Issue
Block a user