Skip to content

Commit

Permalink
Adds detection for Privacy Pioneer Browser, Mojeek and improves detec…
Browse files Browse the repository at this point in the history
…tion for various apps and browsers (matomo-org#7839)

* Adds detection for Mojeek
* Improves detection for Telegram
* Improves detection for ZTE Browser
* Improves detection for Via
* Adds detection for Privacy Pioneer Browser
  • Loading branch information
liviuconcioiu authored Sep 20, 2024
1 parent 45c0e98 commit b656f2b
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Parser/Client/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@ class Browser extends AbstractClientParser
'BP' => 'Privacy Browser',
'PI' => 'PrivacyWall',
'P4' => 'Privacy Explorer Fast Safe',
'X5' => 'Privacy Pioneer Browser',
'P3' => 'Private Internet Browser',
'P5' => 'Proxy Browser',
'7P' => 'Proxyium',
Expand Down Expand Up @@ -766,7 +767,7 @@ class Browser extends AbstractClientParser
'K4', 'WK', 'T3', 'K5', 'MU', '9P', 'K6', 'VR', 'N9',
'M9', 'F9', '0P', '0A', 'JR', 'D3', 'TK', 'BP', '2F',
'2M', 'K7', '1N', '8A', 'H7', 'X3', 'T4', 'X4', '5O',
'8C', '3M', '6I', '2P', 'PU', '7I',
'8C', '3M', '6I', '2P', 'PU', '7I', 'X5',
],
'Firefox' => [
'FF', 'BI', 'BF', 'BH', 'BN', 'C0', 'CU', 'EI', 'F1',
Expand Down Expand Up @@ -815,7 +816,7 @@ class Browser extends AbstractClientParser
'DP', 'KL', 'K4', 'N6', 'KU', 'WK', 'M8', 'UP', 'ZT',
'9P', 'N8', 'VR', 'N9', 'M9', 'F9', '0P', '0A', '2F',
'2M', 'K7', '1N', '8A', 'H7', 'X3', 'X4', '5O', '6I',
'7I',
'7I', 'X5',
];

/**
Expand Down
33 changes: 33 additions & 0 deletions Tests/Parser/Client/fixtures/browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10279,3 +10279,36 @@
family: Chrome
headers:
http-x-requested-with: com.cloudmosa.puffinCloudBrowser
-
user_agent: Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML,like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36
client:
type: browser
name: ZTE Browser
version: ""
engine: Blink
engine_version: 127.0.0.0
family: Chrome
headers:
http-x-requested-with: com.zte.nubrowser
-
user_agent: Mozilla/5.0 (Linux; Android 14; 23076PC4BI Build/UKQ1.230917.001) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.6533.64 Mobile Safari/537.36
client:
type: browser
name: Via
version: ""
engine: Blink
engine_version: 127.0.6533.64
family: Chrome
headers:
http-x-requested-with: mark.viah
-
user_agent: Mozilla/5.0 (Linux; Android 14; SM-A546V Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.0.6478.134 Mobile Safari/537.36
client:
type: browser
name: Privacy Pioneer Browser
version: ""
engine: Blink
engine_version: 126.0.6478.134
family: Chrome
headers:
http-x-requested-with: com.cloaktp.browser
6 changes: 6 additions & 0 deletions Tests/Parser/Client/fixtures/mobile_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2141,3 +2141,9 @@
type: mobile app
name: The Crossword
version: 5.5.0
-
user_agent: mojeek-app
client:
type: mobile app
name: Mojeek
version: ""
39 changes: 39 additions & 0 deletions Tests/fixtures/clienthints-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2804,3 +2804,42 @@
model: Galaxy Tab A7 10.4" (2020) WiFi
os_family: Android
browser_family: Unknown
-
user_agent: mojeek-app
headers:
Sec-CH-UA: '"Chromium";v="128", "Not;A=Brand";v="24", "Android WebView";v="128"'
Sec-CH-UA-Platform: "Android"
Sec-CH-UA-Mobile: "?1"
http-x-requested-with: mojeek.app
os:
name: Android
version: ""
platform: ""
client:
type: mobile app
name: Mojeek
version: ""
device:
type: ""
brand: ""
model: ""
os_family: Android
browser_family: Unknown
-
user_agent: Mozilla/5.0 (Linux; Android 14; K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/127.0.6533.103 Mobile Safari/537.36
headers:
http-x-requested-with: org.telegram.messenger.web
os:
name: Android
version: "14"
platform: ""
client:
type: mobile app
name: Telegram
version: ""
device:
type: smartphone
brand: ""
model: ""
os_family: Android
browser_family: Unknown
2 changes: 2 additions & 0 deletions regexes/client/hints/apps.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Apps

'org.telegram.messenger': 'Telegram'
'org.telegram.messenger.web': 'Telegram'
'com.snapchat.android': 'Snapchat'
'info.sunista.app': 'Sanista Persian Instagram'
'com.instapro.app': 'InstaPro'
Expand Down Expand Up @@ -146,6 +147,7 @@
'com.nytimes.crossword': 'The Crossword'
'castify.roku': 'Castify'
'com.castify': 'Castify'
'mojeek.app': 'Mojeek'

# Vpns
'org.torproject.android': 'Orbot'
Expand Down
3 changes: 3 additions & 0 deletions regexes/client/hints/browsers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
'mark.via.gp': 'Via'
'mark.via.gq': 'Via'
'mark.via.pm': 'Via'
'mark.viah': 'Via'
'com.pure.mini.browser': 'Pure Mini Browser'
'pure.lite.browser': 'Pure Lite Browser'
'acr.browser.Hexa': 'Hexa Web Browser'
Expand Down Expand Up @@ -319,3 +320,5 @@
'com.metax.browser': 'Open Browser Lite'
'com.getkeepsafe.browser': 'Keepsafe Browser'
'com.hawk.android.browser': 'Hawk Turbo Browser'
'com.zte.nubrowser': 'ZTE Browser'
'com.cloaktp.browser': 'Privacy Pioneer Browser'
5 changes: 5 additions & 0 deletions regexes/client/mobile_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2540,6 +2540,11 @@
name: 'The Crossword'
version: '$1'

# Mojeek (https://play.google.com/store/apps/details?id=mojeek.app)
- regex: 'mojeek-app'
name: 'Mojeek'
version: ''

# Electron generic apps
- regex: ' (?!(?:AppleWebKit|brave|Franz|Mailspring|Notion|Basecamp|Evernote|catalyst|ramboxpro|BlueMail|BeakerBrowser|Dezor|TweakStyle|Colibri|Polypane|VibeMate|(?:d|LT|Glass|Sushi|Flash|OhHai)Browser|Sizzy))([a-z0-9]*)(?:-desktop|-electron-app)?/(\d+\.[\d.]+).*Electron/'
name: '$1'
Expand Down

0 comments on commit b656f2b

Please sign in to comment.