Skip to content

Commit

Permalink
Adds detection for various browsers (#7614)
Browse files Browse the repository at this point in the history
* Adds detection for TTWebview

* Adds detection for tararia

* Adds detection for Colom Browser

* Adds detection for VibeMate

* Improves detection for VibeMate

* Improves detection for Chrome Webview

* Adds detection for Rakuten Browser

* Adds detection for Rakuten Web Search

* Fix VibeMate

* Remove null from family

* Fix Chrome Webview tests

* Fix Rakuten Web Search test

* Adds detection for Moya Browser

* Adds detection for Impervious Browser

* Improves version detection for Nokia Browser

* Improves version detection for VibeMate

* Adds detection for Catalyst

* Adds detection for Wexond

* Adds detection for Ninetails

* Adds detection for JUZI Browser

* Adds detection for Lotus

* Adds detection for Catsxp

https://www.catsxp.com/

* Adds detection for QJY TV Browser

* Improves detection for VMware AirWatch

* Adds detection for Intune Managed Browser

* Adds detection for Bang

* Fix QJY TV Browser name

* Improves detection for Ask.com

* Adds tests for Ghostery Privacy Browser

* Adds detection for GoKu

* Delete .phpunit.result.cache

* Adds detection for Cliqz

Replaced by Ghostery Privacy Browser

* Improves detection for 18+ Privacy Browser

* Adds detection for Surfy Browser

* Improves detection for Surfy Browser

* Improves detection for Vision Mobile Browser

* Improves detection for GinxDroid Browser

* Change short code for Moya Browser

* Move F-Secure SAFE from apps to browsers

* Move KPN Veilig from apps to browsers

* Adds detection for Bluefy

* Improve regexes

* Sort keys

* Add Microsoft Edge to $clientHintMapping

* Improves detection for Edge WebView

* Adds test for Chrome Webview

* Remove information not required for browser tests

* Improves detection for 360 Secure Browser

* Improves detection for Vivaldi

* Improves version detection for Brave

* Adds detection for OnBrowser Lite

* Adds detection for Diigo Browser

* Adds detection for TrueLocation Browser

* Adds detection for Mogok Browser

---------

Co-authored-by: Tutik Alexsandr <[email protected]>
  • Loading branch information
liviuconcioiu and sanchezzzhak authored Mar 7, 2024
1 parent a57ab14 commit be8de2c
Show file tree
Hide file tree
Showing 16 changed files with 662 additions and 117 deletions.
2 changes: 1 addition & 1 deletion DeviceDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ protected function parseDevice(): void
*/
if (\in_array($clientName, [
'Kylo', 'Espial TV Browser', 'LUJO TV Browser', 'LogicUI TV Browser', 'Open TV Browser', 'Seraphic Sraf',
'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV',
'Opera Devices', 'Crow Browser', 'Vewd Browser', 'TiviMate', 'Quick Search TV', 'QJY TV Browser',
])
) {
$this->device = AbstractDeviceParser::DEVICE_TYPE_TV;
Expand Down
36 changes: 31 additions & 5 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@ class Browser extends AbstractClientParser
'BM' => 'Beamrise',
'F7' => 'BF Browser',
'BB' => 'BlackBerry Browser',
'6B' => 'Bluefy',
'H1' => 'BrowseHere',
'B8' => 'Browser Hup Pro',
'BD' => 'Baidu Browser',
'BS' => 'Baidu Spark',
'BG' => 'Bang',
'B9' => 'Bangla Browser',
'BI' => 'Basilisk',
'BV' => 'Belva Browser',
Expand Down Expand Up @@ -148,13 +150,16 @@ class Browser extends AbstractClientParser
'BF' => 'Byffox',
'B4' => 'BXE Browser',
'CA' => 'Camino',
'5C' => 'Catalyst',
'XP' => 'Catsxp',
'0C' => 'Cave Browser',
'CL' => 'CCleaner',
'C8' => 'CG Browser',
'CJ' => 'ChanjetCloud',
'C6' => 'Chedot',
'C9' => 'Cherry Browser',
'C0' => 'Centaury',
'CQ' => 'Cliqz',
'CC' => 'Coc Coc',
'C4' => 'CoolBrowser',
'C2' => 'Colibri',
Expand All @@ -171,6 +176,7 @@ class Browser extends AbstractClientParser
'CM' => 'Chrome Mobile',
'3C' => 'Chowbo',
'CN' => 'CoolNovo',
'4C' => 'Colom Browser',
'CO' => 'CometBird',
'2C' => 'Comfort Browser',
'CB' => 'COS Browser',
Expand Down Expand Up @@ -198,6 +204,7 @@ class Browser extends AbstractClientParser
'DT' => 'Delta Browser',
'D0' => 'Desi Browser',
'DS' => 'DeskBrowse',
'II' => 'Diigo Browser',
'D2' => 'DoCoMo',
'DF' => 'Dolphin',
'DZ' => 'Dolphin Zero',
Expand Down Expand Up @@ -260,6 +267,7 @@ class Browser extends AbstractClientParser
'GP' => 'Google Earth Pro',
'GO' => 'GOG Galaxy',
'GR' => 'GoBrowser',
'GK' => 'GoKu',
'G2' => 'GO Browser',
'HB' => 'Harman Browser',
'HS' => 'HasBrowser',
Expand Down Expand Up @@ -289,11 +297,13 @@ class Browser extends AbstractClientParser
'IV' => 'Isivioo',
'I8' => 'IVVI Browser',
'IW' => 'Iceweasel',
'2I' => 'Impervious Browser',
'N3' => 'Incognito Browser',
'IN' => 'Inspect Browser',
'I9' => 'Insta Browser',
'IE' => 'Internet Explorer',
'I7' => 'Internet Browser Secure',
'3I' => 'Intune Managed Browser',
'I5' => 'Indian UC Mini Browser',
'Z0' => 'InBrowser',
'IM' => 'IE Mobile',
Expand All @@ -305,6 +315,7 @@ class Browser extends AbstractClientParser
'JI' => 'Jig Browser',
'JP' => 'Jig Browser Plus',
'JO' => 'JioSphere',
'JZ' => 'JUZI Browser',
'KB' => 'K.Browser',
'KF' => 'Keepsafe Browser',
'KS' => 'Kids Safe Browser',
Expand All @@ -329,6 +340,7 @@ class Browser extends AbstractClientParser
'LI' => 'Links',
'LC' => 'LogicUI TV Browser',
'IF' => 'Lolifox',
'L3' => 'Lotus',
'LO' => 'Lovense Browser',
'LT' => 'LT Browser',
'LU' => 'LuaKit',
Expand All @@ -352,6 +364,7 @@ class Browser extends AbstractClientParser
'MO' => 'Mobicip',
'MU' => 'MIUI Browser',
'MS' => 'Mobile Silk',
'MK' => 'Mogok Browser',
'MN' => 'Minimo',
'MT' => 'Mint Browser',
'MX' => 'Maxthon',
Expand All @@ -366,6 +379,7 @@ class Browser extends AbstractClientParser
'NK' => 'Naked Browser',
'NA' => 'Naked Browser Pro',
'NR' => 'NFS Browser',
'N5' => 'Ninetails',
'NB' => 'Nokia Browser',
'NO' => 'Nokia OSS Browser',
'NV' => 'Nokia Ovi Browser',
Expand Down Expand Up @@ -393,6 +407,7 @@ class Browser extends AbstractClientParser
'OF' => 'Off By One',
'O5' => 'Office Browser',
'HH' => 'OhHai Browser',
'OL' => 'OnBrowser Lite',
'OE' => 'ONE Browser',
'N4' => 'Onion Browser',
'Y1' => 'Opera Crypto',
Expand Down Expand Up @@ -450,6 +465,7 @@ class Browser extends AbstractClientParser
'RW' => 'Reqwireless WebViewer',
'PS' => 'Microsoft Edge',
'QA' => 'Qazweb',
'QJ' => 'QJY TV Browser',
'Q3' => 'Qmamu',
'Q4' => 'Quick Search TV',
'Q2' => 'QQ Browser Lite',
Expand All @@ -461,6 +477,8 @@ class Browser extends AbstractClientParser
'QZ' => 'QupZilla',
'QM' => 'Qwant Mobile',
'QW' => 'QtWebEngine',
'R3' => 'Rakuten Browser',
'R4' => 'Rakuten Web Search',
'R2' => 'Raspbian Chromium',
'RE' => 'Realme Browser',
'RK' => 'Rekonq',
Expand Down Expand Up @@ -518,6 +536,7 @@ class Browser extends AbstractClientParser
'HR' => 'Sushi Browser',
'S3' => 'surf',
'4S' => 'Surf Browser',
'RY' => 'Surfy Browser',
'SG' => 'Stargon',
'S0' => 'START Internet Browser',
'S4' => 'Steam In-Game Overlay',
Expand All @@ -530,13 +549,15 @@ class Browser extends AbstractClientParser
'TR' => 'T-Browser',
'TO' => 't-online.de Browser',
'TA' => 'Tao Browser',
'T2' => 'tararia',
'TH' => 'Thor',
'1T' => 'Tor Browser',
'TF' => 'TenFourFox',
'TB' => 'Tenta Browser',
'TE' => 'Tesla Browser',
'TZ' => 'Tizen Browser',
'TI' => 'Tint Browser',
'TL' => 'TrueLocation Browser',
'TC' => 'TUC Mini Browser',
'TU' => 'Tungsten',
'TG' => 'ToGate',
Expand All @@ -557,6 +578,7 @@ class Browser extends AbstractClientParser
'V3' => 'VD Browser',
'VE' => 'Venus Browser',
'WD' => 'Vewd Browser',
'V5' => 'VibeMate',
'N0' => 'Nova Video Downloader Pro',
'VS' => 'Viasat Browser',
'VI' => 'Vivaldi',
Expand All @@ -569,6 +591,7 @@ class Browser extends AbstractClientParser
'WP' => 'Web Explorer',
'W3' => 'Web Browser & Explorer',
'WE' => 'WebPositive',
'WX' => 'Wexond',
'WF' => 'Waterfox',
'WB' => 'Wave Browser',
'WA' => 'Wavebox',
Expand Down Expand Up @@ -643,14 +666,15 @@ class Browser extends AbstractClientParser
'1W', 'EV', 'I9', 'V4', 'H4', '1T', 'M5', '0S', '0C',
'ZR', 'D6', 'F6', 'RC', 'WD', 'P3', 'FT', 'A9', 'X2',
'N3', 'GD', 'O9', 'Q3', 'F7', 'K2', 'P5', 'H5', 'V3',
'K3', 'Q4', 'G2', 'R0', 'JO', 'R2',
'K3', 'Q4', 'G2', 'R2', 'WX', 'XP', '3I', 'BG', 'R0',
'JO', 'OL',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
'FB', 'FE', 'FF', 'FM', 'FR', 'FY', 'GZ', 'I4', 'IF',
'IW', 'LH', 'LY', 'MB', 'MN', 'MO', 'MY', 'OA', 'OS',
'PI', 'PX', 'QA', 'S5', 'SX', 'TF', 'TO', 'WF', 'ZV',
'FP', 'AD', 'WL',
'FP', 'AD', 'WL', '2I',
],
'Internet Explorer' => ['BZ', 'CZ', 'IE', 'IM', 'PS'],
'Konqueror' => ['KO'],
Expand Down Expand Up @@ -685,7 +709,7 @@ class Browser extends AbstractClientParser
'1W', 'EV', 'Z0', 'I9', 'V4', 'H4', 'M5', '0S', '0C',
'ZR', 'D6', 'F6', 'P3', 'FT', 'A9', 'X2', 'NI', 'FG',
'TH', 'N3', 'GD', 'O9', 'Q3', 'F7', 'K2', 'N4', 'P5',
'H5', 'V3', 'G2',
'H5', 'V3', 'G2', 'BG', 'OL', 'II', 'TL',
];

/**
Expand All @@ -696,9 +720,11 @@ class Browser extends AbstractClientParser
protected static $clientHintMapping = [
'Chrome' => ['Google Chrome'],
'Chrome Webview' => ['Android WebView'],
'Vewd Browser' => ['Vewd Core'],
'DuckDuckGo Privacy Browser' => ['DuckDuckGo'],
'Edge WebView' => ['Microsoft Edge WebView2'],
'Microsoft Edge' => ['Edge'],
'Norton Private Browser' => ['Norton Secure Browser'],
'Vewd Browser' => ['Vewd Core'],
];

/**
Expand Down Expand Up @@ -993,7 +1019,7 @@ protected function parseBrowserFromClientHints(): array
}

// If we detected a brand, that is not Chromium, we will use it, otherwise we will look further
if ('' !== $name && 'Chromium' !== $name) {
if ('' !== $name && 'Chromium' !== $name && 'Microsoft Edge' !== $name) {
break;
}
}
Expand Down
Loading

0 comments on commit be8de2c

Please sign in to comment.