Skip to content

Commit

Permalink
Adds detection for various browsers (matomo-org#7801)
Browse files Browse the repository at this point in the history
* Adds detection for TUSK
* Adds detection for Privacy Browser
* Adds detection for ProxyFox
* Adds detection for ProxyMax
* Adds detection for KeepSolid Browser
* Adds detection for ONION Browser
* Adds detection for Ai Browser
* Improves detection for CM Browser
* Adds detection for Internet Webbrowser
* Improves detection for Web Explorer
* Adds detection for Halo Browser
* Adds detection for MMBOX XBrowser
* Change ONION Browser to ONIONBrowser
* Adds detection for TV-Browser Internet
* Adds detection for XnBrowse
* Adds detection for Open Browser Lite
* Improves version detection for Aloha Browser
* Improves detection for Keepsafe Browser
* Improves detection for Hawk Turbo Browser
* Adds detection for TQ Browser
* Adds detection for RCA Tor Explorer
* Adds detection for Armorfly Browser
  • Loading branch information
liviuconcioiu authored Aug 29, 2024
1 parent 3c175fc commit ff9999d
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 5 deletions.
24 changes: 21 additions & 3 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class Browser extends AbstractClientParser
'4A' => 'Acoo Browser',
'BW' => 'AdBlock Browser',
'A7' => 'Adult Browser',
'8A' => 'Ai Browser',
'A9' => 'Airfind Secure Browser',
'AF' => 'ANT Fresco',
'AG' => 'ANTGalio',
Expand All @@ -108,6 +109,7 @@ class Browser extends AbstractClientParser
'PN' => 'APN Browser',
'6A' => 'Arachne',
'RA' => 'Arc',
'R5' => 'Armorfly Browser',
'AI' => 'Arvin',
'AK' => 'Ask.com',
'AU' => 'Asus Browser',
Expand Down Expand Up @@ -291,6 +293,7 @@ class Browser extends AbstractClientParser
'G2' => 'GO Browser',
'RN' => 'GreenBrowser',
'HW' => 'Habit Browser',
'H7' => 'Halo Browser',
'HB' => 'Harman Browser',
'HS' => 'HasBrowser',
'HA' => 'Hawk Turbo Browser',
Expand Down Expand Up @@ -327,6 +330,7 @@ class Browser extends AbstractClientParser
'I9' => 'Insta Browser',
'IE' => 'Internet Explorer',
'I7' => 'Internet Browser Secure',
'5I' => 'Internet Webbrowser',
'3I' => 'Intune Managed Browser',
'I5' => 'Indian UC Mini Browser',
'Z0' => 'InBrowser',
Expand All @@ -343,6 +347,7 @@ class Browser extends AbstractClientParser
'JZ' => 'JUZI Browser',
'KB' => 'K.Browser',
'KF' => 'Keepsafe Browser',
'K7' => 'KeepSolid Browser',
'KS' => 'Kids Safe Browser',
'KI' => 'Kindle Browser',
'KM' => 'K-meleon',
Expand Down Expand Up @@ -449,6 +454,7 @@ class Browser extends AbstractClientParser
'OL' => 'OnBrowser Lite',
'OE' => 'ONE Browser',
'N4' => 'Onion Browser',
'1N' => 'ONIONBrowser',
'Y1' => 'Opera Crypto',
'OX' => 'Opera GX',
'OG' => 'Opera Neon',
Expand All @@ -470,6 +476,7 @@ class Browser extends AbstractClientParser
'O4' => 'Open Browser',
'4U' => 'Open Browser 4U',
'5G' => 'Open Browser fast 5G',
'5O' => 'Open Browser Lite',
'O7' => 'Open TV Browser',
'OW' => 'OmniWeb',
'OT' => 'Otter Browser',
Expand Down Expand Up @@ -504,12 +511,15 @@ class Browser extends AbstractClientParser
'PT' => 'Polarity',
'LY' => 'PolyBrowser',
'9P' => 'Presearch',
'BP' => 'Privacy Browser',
'PI' => 'PrivacyWall',
'P4' => 'Privacy Explorer Fast Safe',
'P3' => 'Private Internet Browser',
'P5' => 'Proxy Browser',
'7P' => 'Proxyium',
'6P' => 'Proxynet',
'2F' => 'ProxyFox',
'2M' => 'ProxyMax',
'P2' => 'Pi Browser',
'P0' => 'PronHub Browser',
'PC' => 'PSI Secure Browser',
Expand All @@ -534,6 +544,7 @@ class Browser extends AbstractClientParser
'R3' => 'Rakuten Browser',
'R4' => 'Rakuten Web Search',
'R2' => 'Raspbian Chromium',
'RT' => 'RCA Tor Explorer',
'RE' => 'Realme Browser',
'RK' => 'Rekonq',
'RM' => 'RockMelt',
Expand Down Expand Up @@ -619,11 +630,14 @@ class Browser extends AbstractClientParser
'TI' => 'Tint Browser',
'TL' => 'TrueLocation Browser',
'TC' => 'TUC Mini Browser',
'TK' => 'TUSK',
'TU' => 'Tungsten',
'TG' => 'ToGate',
'T3' => 'Total Browser',
'TQ' => 'TQ Browser',
'TS' => 'TweakStyle',
'TV' => 'TV Bro',
'T4' => 'TV-Browser Internet',
'U0' => 'U Browser',
'UB' => 'UBrowser',
'UC' => 'UC Browser',
Expand Down Expand Up @@ -684,13 +698,15 @@ class Browser extends AbstractClientParser
'Y3' => 'YouBrowser',
'YZ' => 'Yuzu Browser',
'XR' => 'xBrowser',
'X3' => 'MMBOX XBrowser',
'XB' => 'X Browser Lite',
'X0' => 'X-VPN',
'X1' => 'xBrowser Pro Super Fast',
'XN' => 'XNX Browser',
'XT' => 'XtremeCast',
'XS' => 'xStand',
'XI' => 'Xiino',
'X4' => 'XnBrowse',
'XO' => 'Xooloo Internet',
'XV' => 'Xvast',
'ZE' => 'Zetakey',
Expand Down Expand Up @@ -744,7 +760,8 @@ class Browser extends AbstractClientParser
'K3', 'Q4', 'G2', 'R2', 'WX', 'XP', '3I', 'BG', 'R0',
'JO', 'OL', 'GN', 'W4', 'QI', 'E1', 'RI', '8B', '5B',
'K4', 'WK', 'T3', 'K5', 'MU', '9P', 'K6', 'VR', 'N9',
'M9', 'F9', '0P', '0A', 'JR', 'D3',
'M9', 'F9', '0P', '0A', 'JR', 'D3', 'TK', 'BP', '2F',
'2M', 'K7', '1N', '8A', 'H7', 'X3', 'T4', 'X4', '5O',
],
'Firefox' => [
'FF', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -791,7 +808,8 @@ class Browser extends AbstractClientParser
'M7', 'GN', 'JR', 'IG', 'HW', '4O', 'OU', '5P', 'KE',
'5A', 'TT', '6P', 'G3', '7P', 'VU', 'F8', 'L4', 'DK',
'DP', 'KL', 'K4', 'N6', 'KU', 'WK', 'M8', 'UP', 'ZT',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A', '2F',
'2M', 'K7', '1N', '8A', 'H7', 'X3', 'X4', '5O',
];

