diff --git a/common/browser_options.go b/common/browser_options.go index fe07fcb8a..f1c71fecf 100644 --- a/common/browser_options.go +++ b/common/browser_options.go @@ -17,19 +17,10 @@ const ( optHeadless = "headless" optIgnoreDefaultArgs = "ignoreDefaultArgs" optLogCategoryFilter = "logCategoryFilter" - optProxy = "proxy" optSlowMo = "slowMo" optTimeout = "timeout" ) -// ProxyOptions allows configuring a proxy server. -type ProxyOptions struct { - Server string - Bypass string - Username string - Password string -} - // LaunchOptions stores browser launch options. type LaunchOptions struct { Args []string @@ -38,7 +29,6 @@ type LaunchOptions struct { Headless bool IgnoreDefaultArgs []string LogCategoryFilter string - Proxy ProxyOptions SlowMo time.Duration Timeout time.Duration @@ -112,8 +102,6 @@ func (l *LaunchOptions) Parse(ctx context.Context, logger *log.Logger, opts goja err = exportOpt(rt, k, v, &l.IgnoreDefaultArgs) case optLogCategoryFilter: l.LogCategoryFilter, err = parseStrOpt(k, v) - case optProxy: - err = exportOpt(rt, k, v, &l.Proxy) case optSlowMo: l.SlowMo, err = parseTimeOpt(k, v) case optTimeout: @@ -137,7 +125,6 @@ func (l *LaunchOptions) shouldIgnoreIfBrowserIsRemote(opt string) bool { optExecutablePath: {}, optHeadless: {}, optIgnoreDefaultArgs: {}, - optProxy: {}, } _, ignore := shouldIgnoreIfBrowserIsRemote[opt] diff --git a/common/browser_options_test.go b/common/browser_options_test.go index 480b23e06..ffac6dcab 100644 --- a/common/browser_options_test.go +++ b/common/browser_options_test.go @@ -48,7 +48,6 @@ func TestBrowserLaunchOptionsParse(t *testing.T) { "executablePath": "something else", "headless": false, "ignoreDefaultArgs": []string{"any"}, - "proxy": ProxyOptions{Server: "srv"}, // allow changing the following opts "debug": true, "logCategoryFilter": "...", @@ -168,29 +167,6 @@ func TestBrowserLaunchOptionsParse(t *testing.T) { opts: map[string]any{"logCategoryFilter": 1}, err: "logCategoryFilter should be a string", }, - "proxy": { - opts: map[string]any{ - "proxy": ProxyOptions{ - Server: "serverVal", - Bypass: "bypassVal", - Username: "usernameVal", - Password: "passwordVal", - }, - }, - assert: func(tb testing.TB, lo *LaunchOptions) { - tb.Helper() - assert.Equal(t, ProxyOptions{ - Server: "serverVal", - Bypass: "bypassVal", - Username: "usernameVal", - Password: "passwordVal", - }, lo.Proxy) - }, - }, - "proxy_err": { - opts: map[string]any{"proxy": 1}, - err: "proxy should be an object", - }, "slowMo": { opts: map[string]any{ "slowMo": "5s",