use lazy_static::lazy_static;
use std::collections::HashMap;
use time::OffsetDateTime;
use crate::{
database::browser_profile::{MainWebsite, Platform},
server::dtos::{
browser_profile_dto::{
Args, BrowserProfileFullData, Canvas, ClientRect, Cpu, Geolocation,
Locale, MediaDevices, Memory, Mode, Ports, Screen, Tabs, Timezone,
Useragent, WebGPUInfo, Webgl, WebglInfo, Webrtc,
},
settings_dto::SettingsList,
},
};
#[allow(
unused,
reason = "Not used as of now, as the Fonts override is disabled"
)]
pub const MACOS_FONTS: [&str; 157] = [
"Al Bayan",
"Al Nile",
"Al Tarikh",
"American Typewriter",
"Andale Mono",
"Apple Braille",
"Apple Chancery",
"Apple Color Emoji",
"Apple SD Gothic Neo",
"Apple Symbols",
"AppleGothic",
"AppleMyungjo",
"Arial Black",
"Arial Hebrew",
"Arial Narrow",
"Arial Rounded MT Bold",
"Arial Unicode MS",
"Arial",
"Avenir Next Condensed",
"Avenir Next",
"Avenir",
"Ayuthaya",
"Baghdad",
"Bangla MN",
"Bangla Sangam MN",
"Baskerville",
"Beirut",
"Big Caslon",
"Bodoni Ornaments",
"Bradley Hand",
"Brush Script MT",
"Chalkboard SE",
"Chalkboard",
"Chalkduster",
"Cochin",
"Comic Sans MS",
"Copperplate",
"Corsiva Hebrew",
"Courier New",
"Courier",
"Damascus",
"DecoType Naskh",
"Devanagari MT",
"Devanagari Sangam MN",
"Didot",
"Diwan Kufi",
"Diwan Thuluth",
"Euphemia UCAS",
"Farah",
"Farisi",
"Futura",
"GB18030 Bitmap",
"Geeza Pro",
"Geneva",
"Georgia",
"Gill Sans",
"Gujarati MT",
"Gujarati Sangam MN",
"Gurmukhi MN",
"Gurmukhi MT",
"Gurmukhi Sangam MN",
"Heiti SC",
"Helvetica Neue",
"Helvetica",
"Herculanum",
"Hiragino Sans GB",
"Hiragino Sans",
"Hoefler Text",
"ITF Devanagari",
"Impact",
"InaiMathi",
"Kannada MN",
"Kefa",
"Khmer MN",
"Khmer Sangam MN",
"Kohinoor Bangla",
"Kohinoor Telugu",
"Kokonor",
"Krungthep",
"KufiStandardGK",
"Lao MN",
"Lao Sangam MN",
"Lucida Grande",
"Luminari",
"Marker Felt",
"Menlo",
"Microsoft Sans Serif",
"Mishafi Gold",
"Monaco",
"Mshtakan",
"Muna",
"Nadeem",
"New Peninim MT",
"Noteworthy",
"Optima",
"Oriya Sangam MN",
"PT Mono",
"PT Sans Caption",
"PT Sans Narrow",
"PT Sans",
"PT Serif Caption",
"PT Serif",
"Palatino",
"Papyrus",
"Phosphate",
"PingFang HK",
"Plantagenet Cherokee",
"Raanana",
"STIXGeneral",
"STIXIntegralsD",
"STIXIntegralsSm",
"STIXIntegralsUp",
"STIXIntegralsUpD",
"STIXIntegralsUpSm",
"STIXSizeFiveSym",
"STIXSizeFourSym",
"STIXSizeOneSym",
"STIXSizeThreeSym",
"STIXSizeTwoSym",
"STIXVariants",
"STSong",
"Sana",
"Sathu",
"Savoye LET",
"SignPainter",
"Silom",
"Sinhala Sangam MN",
"Skia",
"Snell Roundhand",
"Songti SC",
"Sukhumvit Set",
"Symbol",
"Tahoma",
"Tamil Sangam MN",
"Telugu Sangam MN",
"Thonburi",
"Trattatello",
"Trebuchet MS",
"Verdana",
"Waseem",
"Zapfino",
"Charter",
"DIN Alternate",
"DIN Condensed",
"Noto Nastaliq Urdu",
"Rockwell",
"Zapf Dingbats",
"BlinkMacSystemFont",
"Mishafi",
"Myanmar MN",
"Myanmar Sangam MN",
"Oriya MN",
"Songti TC",
"Tamil MN",
"Telugu MN",
"Webdings",
"Wingdings",
];
#[allow(
unused,
reason = "Not used as of now, as the Fonts override is disabled"
)]
pub const WINDOWS_FONTS: [&str; 191] = [
"Arial",
"Arial Black",
"Calibri",
"Cambria",
"Cambria Math",
"Comic Sans MS",
"Consolas",
"Courier New",
"Georgia",
"Impact",
"Lucida Console",
"Lucida Sans Unicode",
"Microsoft Sans Serif",
"MS Gothic",
"MS PGothic",
"Palatino Linotype",
"Segoe Print",
"Segoe Script",
"Segoe UI",
"Segoe UI Light",
"Segoe UI Semibold",
"Segoe UI Symbol",
"Tahoma",
"Times New Roman",
"Trebuchet MS",
"Verdana",
"Wingdings",
"Arial Bold",
"Arial Bold Italic",
"Arial Italic",
"Bahnschrift",
"Bahnschrift Light",
"Bahnschrift SemiBold",
"Bahnschrift SemiLight",
"Calibri Bold",
"Calibri Bold Italic",
"Calibri Italic",
"Calibri Light",
"Calibri Light Italic",
"Cambria Bold",
"Cambria Bold Italic",
"Cambria Italic",
"Candara",
"Candara Bold",
"Candara Bold Italic",
"Candara Italic",
"Candara Light",
"Candara Light Italic",
"Comic Sans MS Bold",
"Comic Sans MS Bold Italic",
"Comic Sans MS Italic",
"Consolas Bold",
"Consolas Bold Italic",
"Consolas Italic",
"Constantia",
"Constantia Bold",
"Constantia Bold Italic",
"Constantia Italic",
"Corbel",
"Corbel Bold",
"Corbel Bold Italic",
"Corbel Italic",
"Corbel Light",
"Corbel Light Italic",
"Courier New Bold",
"Courier New Bold Italic",
"Courier New Italic",
"Ebrima",
"Ebrima Bold",
"Franklin Gothic Medium",
"Franklin Gothic Medium Italic",
"Gabriola",
"Gadugi",
"Gadugi Bold",
"Georgia Bold",
"Georgia Bold Italic",
"Georgia Italic",
"HoloLens MDL2 Assets",
"Ink Free",
"Javanese Text",
"Leelawadee UI",
"Leelawadee UI Bold",
"Leelawadee UI Semilight",
"MS UI Gothic",
"MV Boli",
"Malgun Gothic",
"Malgun Gothic Bold",
"Malgun Gothic Semilight",
"Marlett",
"Microsoft Himalaya",
"Microsoft JhengHei",
"Microsoft JhengHei Bold",
"Microsoft JhengHei Light",
"Microsoft JhengHei UI",
"Microsoft JhengHei UI Bold",
"Microsoft JhengHei UI Light",
"Microsoft New Tai Lue",
"Microsoft New Tai Lue Bold",
"Microsoft PhagsPa",
"Microsoft PhagsPa Bold",
"Microsoft Tai Le",
"Microsoft Tai Le Bold",
"Microsoft YaHei",
"Microsoft YaHei Bold",
"Microsoft YaHei Light",
"Microsoft YaHei UI",
"Microsoft YaHei UI Bold",
"Microsoft YaHei UI Light",
"Microsoft Yi Baiti",
"MingLiU-ExtB",
"MingLiU_HKSCS-ExtB",
"Mongolian Baiti",
"Myanmar Text",
"Myanmar Text Bold",
"NSimSun",
"Nirmala UI",
"Nirmala UI Bold",
"Nirmala UI Semilight",
"PMingLiU-ExtB",
"Palatino Linotype Bold",
"Palatino Linotype Bold Italic",
"Palatino Linotype Italic",
"Segoe MDL2 Assets",
"Segoe Print Bold",
"Segoe Script Bold",
"Segoe UI",
"Segoe UI Black",
"Segoe UI Black Italic",
"Segoe UI Bold",
"Segoe UI Bold Italic",
"Segoe UI Emoji",
"Segoe UI Historic",
"Segoe UI Italic",
"Segoe UI Light Italic",
"Segoe UI Semibold Italic",
"Segoe UI Semilight",
"Segoe UI Semilight Italic",
"SimSun",
"SimSun-ExtB",
"Sitka Banner",
"Sitka Banner Bold",
"Sitka Banner Bold Italic",
"Sitka Banner Italic",
"Sitka Display",
"Sitka Display Bold",
"Sitka Display Bold Italic",
"Sitka Display Italic",
"Sitka Heading",
"Sitka Heading Bold",
"Sitka Heading Bold Italic",
"Sitka Heading Italic",
"Sitka Small",
"Sitka Small Bold",
"Sitka Small Bold Italic",
"Sitka Small Italic",
"Sitka Subheading",
"Sitka Subheading Bold",
"Sitka Subheading Bold Italic",
"Sitka Subheading Italic",
"Sitka Text",
"Sitka Text Bold",
"Sitka Text Bold Italic",
"Sitka Text Italic",
"Sylfaen",
"Symbol",
"Tahoma Bold",
"Tahoma Negreta",
"Times New Roman Bold",
"Times New Roman Bold Italic",
"Times New Roman Italic",
"Trebuchet MS Bold",
"Trebuchet MS Bold Italic",
"Trebuchet MS Italic",
"Verdana Bold",
"Verdana Bold Italic",
"Verdana Italic",
"Webdings",
"Yu Gothic",
"Yu Gothic Bold",
"Yu Gothic Light",
"Yu Gothic Medium",
"Yu Gothic Regular",
"Yu Gothic UI Bold",
"Yu Gothic UI Light",
"Yu Gothic UI Regular",
"Yu Gothic UI Semibold",
"Yu Gothic UI Semilight",
"宋体",
"微软雅黑",
"MS ゴシック",
"MS Pゴシック",
];
#[allow(
unused,
reason = "Not used as of now, as the Fonts override is disabled"
)]
pub const LINUX_FONTS: [&str; 0] = [];
pub const MACOS_ACCEPTABLE_LOCALES: [&str; 55] = [
"af", "am", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en_GB", "en",
"es", "es_419", "et", "fa", "fi", "fil", "fr", "gu", "he", "hi", "hr", "hu",
"id", "it", "ja", "kn", "ko", "lt", "lv", "ml", "mr", "ms", "nb", "nl", "pl",
"pt_BR", "pt_PT", "ro", "ru", "sk", "sl", "sr", "sv", "sw", "ta", "te", "th",
"tr", "uk", "ur", "vi", "zh_CN", "zh_TW",
];
pub const WINDOWS_ACCEPTABLE_LOCALES: [&str; 55] = [
"af", "am", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en-GB", "en-US",
"es", "es-419", "et", "fa", "fi", "fil", "fr", "gu", "he", "hi", "hr", "hu",
"id", "it", "ja", "kn", "ko", "lt", "lv", "ml", "mr", "ms", "nb", "nl", "pl",
"pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sr", "sv", "sw", "ta", "te", "th",
"tr", "uk", "ur", "vi", "zh-CN", "zh-TW",
];
pub const LINUX_ACCEPTABLE_LOCALES: [&str; 55] = [
"af", "am", "ar", "bg", "bn", "ca", "cs", "da", "de", "el", "en-GB", "en-US",
"es", "es-419", "et", "fa", "fi", "fil", "fr", "gu", "he", "hi", "hr", "hu",
"id", "it", "ja", "kn", "ko", "lt", "lv", "ml", "mr", "ms", "nb", "nl", "pl",
"pt-BR", "pt-PT", "ro", "ru", "sk", "sl", "sr", "sv", "sw", "ta", "te", "th",
"tr", "uk", "ur", "vi", "zh-CN", "zh-TW",
];
pub const COUNTRY_LOCALE_MAP: [&str; 150] = [
"sq-AL", "sq", "ar-DZ", "ar-BH", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB",
"ar-LY", "ar-MA", "ar-OM", "ar-QA", "ar-SA", "ar-SD", "ar-SY", "ar-TN",
"ar-AE", "ar-YE", "ar", "be-BY", "be", "bg-BG", "bg", "zh-CN", "zh-HK",
"zh-SG", "zh-TW", "zh", "hr-HR", "hr", "cs-CZ", "cs", "da-DK", "da", "nl-BE",
"nl-NL", "nl", "en-AU", "en-CA", "en-IN", "en-IE", "en-MT", "en-NZ", "en-PH",
"en-SG", "en-ZA", "en-GB", "en-US", "en", "et-EE", "et", "fi-FI", "fi",
"fr-BE", "fr-CA", "fr-FR", "fr-LU", "fr-CH", "fr", "de-DE", "de-AT", "de-LU",
"de-CH", "de", "el-CY", "el-GR", "el", "iw-IL", "iw", "hi-IN", "hu-HU", "hu",
"is-IS", "is", "in-ID", "in", "ga-IE", "ga", "it-IT", "it-CH", "it", "ja-JP",
"ja-JP-JP", "ja", "ko-KR", "ko", "lv-LV", "lv", "lt-LT", "lt", "mk-MK", "mk",
"ms-MY", "ms", "mt-MT", "mt", "no-NO", "no-NO-NY", "no", "pl-PL", "pl",
"pt-BR", "pt-PT", "pt", "ro-RO", "ro", "ru-RU", "ru", "sr-BA", "sr-ME",
"sr-CS", "sr-RS", "sr", "sk-SK", "sk", "sl-SI", "sl", "es-AR", "es-BO",
"es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-SV", "es-GT", "es-HN",
"es-MX", "es-NI", "es-PA", "es-PY", "es-PE", "es-PR", "es-ES", "es-US",
"es-UY", "es-VE", "es", "sv-SE", "sv", "th-TH", "th-TH-TH", "th", "tr-TR",
"tr", "uk-UA", "uk", "vi-VN", "vi",
];
pub const LATEST_CHROME_VERSION: usize = 130;
lazy_static! {
pub static ref CHROME_VERSION_MAP: HashMap<(&'static str, Platform), &'static str> = {
let mut map = HashMap::new();
map.insert(("103", Platform::Windows), "103.0.5060.53");
map.insert(("103", Platform::Linux), "103.0.5060.53");
map.insert(("103", Platform::Macos), "103.0.5060.53");
map.insert(("104", Platform::Windows), "104.0.5112.79");
map.insert(("104", Platform::Linux), "104.0.5112.79");
map.insert(("104", Platform::Macos), "104.0.5112.79");
map.insert(("105", Platform::Windows), "105.0.5195.125");
map.insert(("105", Platform::Linux), "105.0.5195.125");
map.insert(("105", Platform::Macos), "105.0.5195.125");
map.insert(("106", Platform::Windows), "106.0.5249.91");
map.insert(("106", Platform::Linux), "106.0.5249.91");
map.insert(("106", Platform::Macos), "106.0.5249.91");
map.insert(("107", Platform::Windows), "107.0.5249.91");
map.insert(("107", Platform::Linux), "107.0.5249.91");
map.insert(("107", Platform::Macos), "107.0.5249.91");
map.insert(("108", Platform::Windows), "108.0.5359.94");
map.insert(("108", Platform::Linux), "108.0.5359.94");
map.insert(("108", Platform::Macos), "108.0.5359.94");
map.insert(("109", Platform::Windows), "109.0.5359.94");
map.insert(("109", Platform::Linux), "109.0.5359.94");
map.insert(("109", Platform::Macos), "109.0.5359.94");
map.insert(("110", Platform::Windows), "110.0.5481.77");
map.insert(("110", Platform::Linux), "110.0.5481.77");
map.insert(("110", Platform::Macos), "110.0.5481.77");
map.insert(("111", Platform::Windows), "111.0.5563.58");
map.insert(("111", Platform::Linux), "111.0.5563.58");
map.insert(("111", Platform::Macos), "111.0.5563.58");
map.insert(("112", Platform::Windows), "112.0.5615.48");
map.insert(("112", Platform::Linux), "112.0.5615.48");
map.insert(("112", Platform::Macos), "112.0.5615.48");
map.insert(("113", Platform::Windows), "113.0.5672.63");
map.insert(("113", Platform::Linux), "113.0.5672.63");
map.insert(("113", Platform::Macos), "113.0.5672.63");
map.insert(("114", Platform::Windows), "114.0.5735.106");
map.insert(("114", Platform::Linux), "114.0.5735.106");
map.insert(("114", Platform::Macos), "114.0.5735.106");
map.insert(("115", Platform::Windows), "115.0.5790.98");
map.insert(("115", Platform::Linux), "115.0.5790.98");
map.insert(("115", Platform::Macos), "115.0.5790.98");
map.insert(("116", Platform::Windows), "116.0.5845.78");
map.insert(("116", Platform::Linux), "116.0.5845.78");
map.insert(("116", Platform::Macos), "116.0.5845.78");
map.insert(("117", Platform::Windows), "117.0.5938.63");
map.insert(("117", Platform::Linux), "117.0.5938.63");
map.insert(("117", Platform::Macos), "117.0.5938.63");
map.insert(("118", Platform::Windows), "118.0.5993.54");
map.insert(("118", Platform::Linux), "118.0.5993.54");
map.insert(("118", Platform::Macos), "118.0.5993.54");
map.insert(("119", Platform::Windows), "119.0.6045.106");
map.insert(("119", Platform::Linux), "119.0.6045.106");
map.insert(("119", Platform::Macos), "119.0.6045.106");
map.insert(("120", Platform::Windows), "120.0.6099.60");
map.insert(("120", Platform::Linux), "120.0.6099.60");
map.insert(("120", Platform::Macos), "120.0.6099.60");
map.insert(("121", Platform::Windows), "121.0.6167.75");
map.insert(("121", Platform::Linux), "121.0.6167.75");
map.insert(("121", Platform::Macos), "121.0.6167.75");
map.insert(("122", Platform::Windows), "122.0.6261.49");
map.insert(("122", Platform::Linux), "122.0.6261.49");
map.insert(("122", Platform::Macos), "122.0.6261.49");
map.insert(("123", Platform::Windows), "123.0.6312.46");
map.insert(("123", Platform::Linux), "123.0.6312.46");
map.insert(("123", Platform::Macos), "123.0.6312.46");
map.insert(("124", Platform::Windows), "124.0.6367.49");
map.insert(("124", Platform::Linux), "124.0.6367.49");
map.insert(("124", Platform::Macos), "124.0.6367.49");
map.insert(("125", Platform::Windows), "125.0.6422.60");
map.insert(("125", Platform::Linux), "125.0.6422.60");
map.insert(("125", Platform::Macos), "125.0.6422.60");
map.insert(("126", Platform::Windows), "126.0.6478.62");
map.insert(("126", Platform::Linux), "126.0.6478.62");
map.insert(("126", Platform::Macos), "126.0.6478.62");
map.insert(("127", Platform::Windows), "127.0.6533.73");
map.insert(("127", Platform::Linux), "127.0.6533.73");
map.insert(("127", Platform::Macos), "127.0.6533.73");
map.insert(("128", Platform::Windows), "128.0.6613.36");
map.insert(("128", Platform::Linux), "128.0.6613.36");
map.insert(("128", Platform::Macos), "128.0.6613.36");
map.insert(("129", Platform::Windows), "129.0.6668.71");
map.insert(("129", Platform::Linux), "129.0.6668.71");
map.insert(("129", Platform::Macos), "129.0.6668.71");
map.insert(("130", Platform::Windows), "130.0.6723.92");
map.insert(("130", Platform::Linux), "130.0.6723.92");
map.insert(("130", Platform::Macos), "130.0.6723.92");
map
};
}
lazy_static! {
pub static ref LATEST_CHROME_FULL_VERSION: String = CHROME_VERSION_MAP
.get(&(&format!("{}", LATEST_CHROME_VERSION), Platform::Windows))
.unwrap_or(&"")
.to_string();
}
lazy_static! {
pub static ref WEBSITE_URLS: HashMap<MainWebsite, &'static str> = {
let mut map = HashMap::new();
map.insert(MainWebsite::Facebook, "https://www.facebook.com");
map.insert(MainWebsite::Google, "https://accounts.google.com");
map.insert(MainWebsite::Tiktok, "https://www.tiktok.com");
map
};
}
lazy_static! {
pub static ref LINUX_MOCK_PROFILE: BrowserProfileFullData =
BrowserProfileFullData {
id: 0,
user_id: 0,
team_id: 0,
name: "Test profile Linux".into(),
main_website: MainWebsite::Empty,
platform: Platform::Linux,
useragent: Useragent {
mode: Mode::Auto,
value: None,
},
webrtc: Webrtc {
mode: Mode::Altered,
ip_address: None,
},
canvas: Canvas {
mode: Mode::Real,
noise: None,
},
webgl: Webgl {
mode: Mode::Real,
noise: None,
},
webgl_info: WebglInfo {
mode: Mode::Manual,
vendor: Some("Intel Open Source Technology Center".to_string()),
renderer: Some("Mesa DRI Intel(R) HD Graphics 400 (BSW)".to_string()),
},
client_rect: ClientRect {
mode: Mode::Real,
noise: None,
},
timezone: Timezone {
mode: Mode::Auto,
value: None,
},
locale: Locale {
mode: Mode::Auto,
value: None,
},
geolocation: Geolocation {
mode: Mode::Auto,
latitude: None,
longitude: None,
accuracy: None,
},
do_not_track: true,
args: Args(None),
cpu: Cpu {
mode: Mode::Manual,
value: 2,
},
memory: Memory {
mode: Mode::Manual,
value: 4,
},
screen: Screen {
mode: Mode::Real,
width: None,
height: None,
},
ports: Ports {
mode: Mode::Protect,
blacklist: vec![
3389, 5900, 5800, 7070, 6568, 5938, 63333, 5901, 5902, 5903, 5950,
5931, 5939, 6039, 5944, 6040, 5279, 2112,
],
},
tabs: Tabs(vec![]),
cpu_architecture: "".into(),
os_version: "14324.72.0".into(),
connection_downlink: 3.3,
connection_effective_type: "4g".to_string(),
connection_rtt: 150,
connection_save_data: false,
vendor_sub: "".into(),
product_sub: "20030107".into(),
vendor: "Google Inc.".into(),
product: "Gecko".into(),
app_code_name: "Mozilla".into(),
media_devices: MediaDevices {
mode: Mode::Real,
audio_inputs: 0,
video_inputs: 0,
audio_outputs: 0,
},
datadir_hash: None,
platform_version: "14324.72.0".into(),
webgl2_maximum: None,
login: None,
password: None,
is_hidden_profile_name: true,
webgpu: WebGPUInfo {
mode: Mode::Real,
limits: None,
get_preferred_canvas_format: None,
info: None,
},
settings: SettingsList::new(vec![]),
proxy: None,
created_at: OffsetDateTime::now_utc(),
homepages: vec![],
};
}
lazy_static! {
pub static ref MACOS_MOCK_PROFILE: BrowserProfileFullData =
BrowserProfileFullData {
id: 0,
user_id: 0,
team_id: 0,
name: "Test profile macOS".into(),
main_website: MainWebsite::Empty,
platform: Platform::Macos,
useragent: Useragent {
mode: Mode::Auto,
value: None,
},
webrtc: Webrtc {
mode: Mode::Altered,
ip_address: None,
},
canvas: Canvas {
mode: Mode::Real,
noise: None,
},
webgl: Webgl {
mode: Mode::Real,
noise: None,
},
webgl_info: WebglInfo {
mode: Mode::Manual,
vendor: Some("Intel Open Source Technology Center".to_string()),
renderer: Some("Mesa DRI Intel(R) HD Graphics 400 (BSW)".to_string()),
},
client_rect: ClientRect {
mode: Mode::Real,
noise: None,
},
timezone: Timezone {
mode: Mode::Auto,
value: None,
},
locale: Locale {
mode: Mode::Auto,
value: None,
},
geolocation: Geolocation {
mode: Mode::Auto,
latitude: None,
longitude: None,
accuracy: None,
},
do_not_track: true,
args: Args(None),
cpu: Cpu {
mode: Mode::Manual,
value: 2,
},
memory: Memory {
mode: Mode::Manual,
value: 4,
},
screen: Screen {
mode: Mode::Real,
width: None,
height: None,
},
ports: Ports {
mode: Mode::Protect,
blacklist: vec![
3389, 5900, 5800, 7070, 6568, 5938, 63333, 5901, 5902, 5903, 5950,
5931, 5939, 6039, 5944, 6040, 5279, 2112,
],
},
tabs: Tabs(vec![]),
cpu_architecture: "".into(),
os_version: "10.15.7".into(),
connection_downlink: 3.3,
connection_effective_type: "4g".to_string(),
connection_rtt: 150,
connection_save_data: false,
vendor_sub: "".into(),
product_sub: "20030107".into(),
vendor: "Apple Computer, Inc.".into(),
product: "Gecko".into(),
app_code_name: "Mozilla".into(),
media_devices: MediaDevices {
mode: Mode::Real,
audio_inputs: 0,
video_inputs: 0,
audio_outputs: 0,
},
datadir_hash: None,
platform_version: "10.15.7".into(),
webgl2_maximum: None,
login: None,
password: None,
is_hidden_profile_name: true,
webgpu: WebGPUInfo {
mode: Mode::Real,
limits: None,
get_preferred_canvas_format: None,
info: None,
},
settings: SettingsList::new(vec![]),
proxy: None,
created_at: OffsetDateTime::now_utc(),
homepages: vec![],
};
}
lazy_static! {
pub static ref WINDOWS_MOCK_PROFILE: BrowserProfileFullData =
BrowserProfileFullData {
id: 0,
user_id: 0,
team_id: 0,
name: "Test profile Windows".into(),
main_website: MainWebsite::Empty,
platform: Platform::Windows,
useragent: Useragent {
mode: Mode::Auto,
value: None,
},
webrtc: Webrtc {
mode: Mode::Altered,
ip_address: None,
},
canvas: Canvas {
mode: Mode::Real,
noise: None,
},
webgl: Webgl {
mode: Mode::Real,
noise: None,
},
webgl_info: WebglInfo {
mode: Mode::Real,
vendor: None,
renderer: None,
},
client_rect: ClientRect {
mode: Mode::Real,
noise: None,
},
timezone: Timezone {
mode: Mode::Auto,
value: None,
},
locale: Locale {
mode: Mode::Auto,
value: None,
},
geolocation: Geolocation {
mode: Mode::Auto,
latitude: None,
longitude: None,
accuracy: None,
},
do_not_track: true,
args: Args(None),
cpu: Cpu {
mode: Mode::Manual,
value: 2,
},
memory: Memory {
mode: Mode::Manual,
value: 4,
},
screen: Screen {
mode: Mode::Real,
width: None,
height: None,
},
ports: Ports {
mode: Mode::Protect,
blacklist: vec![
3389, 5900, 5800, 7070, 6568, 5938, 63333, 5901, 5902, 5903, 5950,
5931, 5939, 6039, 5944, 6040, 5279, 2112,
],
},
tabs: Tabs(vec![]),
cpu_architecture: "amd64".into(),
os_version: "0".into(),
connection_downlink: 3.3,
connection_effective_type: "4g".to_string(),
connection_rtt: 150,
connection_save_data: false,
vendor_sub: "".into(),
product_sub: "20030107".into(),
vendor: "Google Inc.".into(),
product: "Gecko".into(),
app_code_name: "Mozilla".into(),
media_devices: MediaDevices {
mode: Mode::Real,
audio_inputs: 0,
video_inputs: 0,
audio_outputs: 0,
},
datadir_hash: None,
platform_version: "14324.72.0".into(),
webgl2_maximum: None,
login: None,
password: None,
is_hidden_profile_name: true,
webgpu: WebGPUInfo {
mode: Mode::Real,
limits: None,
get_preferred_canvas_format: None,
info: None,
},
settings: SettingsList::new(vec![]),
proxy: None,
created_at: OffsetDateTime::now_utc(),
homepages: vec![],
};
}
pub const WINDOWS_VOICES: &[(&str, &str)] = &[
("en-CA", "Microsoft Richard - English (Canada)"),
("en-CA", "Microsoft Linda - English (Canada)"),
("en-GB", "Microsoft George - English (United Kingdom)"),
("en-GB", "Microsoft Hazel - English (United Kingdom)"),
("en-GB", "Microsoft Susan - English (United Kingdom)"),
("ru-RU", "Microsoft Irina - Russian (Russia)"),
("ru-RU", "Microsoft Pavel - Russian (Russia)"),
("en-US", "Microsoft David - English (United States)"),
("en-US", "Microsoft Mark - English (United States)"),
("en-US", "Microsoft Zira - English (United States)"),
];
pub const MACOS_VOICES: &[(&str, &str)] = &[
("en-US", "Alex"),
("it-IT", "Alice"),
("sv-SE", "Alva"),
("fr-CA", "Amelie"),
("de-DE", "Anna"),
("he-IL", "Carmit"),
("id-ID", "Damayanti"),
("en-GB", "Daniel"),
("es-AR", "Diego"),
("nl-BE", "Ellen"),
("en", "Fiona"),
("en-US", "Fred"),
("ro-RO", "Ioana"),
("pt-PT", "Joana"),
("es-ES", "Jorge"),
("es-MX", "Juan"),
("th-TH", "Kanya"),
("en-AU", "Karen"),
("ja-JP", "Kyoko"),
("sk-SK", "Laura"),
("hi-IN", "Lekha"),
("it-IT", "Luca"),
("pt-BR", "Luciana"),
("ar-SA", "Maged"),
("hu-HU", "Mariska"),
("zh-TW", "Mei-Jia"),
("el-GR", "Melina"),
("en-IE", "Moira"),
("es-ES", "Monica"),
("nb-NO", "Nora"),
("es-MX", "Paulina"),
("en-IN", "Rishi"),
("en-US", "Samantha"),
("da-DK", "Sara"),
("fi-FI", "Satu"),
("zh-HK", "Sin-ji"),
("en-ZA", "Tessa"),
("fr-FR", "Thomas"),
("zh-CN", "Ting-Ting"),
("en-IN", "Veena"),
("en-US", "Victoria"),
("nl-NL", "Xander"),
("tr-TR", "Yelda"),
("ko-KR", "Yuna"),
("ru-RU", "Milena"),
("ru-RU", "Yuri"),
("pl-PL", "Zosia"),
("cs-CZ", "Zuzana"),
];