Skip to content

Commit

Permalink
Detect new browsers: Vertex Surf, InBrowser, Every Browser, World Bro…
Browse files Browse the repository at this point in the history
…wser, Holla Web Browser, Tor Browser (#7520)

* feat(browser): detect World Browser - Fast & Simple
feat(browser): detect Every Browser

ref #7039

* feat(browser): detect Insta Browser (com.insta.browser)
feat(browser): detect InBrowser (nu.tommie.inbrowser)
feat(browser): detect Vertex Surf (com.alohamobile.vertexsurf)
feat(app): detect BOX Video Downloader (com.box.video.downloader)
feat(browser): detect MIUI Browser (com.mi.globalbrowser)
feat(browser): detect Puffin Web Browser (com.cloudmosa.puffin)

ref #7039

* feat(browser): detect Holla Web Browser (com.hollabrowser.meforce)

ref #7039

* fix: phpcs

* feat(browser): detect Anka Browser Video (com.anka.browser)
feat(browser): detect Dark Browser (com.darkbrowser)
feat(browser): detect Cave Browser (com.cavebrowser)
feat(browser): detect Freedom Browser (freedom.theanarch.org.freedom)
feat(browser): detect MarsLab Web Browser (com.marslab.browserz)
feat(browser): detect Sunflower Browser (com.mini.web.browser)
feat(browser): detect Tor Browser (org.torproject.torbrowser)
feat(browser): detect Zordo Browser (com.zordo.browser)

ref #7039

* feat(browser): detect Anka Browser (com.anka.browser)

* fix test

---------

Co-authored-by: Stefan Giehl <[email protected]>
  • Loading branch information
sanchezzzhak and sgiehl authored Nov 24, 2023
1 parent 9672705 commit 055fc22
Show file tree
Hide file tree
Showing 8 changed files with 276 additions and 1 deletion.
24 changes: 24 additions & 0 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class Browser extends AbstractClientParser
'1D' => 'Dragon Browser',
'1E' => 'Easy Browser',
'DW' => 'Dark Web Browser',
'D6' => 'Dark Browser',
'18' => '18+ Privacy Browser',
'1B' => '115 Browser',
'DM' => '1DM Browser',
Expand Down Expand Up @@ -143,6 +144,7 @@ class Browser extends AbstractClientParser
'BF' => 'Byffox',
'B4' => 'BF Browser',
'CA' => 'Camino',
'0C' => 'Cave Browser',
'CL' => 'CCleaner',
'C8' => 'CG Browser',
'CJ' => 'ChanjetCloud',
Expand Down Expand Up @@ -201,6 +203,7 @@ class Browser extends AbstractClientParser
'DD' => 'DuckDuckGo Privacy Browser',
'EC' => 'Ecosia',
'EW' => 'Edge WebView',
'EV' => 'Every Browser',
'EI' => 'Epic',
'EL' => 'Elinks',
'EN' => 'EinkBro',
Expand Down Expand Up @@ -236,6 +239,7 @@ class Browser extends AbstractClientParser
'FS' => 'Flast',
'F5' => 'Flyperlink',
'FU' => 'FreeU',
'F6' => 'Freedom Browser',
'F3' => 'Frost+',
'FI' => 'Fulldive',
'GA' => 'Galeon',
Expand All @@ -255,6 +259,7 @@ class Browser extends AbstractClientParser
'HX' => 'Hexa Web Browser',
'HI' => 'Hi Browser',
'HO' => 'hola! Browser',
'H4' => 'Holla Web Browser',
'HJ' => 'HotJava',
'HT' => 'HTC Browser',
'HU' => 'Huawei Browser Mobile',
Expand All @@ -274,9 +279,11 @@ class Browser extends AbstractClientParser
'I8' => 'IVVI Browser',
'IW' => 'Iceweasel',
'IN' => 'Inspect Browser',
'I9' => 'Insta Browser',
'IE' => 'Internet Explorer',
'I7' => 'Internet Browser Secure',
'I5' => 'Indian UC Mini Browser',
'Z0' => 'InBrowser',
'IM' => 'IE Mobile',
'IR' => 'Iron',
'JB' => 'Japan Browser',
Expand Down Expand Up @@ -321,6 +328,7 @@ class Browser extends AbstractClientParser
'LX' => 'Lynx',
'L2' => 'Lynket Browser',
'MD' => 'Mandarin',
'M5' => 'MarsLab Web Browser',
'M1' => 'mCent',
'MB' => 'MicroB',
'MC' => 'NCSA Mosaic',
Expand Down Expand Up @@ -480,6 +488,7 @@ class Browser extends AbstractClientParser
'S2' => 'Splash',
'SI' => 'Sputnik Browser',
'SR' => 'Sunrise',
'0S' => 'Sunflower Browser',
'SP' => 'SuperBird',
'SU' => 'Super Fast Browser',
'5S' => 'SuperFast Browser',
Expand All @@ -498,6 +507,7 @@ class Browser extends AbstractClientParser
'TR' => 'T-Browser',
'TO' => 't-online.de Browser',
'TA' => 'Tao Browser',
'1T' => 'Tor Browser',
'TF' => 'TenFourFox',
'TB' => 'Tenta Browser',
'TE' => 'Tesla Browser',
Expand Down Expand Up @@ -527,6 +537,7 @@ class Browser extends AbstractClientParser
'VV' => 'vivo Browser',
'V2' => 'Vivid Browser Mini',
'VB' => 'Vision Mobile Browser',
'V4' => 'Vertex Surf',
'VM' => 'VMware AirWatch',
'WI' => 'Wear Internet Browser',
'WP' => 'Web Explorer',
Expand All @@ -538,6 +549,7 @@ class Browser extends AbstractClientParser
'WH' => 'Whale Browser',
'WO' => 'wOSBrowser',
'WT' => 'WeTab Browser',
'1W' => 'World Browser',
'WL' => 'Wolvic',
'YG' => 'YAGI',
'YJ' => 'Yahoo! Japan Browser',
Expand All @@ -561,6 +573,7 @@ class Browser extends AbstractClientParser
'ZE' => 'Zetakey',
'ZV' => 'Zvu',
'ZI' => 'Zirco Browser',
'ZR' => 'Zordo Browser',

// detected browsers in older versions
// 'IA' => 'Iceape', => pim
Expand Down Expand Up @@ -601,6 +614,8 @@ class Browser extends AbstractClientParser
'F4', 'YG', 'WR', 'NA', 'DM', '1M', 'A7', 'XN', 'XT',
'XB', 'W1', 'HT', 'B8', 'F5', 'B9', 'WA', 'T0', 'HC',
'O6', 'P7', 'LJ', 'LC', 'O7', 'N2', 'A8', 'P8', 'RB',
'1W', 'EV', 'I9', 'V4', 'H4', '1T', 'M5', '0S', '0C',
'ZR', 'D6', 'F6',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -639,6 +654,8 @@ class Browser extends AbstractClientParser
'B5', 'B6', 'TC', 'A6', '2X', 'F4', 'YG', 'WR', 'NA',
'DM', '1M', 'A7', 'XN', 'XT', 'XB', 'W1', 'HT', 'B7',
'B9', 'T0', 'I8', 'O6', 'P7', 'O8', '4B', 'A8', 'P8',
'1W', 'EV', 'Z0', 'I9', 'V4', 'H4', 'M5', '0S', '0C',
'ZR', 'D6', 'F6',
];

