@@ -1902,6 +1902,18 @@ pub async fn create_browser_profile_new(
19021902 wayfern_config : Option < WayfernConfig > ,
19031903 group_id : Option < String > ,
19041904) -> Result < BrowserProfile , String > {
1905+ let fingerprint_os = camoufox_config
1906+ . as_ref ( )
1907+ . and_then ( |c| c. os . as_deref ( ) )
1908+ . or_else ( || wayfern_config. as_ref ( ) . and_then ( |c| c. os . as_deref ( ) ) ) ;
1909+
1910+ if !crate :: cloud_auth:: CLOUD_AUTH
1911+ . is_fingerprint_os_allowed ( fingerprint_os)
1912+ . await
1913+ {
1914+ return Err ( "Fingerprint OS spoofing requires an active Pro subscription" . to_string ( ) ) ;
1915+ }
1916+
19051917 let browser_type =
19061918 BrowserType :: from_str ( & browser_str) . map_err ( |e| format ! ( "Invalid browser type: {e}" ) ) ?;
19071919 create_browser_profile_with_group (
@@ -1924,6 +1936,13 @@ pub async fn update_camoufox_config(
19241936 profile_id : String ,
19251937 config : CamoufoxConfig ,
19261938) -> Result < ( ) , String > {
1939+ if !crate :: cloud_auth:: CLOUD_AUTH
1940+ . is_fingerprint_os_allowed ( config. os . as_deref ( ) )
1941+ . await
1942+ {
1943+ return Err ( "Fingerprint OS spoofing requires an active Pro subscription" . to_string ( ) ) ;
1944+ }
1945+
19271946 let profile_manager = ProfileManager :: instance ( ) ;
19281947 profile_manager
19291948 . update_camoufox_config ( app_handle, & profile_id, config)
@@ -1937,6 +1956,13 @@ pub async fn update_wayfern_config(
19371956 profile_id : String ,
19381957 config : WayfernConfig ,
19391958) -> Result < ( ) , String > {
1959+ if !crate :: cloud_auth:: CLOUD_AUTH
1960+ . is_fingerprint_os_allowed ( config. os . as_deref ( ) )
1961+ . await
1962+ {
1963+ return Err ( "Fingerprint OS spoofing requires an active Pro subscription" . to_string ( ) ) ;
1964+ }
1965+
19401966 let profile_manager = ProfileManager :: instance ( ) ;
19411967 profile_manager
19421968 . update_wayfern_config ( app_handle, & profile_id, config)
0 commit comments