@@ -324,52 +324,30 @@ pub struct SearchConfig {
324324 pub headless : Option < HeadlessConfig > ,
325325}
326326
327- /// Headless browser backend selection.
328- #[ derive( Debug , Clone , Copy , PartialEq , Eq , Serialize , Deserialize ) ]
329- #[ serde( rename_all = "lowercase" ) ]
330- pub enum BrowserBackend {
331- /// Chrome/Chromium headless. Auto-detected or downloaded from Google.
332- Chrome ,
333- /// Lightpanda headless browser. Auto-detected or downloaded from GitHub.
334- /// Supported on Linux and macOS only.
335- Lightpanda ,
336- }
337-
338- #[ allow( clippy:: derivable_impls) ]
339- impl Default for BrowserBackend {
340- fn default ( ) -> Self {
341- BrowserBackend :: Chrome
342- }
343- }
344-
345- /// Headless browser configuration.
327+ /// Headless browser configuration for JS-rendered engines.
328+ /// Uses obscura, a lightweight Rust-native headless browser.
346329#[ derive( Debug , Clone , Serialize , Deserialize ) ]
347330#[ serde( rename_all = "camelCase" ) ]
348331pub struct HeadlessConfig {
349- /// Which headless backend to use.
350- #[ serde( default ) ]
351- pub backend : BrowserBackend ,
352-
353- /// Path to the browser executable. If None, auto-detected or downloaded.
354- #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
355- pub browser_path : Option < String > ,
356-
357332 /// Maximum number of concurrent browser tabs.
358333 #[ serde( default = "default_headless_max_tabs" ) ]
359334 pub max_tabs : usize ,
360335
361- /// Additional launch arguments for the browser.
362- #[ serde( default , skip_serializing_if = "Vec::is_empty" ) ]
363- pub launch_args : Vec < String > ,
336+ /// Path to the obscura executable. If None, auto-detected or downloaded.
337+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
338+ pub obscura_path : Option < String > ,
339+
340+ /// Proxy URL for the browser to use.
341+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
342+ pub proxy_url : Option < String > ,
364343}
365344
366345impl Default for HeadlessConfig {
367346 fn default ( ) -> Self {
368347 Self {
369- backend : BrowserBackend :: default ( ) ,
370- browser_path : None ,
371348 max_tabs : 4 ,
372- launch_args : Vec :: new ( ) ,
349+ obscura_path : None ,
350+ proxy_url : None ,
373351 }
374352 }
375353}
0 commit comments