playwright-community / playwright-go

Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
https://playwright-community.github.io/playwright-go/
MIT License
1.94k stars 145 forks source link

how to use proxy #324

Closed FahsaRwatit closed 9 months ago

Jacobinski commented 1 year ago

The browser creation arguments allow you to specify a proxy.

browser, err := pw.Chromium.Launch(&playwright.BrowserTypeLaunchOptionsProxy{
    Server:   playwright.String(`http://123.456.789.00:1234`),
    Username: playwright.String("username"),
    Password: playwright.String("password"),
})