且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么ProxyServer在chromedp GO上不起作用

更新时间:2023-01-15 21:30:58

尝试一下:

o := append(chromedp.DefaultExecAllocatorOptions[:],
    //... any options here
    chromedp.ProxyServer("http://username:password@proxyserver.com:31280"), 
)

cx, cancel := chromedp.NewExecAllocator(context.Background(), o...)
defer cancel()

ctx, cancel := chromedp.NewContext(cx)
defer cancel()
//... the rest of your code