/**
Expand Down Expand Up @@ -879,6 +896,13 @@ public function parse(): ?array
$engineVersion = '';
}

// the browser simulate ua for Android OS
if ('Every Browser' === $name) {
$family = 'Chrome';
$engine = 'Blink';
$engineVersion = '';
}

return [
'type' => 'browser',
'name' => $name,
Expand Down
5 changes: 4 additions & 1 deletion Parser/OperatingSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ public function parse(): ?array

$platform = $this->parsePlatform();
$family = self::getOsFamily($short);
$androidApps = ['com.hisense.odinbrowser', 'com.seraphic.openinet.pre', 'com.appssppa.idesktoppcbrowser'];
$androidApps = [
'com.hisense.odinbrowser', 'com.seraphic.openinet.pre', 'com.appssppa.idesktoppcbrowser',
'every.browser.inc',
];

if (null !== $this->clientHints) {
if (\in_array($this->clientHints->getApp(), $androidApps) && 'Android' !== $name) {
Expand Down
185 changes: 185 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7639,3 +7639,188 @@
engine: Blink
engine_version: 84.0.4147.38
family: Chrome
-
user_agent: Mozilla/5.0 (Linux; Android 10; SM-J600G Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/81.0.4044.138 Mobile Safari/537.36
client:
type: browser
name: World Browser
version: ""
engine: Blink
engine_version: 81.0.4044.138
family: Chrome
headers:
http-x-requested-with: com.browser.elmurzaev
-
user_agent: Mozilla/5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1
client:
type: browser
name: Every Browser
version: ""
engine: Blink
engine_version: ""
family: Chrome
headers:
http-x-requested-with: every.browser.inc
-
user_agent: Mozilla/5.0 (Linux; U; Android 10; az-az; Mi 10 Build/QKQ1.191117.002) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/79.0.3945.147 Mobile Safari/537.36 XiaoMi/MiuiBrowser/12.6.2.2-gn
client:
type: browser
name: MIUI Browser
version: 12.6.2.2
engine: WebKit
engine_version: "537.36"
family: Android Browser
headers:
http-x-requested-with: com.mi.globalbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 4.4.2; Tornado 348 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/30.0.0.0 Mobile Safari/537.36
client:
type: browser
name: InBrowser
version: ""
engine: Blink
engine_version: 30.0.0.0
family: Chrome
headers:
http-x-requested-with: nu.tommie.inbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 7.0; Impress_Life Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/59.0.3071.125 Mobile Safari/537.36
client:
type: browser
name: Puffin Web Browser
version: ""
engine: Blink
engine_version: 59.0.3071.125
family: Chrome
headers:
http-x-requested-with: com.cloudmosa.puffin
-
user_agent: Mozilla/5.0 (Linux; Android 9; STF-L09 Build/HUAWEISTF-L09; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/72.0.3626.121 Mobile Safari/537.36
client:
type: browser
name: Insta Browser
version: ""
engine: Blink
engine_version: 72.0.3626.121
family: Chrome
headers:
http-x-requested-with: com.insta.browser
-
user_agent: Mozilla/5.0 (Linux; Android 9; ZTE 2050RU Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/87.0.4280.101 Mobile Safari/537.36 VertexSurf/1.3.3.0 AlohaBrowser/2.7.0.3
client:
type: browser
name: Vertex Surf
version: 1.3.3.0
engine: Blink
engine_version: 87.0.4280.101
family: Chrome
-
user_agent: Mozilla/5.0 Linux; Android 9; HUAWEI POT-LX1 Build/NMF26F AppleWebKit/537.36 KHTML, like Gecko Chrome/74.0.3729.157 Mobile Safari/537.36 VertexSurf/1.3.0.0 AlohaBrowser/1.3.3.0
client:
type: browser
name: Vertex Surf
version: 1.3.0.0
engine: Blink
engine_version: 74.0.3729.157
family: Chrome
headers:
http-x-requested-with: com.alohamobile.vertexsurf
-
user_agent: Mozilla/5.0 (Linux; Android 11; M1908C3JGG Build/RP1A.200720.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/98.0.4758.101 Mobile Safari/537.36
client:
type: browser
name: Holla Web Browser
version: ""
engine: Blink
engine_version: 98.0.4758.101
family: Chrome
headers:
http-x-requested-with: com.hollabrowser.meforce
-
user_agent: Mozilla/5.0 (Linux; Android 12; V2120 Build/SP1A.210812.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.136 Mobile Safari/537.36
client:
type: browser
name: Tor Browser
version: ""
engine: Blink
engine_version: 105.0.5195.136
family: Chrome
headers:
http-x-requested-with: org.torproject.torbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 12; SM-A127F Build/SP1A.210812.016; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/115.0.5790.166 Mobile Safari/537.36
client:
type: browser
name: MarsLab Web Browser
version: ""
engine: Blink
engine_version: 115.0.5790.166
family: Chrome
headers:
http-x-requested-with: com.marslab.browserz
-
user_agent: Mozilla/5.0 (Linux; Android 10; M2004J19C Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.79 Mobile Safari/537.36
client:
type: browser
name: Sunflower Browser
version: ""
engine: Blink
engine_version: 105.0.5195.79
family: Chrome
headers:
http-x-requested-with: com.mini.web.browser
-
user_agent: Mozilla/5.0 (Linux; Android 10; HRY-LX1T Build/HONORHRY-LX1T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Mobile Safari/537.36;UUID=40f424d2-40c4-4e17-81a5-66de371011e5
client:
type: browser
name: Cave Browser
version: ""
engine: Blink
engine_version: 70.0.3538.77
family: Chrome
headers:
http-x-requested-with: com.cavebrowser
-
user_agent: Mozilla/5.0 (Linux; Android 10; Redmi Note 7 Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36
client:
type: browser
name: Zordo Browser
version: ""
engine: Blink
engine_version: 87.0.4280.141
family: Chrome
headers:
http-x-requested-with: com.zordo.browser
-
user_agent: Mozilla/5.0 (Linux; Android 9; ZTE Blade A3 2020RU Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/104.0.5112.97 Mobile Safari/537.36
client:
type: browser
name: Dark Browser
version: ""
engine: Blink
engine_version: 104.0.5112.97
family: Chrome
headers:
http-x-requested-with: com.darkbrowser
-
user_agent: Mozilla/5.0 (Linux; Android 11; SM-A525F Build/RP1A.200720.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/102.0.5005.125 Mobile Safari/537.36
client:
type: browser
name: Freedom Browser
version: ""
engine: Blink
engine_version: 102.0.5005.125
family: Chrome
headers:
http-x-requested-with: freedom.theanarch.org.freedom
-
user_agent: Mozilla/5.0 (Linux; Android 8.1.0; ru-; DRA-LX5 Build/HUAWEIDRA-LX5;) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36
client:
type: browser
name: Anka Browser
version: ""
engine: Blink
engine_version: 55.0.2883.91
family: Chrome
headers:
http-x-requested-with: com.anka.browser
18 changes: 18 additions & 0 deletions Tests/fixtures/clienthints-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2179,3 +2179,21 @@
model: MediaPad T3 7
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 10; SM-T865 Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/86.0.4240.110 Safari/537.36
headers:
http-x-requested-with: com.box.video.downloader
os:
name: Android
version: "10"
platform: ""
client:
type: mobile app
name: BOX Video Downloader
version: ""
device:
type: tablet
brand: Samsung
model: Galaxy Tab S6 10.5"
os_family: Android
browser_family: Unknown
20 changes: 20 additions & 0 deletions Tests/fixtures/unknown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3285,3 +3285,23 @@
model: X98 S500
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (iPad; CPU OS 13_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Mobile/15E148 Safari/604.1
os:
name: Android
version: ""
platform: ""
client:
type: browser
name: Every Browser
version: ""
engine: Blink
engine_version: ""
device:
type: ""
brand: ""
model: ""
os_family: Android
browser_family: Chrome
headers:
http-x-requested-with: every.browser.inc
7 changes: 7 additions & 0 deletions regexes/client/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,13 @@
engine:
default: 'Gecko'

# VertexSurf
- regex: 'VertexSurf/(\d+\.[.\d]+)'
name: 'Vertex Surf'
version: '$1'
engine:
default: 'Blink'

#AlohaBrowser
- regex: 'Chrome/.+ AlohaBrowser(?:/(\d+[\.\d]+))?'
name: 'Aloha Browser'
Expand Down
Loading

0 comments on commit 055fc22

Please sign in to comment.