mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 07:50:22 +00:00
fix(browser): support configurable CDP auto-port range start (#31352)
* config(browser): add cdpPortRangeStart type * config(schema): validate browser.cdpPortRangeStart * config(labels): add browser.cdpPortRangeStart label * config(help): document browser.cdpPortRangeStart * browser(config): resolve custom cdp port range start * browser(profiles): allocate ports from resolved CDP range * test(browser): cover cdpPortRangeStart config behavior * test(browser): cover cdpPortRangeStart profile allocation * test(browser): include CDP range fields in remote tab harness * test(browser): include CDP range fields in ensure-tab harness * test(browser): include CDP range fields in bridge auth config * build(browser): add resolved CDP range metadata * fix(browser): fallback CDP port allocation to derived range * test(browser): cover missing resolved CDP range fallback * fix(browser): remove duplicate resolved CDP range fields * fix(agents): provide resolved CDP range in sandbox browser config * chore(browser): format sandbox bridge resolved config * chore(browser): reformat sandbox imports to satisfy oxfmt
This commit is contained in:
@@ -220,6 +220,8 @@ export const FIELD_HELP: Record<string, string> = {
|
||||
"Disables Chromium sandbox isolation flags for environments where sandboxing fails at runtime. Keep this off whenever possible because process isolation protections are reduced.",
|
||||
"browser.attachOnly":
|
||||
"Restricts browser mode to attach-only behavior without starting local browser processes. Use this when all browser sessions are externally managed by a remote CDP provider.",
|
||||
"browser.cdpPortRangeStart":
|
||||
"Starting local CDP port used for auto-allocated browser profile ports. Increase this when host-level port defaults conflict with other local services.",
|
||||
"browser.defaultProfile":
|
||||
"Default browser profile name selected when callers do not explicitly choose a profile. Use a stable low-privilege profile as the default to reduce accidental cross-context state use.",
|
||||
"browser.profiles":
|
||||
|
||||
@@ -105,6 +105,7 @@ export const FIELD_LABELS: Record<string, string> = {
|
||||
"browser.headless": "Browser Headless Mode",
|
||||
"browser.noSandbox": "Browser No-Sandbox Mode",
|
||||
"browser.attachOnly": "Browser Attach-only Mode",
|
||||
"browser.cdpPortRangeStart": "Browser CDP Port Range Start",
|
||||
"browser.defaultProfile": "Browser Default Profile",
|
||||
"browser.profiles": "Browser Profiles",
|
||||
"browser.profiles.*.cdpPort": "Browser Profile CDP Port",
|
||||
|
||||
@@ -48,6 +48,8 @@ export type BrowserConfig = {
|
||||
noSandbox?: boolean;
|
||||
/** If true: never launch; only attach to an existing browser. Default: false */
|
||||
attachOnly?: boolean;
|
||||
/** Starting local CDP port for auto-assigned browser profiles. Default derives from gateway port. */
|
||||
cdpPortRangeStart?: number;
|
||||
/** Default profile to use when profile param is omitted. Default: "chrome" */
|
||||
defaultProfile?: string;
|
||||
/** Named browser profiles with explicit CDP ports or URLs. */
|
||||
|
||||
@@ -250,6 +250,7 @@ export const OpenClawSchema = z
|
||||
headless: z.boolean().optional(),
|
||||
noSandbox: z.boolean().optional(),
|
||||
attachOnly: z.boolean().optional(),
|
||||
cdpPortRangeStart: z.number().int().min(1).max(65535).optional(),
|
||||
defaultProfile: z.string().optional(),
|
||||
snapshotDefaults: BrowserSnapshotDefaultsSchema,
|
||||
ssrfPolicy: z
|
||||
|
||||
Reference in New Issue
Block a user