cloud-browser#15
Merged
Merged
Conversation
Add Cloud Browser support to the SDK. BrowserConfig holds the full parameter surface (proxy_pool, os, country, session, auto_close, timeout, debug, extensions, block_*, screenshot, resolution, target_url, cache, blacklist, unblock, unblock_timeout, browser_brand, byop_proxy) and ScrapflyClient.cloudBrowser(config) builds the WebSocket URL ready for playwright.connectOverCDP() / puppeteer.connect(). byop_proxy lets Custom plan users route browser traffic through their own proxy. Supported schemes: http, https, socks5, socks5h, socks5+udp, socks5h+udp. The +udp variants enable HTTP/3 (QUIC) via SOCKS5 UDP ASSOCIATE for providers that implement RFC 1928 §7. See https://scrapfly.io/docs/cloud-browser-api/getting-started
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Cloud Browser support to the SDK.
BrowserConfigexposes the full Cloud Browser parameter surface (proxy_pool,os,country,session,auto_close,timeout,debug,extensions,block_images,block_styles,block_fonts,block_media,screenshot,resolution,target_url,cache,blacklist,unblock,unblock_timeout,browser_brand,byop_proxy).ScrapflyClient.cloudBrowser(config)builds the WebSocket URL ready forplaywright.connectOverCDP()/puppeteer.connect().byop_proxyacceptshttp,https,socks5,socks5h,socks5+udp,socks5h+udp. The+udpvariants enable HTTP/3 (QUIC) via SOCKS5 UDP ASSOCIATE for providers that implement RFC 1928 §7.See https://scrapfly.io/docs/cloud-browser-api/getting-started
Test plan
new BrowserConfig({...}).websocketUrl(apiKey)returns a validwss://browser.scrapfly.io?...URLbyop_proxy: 'socks5h+udp://...'is properly URL-encoded asbyop_proxy=socks5h%2Budp%3A%2F%2F...playwright.connectOverCDP(client.cloudBrowser(config))against the live Cloud Browser endpoint