/**
Expand Down Expand Up @@ -1017,7 +1035,7 @@ public function parse(): ?array

// If client hints report the following browsers, we use the version from useragent
if (!empty($browserFromUserAgent['version'])
&& \in_array($short, ['JR', 'MU', 'OM', 'OP', 'VR'])
&& \in_array($short, ['AL', 'JR', 'MU', 'OM', 'OP', 'VR'])
) {
$version = $browserFromUserAgent['version'];
}
Expand Down
229 changes: 229 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9914,3 +9914,232 @@
engine: Blink
engine_version: 106.0.5249.199
family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 13; motorola edge 5G UW (2021) Build/T1RM33.1-110-17; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.71 Mobile Safari/537.36 TUSK/0.2.01
client:
type: browser
name: TUSK
version: 0.2.01
engine: Blink
engine_version: 126.0.6478.71
family: Chrome
headers:
http-x-requested-with: com.vworldc.tusk
-
user_agent: PrivacyBrowser/1.0
client:
type: browser
name: Privacy Browser
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
http-x-requested-with: com.stoutner.privacybrowser.standard
-
user_agent: Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.144 Mobile ProxyFox/11 Safari/537.36
client:
type: browser
name: ProxyFox
version: ""
engine: Blink
engine_version: 120.0.6099.144
family: Chrome
headers:
http-x-requested-with: com.techlastudio.proxyfoxbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 14) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.134 Mobile DuckDuckGo/21 Safari/537.36
client:
type: browser
name: ProxyMax
version: ""
engine: Blink
engine_version: 126.0.6478.134
family: Chrome
headers:
http-x-requested-with: com.vielianztlabs.browser
-
user_agent: Mozilla/5.0 (Linux; Android 13; SM-X916B Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/116.0.0.0 Safari/537.36
client:
type: browser
name: KeepSolid Browser
version: ""
engine: Blink
engine_version: 116.0.0.0
family: Chrome
headers:
http-x-requested-with: com.keepsolid.privatebrowser
-
user_agent: Mozilla/5.0 (Linux; Android 13) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/1.0.8 Chrome/123.0.6312.118 Mobile Safari/537.36
client:
type: browser
name: ONIONBrowser
version: ""
engine: Blink
engine_version: 123.0.6312.118
family: Chrome
headers:
http-x-requested-with: com.onionsearchengine.focus
-
user_agent: Mozilla/5.0 (Linux; Android 11; SM-T295 Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/125.0.6422.165 Safari/537.36
client:
type: browser
name: Ai Browser
version: ""
engine: Blink
engine_version: 125.0.6422.165
family: Chrome
headers:
http-x-requested-with: com.best.quick.browser
-
user_agent: Mozilla/5.0 (Linux; Android 13; SM-S908E Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36 ACHEETAHI/1
client:
type: browser
name: Armorfly Browser
version: ""
engine: Blink
engine_version: 44.0.2403.119
family: Chrome
headers:
http-x-requested-with: com.cmcm.armorfly
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
client:
type: browser
name: Internet Webbrowser
version: ""
engine: Blink
engine_version: 121.0.0.0
family: Chrome
headers:
http-x-requested-with: miada.tv.webbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 12) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/121.0.6167.143 Mobile Safari/537.36 webexplorer/4
client:
type: browser
name: Web Explorer
version: "4"
engine: Blink
engine_version: 121.0.6167.143
family: Chrome
headers:
http-x-requested-with: com.kaweapp.webexplorer
-
user_agent: Mozilla/5.0 (Linux; U; Android 12; de-de; NTH-NX9 Build/HONORNTH-N29) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/120.0.6099.144 Mobile Safari/537.36 Hawk/QuickBrowser/1.0.35
client:
type: browser
name: Halo Browser
version: ""
engine: Blink
engine_version: 120.0.6099.144
family: Chrome
headers:
http-x-requested-with: com.halo.browser
-
user_agent: Mozilla/5.0 (Linux; Android 14; 23028RA60L Build/UKQ1.230917.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.123 Mobile Safari/537.36
client:
type: browser
name: MMBOX XBrowser
version: ""
engine: Blink
engine_version: 124.0.6367.123
family: Chrome
headers:
http-x-requested-with: com.mmbox.xbrowser
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
client:
type: browser
name: TV-Browser Internet
version: ""
engine: Blink
engine_version: 91.0.4472.124
family: Chrome
headers:
http-x-requested-with: com.tvwebbrowser.v22
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
client:
type: browser
name: TV-Browser Internet
version: ""
engine: ""
engine_version: ""
family: Chrome
headers:
Sec-CH-UA: '"Android WebView";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'
http-x-requested-with: com.tvwebbrowserpaid.v22
-
user_agent: XXXAndroidApp/
client:
type: browser
name: XnBrowse
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
http-x-requested-with: xnx.browser.browse.Xnxnewx
-
user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
client:
type: browser
name: Open Browser Lite
version: ""
engine: Blink
engine_version: 118.0.0.0
family: Chrome
headers:
http-x-requested-with: com.metax.browser
-
user_agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 AlohaBrowser/5.10.2
client:
type: browser
name: Aloha Browser
version: 5.10.2
engine: Blink
engine_version: 123.0.0.0
family: ""
headers:
Sec-CH-UA: '"Not_A Brand";v="99", "Aloha Browser";v="123", "Chromium";v="123"'
http-x-requested-with: AlohaBrowser
-
user_agent: Mozilla/5.0 (Linux; Android 7.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Focus/5.0 Chrome/65.0.3325.109 Mobile Safari/537.36 Keepsafe Browser/1.0
client:
type: browser
name: Keepsafe Browser
version: "1.0"
engine: Blink
engine_version: 65.0.3325.109
family: ""
headers:
http-x-requested-with: com.getkeepsafe.browser
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; 5059D Build/O11019; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/118.0.0.0 Mobile Safari/537.36 Hawk/TurboBrowser/v3.0.0.4.23.12271827
client:
type: browser
name: Hawk Turbo Browser
version: 3.0.0.4.23.12271827
engine: Blink
engine_version: 118.0.0.0
family: Chrome
headers:
http-x-requested-with: com.hawk.android.browser
-
user_agent: TQBrowser/105 CFNetwork/1496.0.7 Darwin/23.5.0
client:
type: browser
name: TQ Browser
version: ""
engine: ""
engine_version: ""
family: ""
-
user_agent: RCATorExplorer/7 CFNetwork/1496.0.7 Darwin/23.5.0
client:
type: browser
name: RCA Tor Explorer
version: ""
engine: ""
engine_version: ""
family: ""
Loading

0 comments on commit ff9999d

Please sign in to comment.