Skip to content

Commit

Permalink
feat(browser): detect Insta Browser (com.insta.browser)
Browse files Browse the repository at this point in the history
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 matomo-org#7039
  • Loading branch information
sanchezzzhak committed Nov 22, 2023
1 parent 13a3efa commit 1c7512c
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,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 @@ -528,6 +530,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 Down Expand Up @@ -603,7 +606,7 @@ 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',
'1W', 'EV', 'I9', 'V4',
],
'Firefox' => [
'AX', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -642,7 +645,7 @@ 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',
'1W', 'EV', 'Z0', 'I9',
];

/**
Expand Down
64 changes: 64 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7661,3 +7661,67 @@
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
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
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
1 change: 1 addition & 0 deletions regexes/client/hints/apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
'com.flatfish.cal.privacy': 'HideX'
'com.sweep.cleaner.trash.junk': 'Sweep'
'com.google.android.apps.maps': 'Google Maps'
'com.box.video.downloader': 'BOX Video Downloader'

# Vpns
'org.torproject.android': 'Orbot'
Expand Down
6 changes: 6 additions & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'anar.app.darkweb': 'Dark Web Browser'
'com.kiwibrowser.browser': 'Kiwi'
'com.cloudmosa.puffinFree': 'Puffin Web Browser'
'com.cloudmosa.puffin': 'Puffin Web Browser' # Puffin Cloud Browser or Puffin Web Browser Pro
'com.aloha.browser': 'Aloha Browser'
'com.cake.browser': 'Cake Browser'
'com.UCMobile.intl': 'UC Browser'
Expand All @@ -23,6 +24,7 @@
'com.mi.globalbrowser.mini': 'Mint Browser'
'com.hisense.odinbrowser': 'Odin Browser'
'com.brave.browser': 'Brave'
'com.brave.browser_beta': 'Brave'
'org.mozilla.klar': 'Firefox Klar'
'phx.hot.browser': 'Anka Browser'
'org.mozilla.focus': 'Firefox Focus'
Expand Down Expand Up @@ -210,3 +212,7 @@
'com.sec.android.app.sbrowser.lite': 'Samsung Browser Lite'
'com.browser.elmurzaev': 'World Browser - Fast & Simple'
'every.browser.inc': 'Every Browser'
'com.mi.globalbrowser': 'MIUI Browser'
'nu.tommie.inbrowser': 'InBrowser'
'com.insta.browser': 'Insta Browser'
'com.alohamobile.vertexsurf': 'Vertex Surf'

0 comments on commit 1c7512c

Please sign in to comment.