From dc08ecc7272dd745adc3494fb675c76174cbb2b3 Mon Sep 17 00:00:00 2001 From: Randy Cahyana Date: Thu, 16 Feb 2017 16:37:39 +0700 Subject: [PATCH] Added missing Proxy PAC URL command line option --- runner/runner.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runner/runner.go b/runner/runner.go index cb53037..8d1a7a9 100644 --- a/runner/runner.go +++ b/runner/runner.go @@ -13,6 +13,8 @@ import ( "sync" "syscall" + "net/url" + "github.com/knq/chromedp/client" ) @@ -379,6 +381,11 @@ func Proxy(proxy string) CommandLineOption { return Flag("proxy-server", proxy) } +// ProxyPacURL is the Chrome command line option to set the URL of a proxy PAC file. +func ProxyPacURL(pacURL url.URL) CommandLineOption { + return Flag("proxy-pac-url", pacURL.String()) +} + // WindowSize is the Chrome command line option to set the initial window size. func WindowSize(width, height int) CommandLineOption { return Flag("window-size", fmt.Sprintf("%d,%d", width, height))