feat(cloudron): add tirreno package artifacts
- Add CloudronStack/output/CloudronPackages-Artifacts/tirreno/ directory and its contents - Includes package manifest, Dockerfile, source code, documentation, and build artifacts - Add tirreno-1761840148.tar.gz as a build artifact - Add tirreno-cloudron-package-1761841304.tar.gz as the Cloudron package - Include all necessary files for the tirreno Cloudron package This adds the complete tirreno Cloudron package artifacts to the repository.
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
interface CacheInterface
|
||||
{
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function fetch(string $id);
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function contains(string $id): bool;
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
* @param mixed $data
|
||||
* @param int $lifeTime
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool;
|
||||
|
||||
/**
|
||||
* @param string $id
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(string $id): bool;
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function flushAll(): bool;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
use Doctrine\Common\Cache\CacheProvider;
|
||||
|
||||
class DoctrineBridge implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* @var CacheProvider
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
/**
|
||||
* @param CacheProvider $cache
|
||||
*/
|
||||
public function __construct(CacheProvider $cache)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function fetch(string $id)
|
||||
{
|
||||
return $this->cache->fetch($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contains(string $id): bool
|
||||
{
|
||||
return $this->cache->contains($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool
|
||||
{
|
||||
return $this->cache->save($id, $data, $lifeTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function delete(string $id): bool
|
||||
{
|
||||
return $this->cache->delete($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function flushAll(): bool
|
||||
{
|
||||
return $this->cache->flushAll();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
class LaravelCache implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function fetch(string $id)
|
||||
{
|
||||
return Cache::get($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contains(string $id): bool
|
||||
{
|
||||
return Cache::has($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool
|
||||
{
|
||||
return Cache::put($id, $data, \func_num_args() < 3 ? null : $lifeTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function delete(string $id): bool
|
||||
{
|
||||
return Cache::forget($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function flushAll(): bool
|
||||
{
|
||||
return Cache::flush();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
use Psr\SimpleCache\CacheInterface as PsrCacheInterface;
|
||||
|
||||
class PSR16Bridge implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* @var PsrCacheInterface
|
||||
*/
|
||||
private $cache;
|
||||
|
||||
/**
|
||||
* PSR16Bridge constructor.
|
||||
* @param PsrCacheInterface $cache
|
||||
*/
|
||||
public function __construct(PsrCacheInterface $cache)
|
||||
{
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function fetch(string $id)
|
||||
{
|
||||
return $this->cache->get($id, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contains(string $id): bool
|
||||
{
|
||||
return $this->cache->has($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool
|
||||
{
|
||||
return $this->cache->set($id, $data, \func_num_args() < 3 ? null : $lifeTime);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function delete(string $id): bool
|
||||
{
|
||||
return $this->cache->delete($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function flushAll(): bool
|
||||
{
|
||||
return $this->cache->clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
use Psr\Cache\CacheItemPoolInterface;
|
||||
|
||||
class PSR6Bridge implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* @var CacheItemPoolInterface
|
||||
*/
|
||||
private $pool;
|
||||
|
||||
/**
|
||||
* PSR6Bridge constructor.
|
||||
* @param CacheItemPoolInterface $pool
|
||||
*/
|
||||
public function __construct(CacheItemPoolInterface $pool)
|
||||
{
|
||||
$this->pool = $pool;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function fetch(string $id)
|
||||
{
|
||||
$item = $this->pool->getItem($id);
|
||||
|
||||
return $item->isHit() ? $item->get() : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function contains(string $id): bool
|
||||
{
|
||||
return $this->pool->hasItem($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool
|
||||
{
|
||||
$item = $this->pool->getItem($id);
|
||||
$item->set($data);
|
||||
|
||||
if (\func_num_args() > 2) {
|
||||
$item->expiresAfter($lifeTime);
|
||||
}
|
||||
|
||||
return $this->pool->save($item);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function delete(string $id): bool
|
||||
{
|
||||
return $this->pool->deleteItem($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function flushAll(): bool
|
||||
{
|
||||
return $this->pool->clear();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Cache;
|
||||
|
||||
/**
|
||||
* Class StaticCache
|
||||
*
|
||||
* Simple Cache that caches in a static property
|
||||
* (Speeds up multiple detections in one request)
|
||||
*/
|
||||
class StaticCache implements CacheInterface
|
||||
{
|
||||
/**
|
||||
* Holds the static cache data
|
||||
* @var array
|
||||
*/
|
||||
protected static $staticCache = [];
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function fetch(string $id)
|
||||
{
|
||||
return $this->contains($id) ? self::$staticCache[$id] : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function contains(string $id): bool
|
||||
{
|
||||
return isset(self::$staticCache[$id]) || \array_key_exists($id, self::$staticCache);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function save(string $id, $data, int $lifeTime = 0): bool
|
||||
{
|
||||
self::$staticCache[$id] = $data;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function delete(string $id): bool
|
||||
{
|
||||
unset(self::$staticCache[$id]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function flushAll(): bool
|
||||
{
|
||||
self::$staticCache = [];
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,373 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector;
|
||||
|
||||
class ClientHints
|
||||
{
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Arch` header field: The underlying architecture's instruction set
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $architecture = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Bitness` header field: The underlying architecture's bitness
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $bitness = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Mobile` header field: whether the user agent should receive a specifically "mobile" UX
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $mobile = false;
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Model` header field: the user agent's underlying device model
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $model = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Platform` header field: the platform's brand
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $platform = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Platform-Version` header field: the platform's major version
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $platformVersion = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Full-Version` header field: the platform's major version
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $uaFullVersion = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Full-Version-List` header field: the full version for each brand in its brand list
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fullVersionList = [];
|
||||
|
||||
/**
|
||||
* Represents `x-requested-with` header field: Android app id
|
||||
* @var string
|
||||
*/
|
||||
protected $app = '';
|
||||
|
||||
/**
|
||||
* Represents `Sec-CH-UA-Form-Factors` header field: form factor device type name
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $formFactors = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $model `Sec-CH-UA-Model` header field
|
||||
* @param string $platform `Sec-CH-UA-Platform` header field
|
||||
* @param string $platformVersion `Sec-CH-UA-Platform-Version` header field
|
||||
* @param string $uaFullVersion `Sec-CH-UA-Full-Version` header field
|
||||
* @param array $fullVersionList `Sec-CH-UA-Full-Version-List` header field
|
||||
* @param bool $mobile `Sec-CH-UA-Mobile` header field
|
||||
* @param string $architecture `Sec-CH-UA-Arch` header field
|
||||
* @param string $bitness `Sec-CH-UA-Bitness`
|
||||
* @param string $app `HTTP_X-REQUESTED-WITH`
|
||||
* @param array $formFactors `Sec-CH-UA-Form-Factors` header field
|
||||
*/
|
||||
public function __construct(string $model = '', string $platform = '', string $platformVersion = '', string $uaFullVersion = '', array $fullVersionList = [], bool $mobile = false, string $architecture = '', string $bitness = '', string $app = '', array $formFactors = []) // phpcs:ignore Generic.Files.LineLength
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->platform = $platform;
|
||||
$this->platformVersion = $platformVersion;
|
||||
$this->uaFullVersion = $uaFullVersion;
|
||||
$this->fullVersionList = $fullVersionList;
|
||||
$this->mobile = $mobile;
|
||||
$this->architecture = $architecture;
|
||||
$this->bitness = $bitness;
|
||||
$this->app = $app;
|
||||
$this->formFactors = $formFactors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Magic method to directly allow accessing the protected properties
|
||||
*
|
||||
* @param string $variable
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __get(string $variable)
|
||||
{
|
||||
if (\property_exists($this, $variable)) {
|
||||
return $this->$variable;
|
||||
}
|
||||
|
||||
throw new \Exception('Invalid ClientHint property requested.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the client hints
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isMobile(): bool
|
||||
{
|
||||
return $this->mobile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Architecture
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getArchitecture(): string
|
||||
{
|
||||
return $this->architecture;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Bitness
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBitness(): string
|
||||
{
|
||||
return $this->bitness;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the device model
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModel(): string
|
||||
{
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Operating System
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOperatingSystem(): string
|
||||
{
|
||||
return $this->platform;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Operating System version
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getOperatingSystemVersion(): string
|
||||
{
|
||||
return $this->platformVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Browser name
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function getBrandList(): array
|
||||
{
|
||||
if (\is_array($this->fullVersionList) && \count($this->fullVersionList)) {
|
||||
$brands = \array_column($this->fullVersionList, 'brand');
|
||||
$versions = \array_column($this->fullVersionList, 'version');
|
||||
|
||||
if (\count($brands) === \count($versions)) {
|
||||
// @phpstan-ignore-next-line
|
||||
return \array_combine($brands, $versions);
|
||||
}
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Browser version
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBrandVersion(): string
|
||||
{
|
||||
if (!empty($this->uaFullVersion)) {
|
||||
return $this->uaFullVersion;
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Android app id
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getApp(): string
|
||||
{
|
||||
return $this->app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formFactor device type name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFormFactors(): array
|
||||
{
|
||||
return $this->formFactors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory method to easily instantiate this class using an array containing all available (client hint) headers
|
||||
*
|
||||
* @param array $headers
|
||||
*
|
||||
* @return ClientHints
|
||||
*/
|
||||
public static function factory(array $headers): ClientHints
|
||||
{
|
||||
$model = $platform = $platformVersion = $uaFullVersion = $architecture = $bitness = '';
|
||||
$app = '';
|
||||
$mobile = false;
|
||||
$fullVersionList = [];
|
||||
$formFactors = [];
|
||||
|
||||
foreach ($headers as $name => $value) {
|
||||
if (empty($value)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
switch (\str_replace('_', '-', \strtolower((string) $name))) {
|
||||
case 'http-sec-ch-ua-arch':
|
||||
case 'sec-ch-ua-arch':
|
||||
case 'arch':
|
||||
case 'architecture':
|
||||
$architecture = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-bitness':
|
||||
case 'sec-ch-ua-bitness':
|
||||
case 'bitness':
|
||||
$bitness = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-mobile':
|
||||
case 'sec-ch-ua-mobile':
|
||||
case 'mobile':
|
||||
$mobile = true === $value || '1' === $value || '?1' === $value;
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-model':
|
||||
case 'sec-ch-ua-model':
|
||||
case 'model':
|
||||
$model = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-full-version':
|
||||
case 'sec-ch-ua-full-version':
|
||||
case 'uafullversion':
|
||||
$uaFullVersion = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-platform':
|
||||
case 'sec-ch-ua-platform':
|
||||
case 'platform':
|
||||
$platform = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua-platform-version':
|
||||
case 'sec-ch-ua-platform-version':
|
||||
case 'platformversion':
|
||||
$platformVersion = \trim($value, '"');
|
||||
|
||||
break;
|
||||
case 'brands':
|
||||
if (!empty($fullVersionList)) {
|
||||
break;
|
||||
}
|
||||
// use this only if no other header already set the list
|
||||
case 'fullversionlist':
|
||||
$fullVersionList = \is_array($value) ? $value : $fullVersionList;
|
||||
|
||||
break;
|
||||
case 'http-sec-ch-ua':
|
||||
case 'sec-ch-ua':
|
||||
if (!empty($fullVersionList)) {
|
||||
break;
|
||||
}
|
||||
// use this only if no other header already set the list
|
||||
case 'http-sec-ch-ua-full-version-list':
|
||||
case 'sec-ch-ua-full-version-list':
|
||||
$reg = '/^"([^"]+)"; ?v="([^"]+)"(?:, )?/';
|
||||
$list = [];
|
||||
|
||||
while (\preg_match($reg, $value, $matches)) {
|
||||
$list[] = ['brand' => $matches[1], 'version' => $matches[2]];
|
||||
$value = \substr($value, \strlen($matches[0]));
|
||||
}
|
||||
|
||||
if (\count($list)) {
|
||||
$fullVersionList = $list;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'http-x-requested-with':
|
||||
case 'x-requested-with':
|
||||
if ('xmlhttprequest' !== \strtolower($value)) {
|
||||
$app = $value;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'formfactors':
|
||||
case 'http-sec-ch-ua-form-factors':
|
||||
case 'sec-ch-ua-form-factors':
|
||||
if (\is_array($value)) {
|
||||
$formFactors = \array_map('\strtolower', $value);
|
||||
} elseif (\preg_match_all('~"([a-z]+)"~i', \strtolower($value), $matches)) {
|
||||
$formFactors = $matches[1];
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return new self(
|
||||
$model,
|
||||
$platform,
|
||||
$platformVersion,
|
||||
$uaFullVersion,
|
||||
$fullVersionList,
|
||||
$mobile,
|
||||
$architecture,
|
||||
$bitness,
|
||||
$app,
|
||||
$formFactors
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser;
|
||||
|
||||
/**
|
||||
* Class AbstractBotParser
|
||||
*
|
||||
* Abstract class for all bot parsers
|
||||
*/
|
||||
abstract class AbstractBotParser extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* Enables information discarding
|
||||
*/
|
||||
abstract public function discardDetails(): void;
|
||||
}
|
||||
@@ -0,0 +1,494 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser;
|
||||
|
||||
use DeviceDetector\Cache\CacheInterface;
|
||||
use DeviceDetector\Cache\StaticCache;
|
||||
use DeviceDetector\ClientHints;
|
||||
use DeviceDetector\DeviceDetector;
|
||||
use DeviceDetector\Yaml\ParserInterface as YamlParser;
|
||||
use DeviceDetector\Yaml\Spyc;
|
||||
|
||||
/**
|
||||
* Class AbstractParser
|
||||
*/
|
||||
abstract class AbstractParser
|
||||
{
|
||||
/**
|
||||
* Holds the path to the yml file containing regexes
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile;
|
||||
|
||||
/**
|
||||
* Holds the internal name of the parser
|
||||
* Used for caching
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName;
|
||||
|
||||
/**
|
||||
* Holds the user agent to be parsed
|
||||
* @var string
|
||||
*/
|
||||
protected $userAgent;
|
||||
|
||||
/**
|
||||
* Holds the client hints to be parsed
|
||||
* @var ?ClientHints
|
||||
*/
|
||||
protected $clientHints = null;
|
||||
|
||||
/**
|
||||
* Contains a list of mappings from names we use to known client hint values
|
||||
* @var array<string, array<string>>
|
||||
*/
|
||||
protected static $clientHintMapping = [];
|
||||
|
||||
/**
|
||||
* Holds an array with method that should be available global
|
||||
* @var array
|
||||
*/
|
||||
protected $globalMethods;
|
||||
|
||||
/**
|
||||
* Holds an array with regexes to parse, if already loaded
|
||||
* @var array
|
||||
*/
|
||||
protected $regexList;
|
||||
|
||||
/**
|
||||
* Holds the concatenated regex for all items in regex list
|
||||
* @var string
|
||||
*/
|
||||
protected $overAllMatch;
|
||||
|
||||
/**
|
||||
* Indicates how deep versioning will be detected
|
||||
* if $maxMinorParts is 0 only the major version will be returned
|
||||
* @var int
|
||||
*/
|
||||
protected static $maxMinorParts = 1;
|
||||
|
||||
/**
|
||||
* Versioning constant used to set max versioning to major version only
|
||||
* Version examples are: 3, 5, 6, 200, 123, ...
|
||||
*/
|
||||
public const VERSION_TRUNCATION_MAJOR = 0;
|
||||
|
||||
/**
|
||||
* Versioning constant used to set max versioning to minor version
|
||||
* Version examples are: 3.4, 5.6, 6.234, 0.200, 1.23, ...
|
||||
*/
|
||||
public const VERSION_TRUNCATION_MINOR = 1;
|
||||
|
||||
/**
|
||||
* Versioning constant used to set max versioning to path level
|
||||
* Version examples are: 3.4.0, 5.6.344, 6.234.2, 0.200.3, 1.2.3, ...
|
||||
*/
|
||||
public const VERSION_TRUNCATION_PATCH = 2;
|
||||
|
||||
/**
|
||||
* Versioning constant used to set versioning to build number
|
||||
* Version examples are: 3.4.0.12, 5.6.334.0, 6.234.2.3, 0.200.3.1, 1.2.3.0, ...
|
||||
*/
|
||||
public const VERSION_TRUNCATION_BUILD = 3;
|
||||
|
||||
/**
|
||||
* Versioning constant used to set versioning to unlimited (no truncation)
|
||||
*/
|
||||
public const VERSION_TRUNCATION_NONE = -1;
|
||||
|
||||
/**
|
||||
* @var CacheInterface|null
|
||||
*/
|
||||
protected $cache = null;
|
||||
|
||||
/**
|
||||
* @var YamlParser|null
|
||||
*/
|
||||
protected $yamlParser = null;
|
||||
|
||||
/**
|
||||
* parses the currently set useragents and returns possible results
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
abstract public function parse(): ?array;
|
||||
|
||||
/**
|
||||
* AbstractParser constructor.
|
||||
*
|
||||
* @param string $ua
|
||||
* @param ?ClientHints $clientHints
|
||||
*/
|
||||
public function __construct(string $ua = '', ?ClientHints $clientHints = null)
|
||||
{
|
||||
$this->setUserAgent($ua);
|
||||
$this->setClientHints($clientHints);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function restoreUserAgentFromClientHints(): void
|
||||
{
|
||||
if (null === $this->clientHints) {
|
||||
return;
|
||||
}
|
||||
|
||||
$deviceModel = $this->clientHints->getModel();
|
||||
|
||||
if ('' === $deviceModel) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Restore Android User Agent
|
||||
if ($this->hasUserAgentClientHintsFragment()) {
|
||||
$osVersion = $this->clientHints->getOperatingSystemVersion();
|
||||
$this->setUserAgent((string) \preg_replace(
|
||||
'(Android (?:10[.\d]*; K|1[1-5]))',
|
||||
\sprintf('Android %s; %s', '' !== $osVersion ? $osVersion : '10', $deviceModel),
|
||||
$this->userAgent
|
||||
));
|
||||
}
|
||||
|
||||
// Restore Desktop User Agent
|
||||
if (!$this->hasDesktopFragment()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->setUserAgent((string) \preg_replace(
|
||||
'(X11; Linux x86_64)',
|
||||
\sprintf('X11; Linux x86_64; %s', $deviceModel),
|
||||
$this->userAgent
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set how DeviceDetector should return versions
|
||||
* @param int $type Any of the VERSION_TRUNCATION_* constants
|
||||
*/
|
||||
public static function setVersionTruncation(int $type): void
|
||||
{
|
||||
if (!\in_array($type, [
|
||||
self::VERSION_TRUNCATION_BUILD,
|
||||
self::VERSION_TRUNCATION_NONE,
|
||||
self::VERSION_TRUNCATION_MAJOR,
|
||||
self::VERSION_TRUNCATION_MINOR,
|
||||
self::VERSION_TRUNCATION_PATCH,
|
||||
])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
static::$maxMinorParts = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user agent to parse
|
||||
*
|
||||
* @param string $ua user agent
|
||||
*/
|
||||
public function setUserAgent(string $ua): void
|
||||
{
|
||||
$this->userAgent = $ua;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client hints to parse
|
||||
*
|
||||
* @param ?ClientHints $clientHints client hints
|
||||
*/
|
||||
public function setClientHints(?ClientHints $clientHints): void
|
||||
{
|
||||
$this->clientHints = $clientHints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the internal name of the parser
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->parserName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Cache class
|
||||
*
|
||||
* @param CacheInterface $cache
|
||||
*/
|
||||
public function setCache(CacheInterface $cache): void
|
||||
{
|
||||
$this->cache = $cache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns Cache object
|
||||
*
|
||||
* @return CacheInterface
|
||||
*/
|
||||
public function getCache(): CacheInterface
|
||||
{
|
||||
if (!empty($this->cache)) {
|
||||
return $this->cache;
|
||||
}
|
||||
|
||||
return new StaticCache();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the YamlParser class
|
||||
*
|
||||
* @param YamlParser $yamlParser
|
||||
*/
|
||||
public function setYamlParser(YamlParser $yamlParser): void
|
||||
{
|
||||
$this->yamlParser = $yamlParser;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns YamlParser object
|
||||
*
|
||||
* @return YamlParser
|
||||
*/
|
||||
public function getYamlParser(): YamlParser
|
||||
{
|
||||
if (!empty($this->yamlParser)) {
|
||||
return $this->yamlParser;
|
||||
}
|
||||
|
||||
return new Spyc();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the result of the parsed yml file defined in $fixtureFile
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getRegexes(): array
|
||||
{
|
||||
if (empty($this->regexList)) {
|
||||
$cacheKey = 'DeviceDetector-' . DeviceDetector::VERSION . 'regexes-' . $this->getName();
|
||||
$cacheKey = (string) \preg_replace('/([^a-z0-9_-]+)/i', '', $cacheKey);
|
||||
$cacheContent = $this->getCache()->fetch($cacheKey);
|
||||
|
||||
if (\is_array($cacheContent)) {
|
||||
$this->regexList = $cacheContent;
|
||||
}
|
||||
|
||||
if (empty($this->regexList)) {
|
||||
$parsedContent = $this->getYamlParser()->parseFile(
|
||||
$this->getRegexesDirectory() . DIRECTORY_SEPARATOR . $this->fixtureFile
|
||||
);
|
||||
|
||||
if (!\is_array($parsedContent)) {
|
||||
$parsedContent = [];
|
||||
}
|
||||
|
||||
$this->regexList = $parsedContent;
|
||||
$this->getCache()->save($cacheKey, $this->regexList);
|
||||
}
|
||||
}
|
||||
|
||||
return $this->regexList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the provided name after applying client hint mappings.
|
||||
* This is used to map names provided in client hints to the names we use.
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function applyClientHintMapping(string $name): string
|
||||
{
|
||||
foreach (static::$clientHintMapping as $mappedName => $clientHints) {
|
||||
foreach ($clientHints as $clientHint) {
|
||||
if (\strtolower($name) === \strtolower($clientHint)) {
|
||||
return $mappedName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
protected function getRegexesDirectory(): string
|
||||
{
|
||||
return \dirname(__DIR__);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the parsed UA contains the 'Windows NT;' or 'X11; Linux x86_64' fragments
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasDesktopFragment(): bool
|
||||
{
|
||||
$regexExcludeDesktopFragment = \implode('|', [
|
||||
'CE-HTML',
|
||||
' Mozilla/|Andr[o0]id|Tablet|Mobile|iPhone|Windows Phone|ricoh|OculusBrowser',
|
||||
'PicoBrowser|Lenovo|compatible; MSIE|Trident/|Tesla/|XBOX|FBMD/|ARM; ?([^)]+)',
|
||||
]);
|
||||
|
||||
return
|
||||
$this->matchUserAgent('(?:Windows (?:NT|IoT)|X11; Linux x86_64)') &&
|
||||
!$this->matchUserAgent($regexExcludeDesktopFragment);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the parsed UA contains the 'Android 10 K;' or Android 10 K Build/` fragment
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function hasUserAgentClientHintsFragment(): bool
|
||||
{
|
||||
return (bool) \preg_match('~Android (?:10[.\d]*; K(?: Build/|[;)])|1[1-5]\)) AppleWebKit~i', $this->userAgent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Matches the useragent against the given regex
|
||||
*
|
||||
* @param string $regex
|
||||
*
|
||||
* @return ?array
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function matchUserAgent(string $regex): ?array
|
||||
{
|
||||
$matches = [];
|
||||
|
||||
// only match if useragent begins with given regex or there is no letter before it
|
||||
$regex = '/(?:^|[^A-Z0-9_-]|[^A-Z0-9-]_|sprd-|MZ-)(?:' . \str_replace('/', '\/', $regex) . ')/i';
|
||||
|
||||
try {
|
||||
if (\preg_match($regex, $this->userAgent, $matches)) {
|
||||
return $matches;
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
throw new \Exception(
|
||||
\sprintf("%s\nRegex: %s", $exception->getMessage(), $regex),
|
||||
$exception->getCode(),
|
||||
$exception
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $item
|
||||
* @param array $matches
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function buildByMatch(string $item, array $matches): string
|
||||
{
|
||||
$search = [];
|
||||
$replace = [];
|
||||
|
||||
for ($nb = 1; $nb <= \count($matches); $nb++) {
|
||||
$search[] = '$' . $nb;
|
||||
$replace[] = $matches[$nb] ?? '';
|
||||
}
|
||||
|
||||
return \trim(\str_replace($search, $replace, $item));
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the version with the given $versionString and $matches
|
||||
*
|
||||
* Example:
|
||||
* $versionString = 'v$2'
|
||||
* $matches = ['version_1_0_1', '1_0_1']
|
||||
* return value would be v1.0.1
|
||||
*
|
||||
* @param string $versionString
|
||||
* @param array $matches
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function buildVersion(string $versionString, array $matches): string
|
||||
{
|
||||
$versionString = $this->buildByMatch($versionString, $matches);
|
||||
$versionString = \str_replace('_', '.', $versionString);
|
||||
|
||||
if (self::VERSION_TRUNCATION_NONE !== static::$maxMinorParts
|
||||
&& \substr_count($versionString, '.') > static::$maxMinorParts
|
||||
) {
|
||||
$versionParts = \explode('.', $versionString);
|
||||
$versionParts = \array_slice($versionParts, 0, 1 + static::$maxMinorParts);
|
||||
$versionString = \implode('.', $versionParts);
|
||||
}
|
||||
|
||||
return \trim($versionString, ' .');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the useragent against a combination of all regexes
|
||||
*
|
||||
* All regexes returned by getRegexes() will be reversed and concatenated with '|'
|
||||
* Afterwards the big regex will be tested against the user agent
|
||||
*
|
||||
* Method can be used to speed up detections by making a big check before doing checks for every single regex
|
||||
*
|
||||
* @return ?array
|
||||
*/
|
||||
protected function preMatchOverall(): ?array
|
||||
{
|
||||
$regexes = $this->getRegexes();
|
||||
|
||||
$cacheKey = $this->parserName . DeviceDetector::VERSION . '-all';
|
||||
$cacheKey = (string) \preg_replace('/([^a-z0-9_-]+)/i', '', $cacheKey);
|
||||
|
||||
if (empty($this->overAllMatch)) {
|
||||
$overAllMatch = $this->getCache()->fetch($cacheKey);
|
||||
|
||||
if (\is_string($overAllMatch)) {
|
||||
$this->overAllMatch = $overAllMatch;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($this->overAllMatch)) {
|
||||
// reverse all regexes, so we have the generic one first, which already matches most patterns
|
||||
$this->overAllMatch = \array_reduce(\array_reverse($regexes), static function ($val1, $val2) {
|
||||
return !empty($val1) ? $val1 . '|' . $val2['regex'] : $val2['regex'];
|
||||
});
|
||||
$this->getCache()->save($cacheKey, $this->overAllMatch);
|
||||
}
|
||||
|
||||
return $this->matchUserAgent($this->overAllMatch);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares if two strings equals after lowering their case and removing spaces
|
||||
*
|
||||
* @param string $value1
|
||||
* @param string $value2
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
protected function fuzzyCompare(string $value1, string $value2): bool
|
||||
{
|
||||
return \str_replace(' ', '', \strtolower($value1)) ===
|
||||
\str_replace(' ', '', \strtolower($value2));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser;
|
||||
|
||||
/**
|
||||
* Class Bot
|
||||
*
|
||||
* Parses a user agent for bot information
|
||||
*
|
||||
* Detected bots are defined in regexes/bots.yml
|
||||
*/
|
||||
class Bot extends AbstractBotParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/bots.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'bot';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $discardDetails = false;
|
||||
|
||||
/**
|
||||
* Enables information discarding
|
||||
*/
|
||||
public function discardDetails(): void
|
||||
{
|
||||
$this->discardDetails = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the current UA and checks whether it contains bot information
|
||||
*
|
||||
* @see bots.yml for list of detected bots
|
||||
*
|
||||
* Step 1: Build a big regex containing all regexes and match UA against it
|
||||
* -> If no matches found: return
|
||||
* -> Otherwise:
|
||||
* Step 2: Walk through the list of regexes in bots.yml and try to match every one
|
||||
* -> Return the matched data
|
||||
*
|
||||
* If $discardDetails is set to TRUE, the Step 2 will be skipped
|
||||
* $bot will be set to TRUE instead
|
||||
*
|
||||
* NOTE: Doing the big match before matching every single regex speeds up the detection
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->preMatchOverall()) {
|
||||
if ($this->discardDetails) {
|
||||
return [true];
|
||||
}
|
||||
|
||||
foreach ($this->getRegexes() as $regex) {
|
||||
$matches = $this->matchUserAgent($regex['regex']);
|
||||
|
||||
if ($matches) {
|
||||
unset($regex['regex']);
|
||||
$result = $regex;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
use DeviceDetector\Parser\AbstractParser;
|
||||
|
||||
abstract class AbstractClientParser extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = '';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = '';
|
||||
|
||||
/**
|
||||
* Parses the current UA and checks whether it contains any client information
|
||||
*
|
||||
* @see $fixtureFile for file with list of detected clients
|
||||
*
|
||||
* Step 1: Build a big regex containing all regexes and match UA against it
|
||||
* -> If no matches found: return
|
||||
* -> Otherwise:
|
||||
* Step 2: Walk through the list of regexes in feed_readers.yml and try to match every one
|
||||
* -> Return the matched feed reader
|
||||
*
|
||||
* NOTE: Doing the big match before matching every single regex speeds up the detection
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
$result = null;
|
||||
|
||||
if ($this->preMatchOverall()) {
|
||||
foreach ($this->getRegexes() as $regex) {
|
||||
$matches = $this->matchUserAgent($regex['regex']);
|
||||
|
||||
if ($matches) {
|
||||
$result = [
|
||||
'type' => $this->parserName,
|
||||
'name' => $this->buildByMatch($regex['name'], $matches),
|
||||
'version' => $this->buildVersion((string) $regex['version'], $matches),
|
||||
];
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all names defined in the regexes
|
||||
*
|
||||
* Attention: This method might not return all names of detected clients
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAvailableClients(): array
|
||||
{
|
||||
$instance = new static(); // @phpstan-ignore-line
|
||||
$regexes = $instance->getRegexes();
|
||||
$names = [];
|
||||
|
||||
foreach ($regexes as $regex) {
|
||||
if (false !== \strpos($regex['name'], '$1')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$names[] = $regex['name'];
|
||||
}
|
||||
|
||||
if (static::class === MobileApp::class) {
|
||||
$names = \array_merge($names, [
|
||||
// Microsoft Office $1
|
||||
'Microsoft Office Access', 'Microsoft Office Excel', 'Microsoft Office OneDrive for Business',
|
||||
'Microsoft Office OneNote', 'Microsoft Office PowerPoint', 'Microsoft Office Project',
|
||||
'Microsoft Office Publisher', 'Microsoft Office Visio', 'Microsoft Office Word',
|
||||
// Podkicker$1
|
||||
'Podkicker', 'Podkicker Pro', 'Podkicker Classic',
|
||||
// radio.$1
|
||||
'radio.at', 'radio.de', 'radio.dk', 'radio.es', 'radio.fr',
|
||||
'radio.it', 'radio.pl', 'radio.pt', 'radio.se', 'radio.net',
|
||||
]);
|
||||
}
|
||||
|
||||
\natcasesort($names);
|
||||
|
||||
return \array_unique($names);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client\Browser;
|
||||
|
||||
use DeviceDetector\Parser\Client\AbstractClientParser;
|
||||
|
||||
/**
|
||||
* Class Engine
|
||||
*
|
||||
* Client parser for browser engine detection
|
||||
*/
|
||||
class Engine extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/browser_engine.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'browserengine';
|
||||
|
||||
/**
|
||||
* Known browser engines mapped to their internal short codes
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $availableEngines = [
|
||||
'WebKit',
|
||||
'Blink',
|
||||
'Trident',
|
||||
'Text-based',
|
||||
'Dillo',
|
||||
'iCab',
|
||||
'Elektra',
|
||||
'Presto',
|
||||
'Clecko',
|
||||
'Gecko',
|
||||
'KHTML',
|
||||
'NetFront',
|
||||
'Edge',
|
||||
'NetSurf',
|
||||
'Servo',
|
||||
'Goanna',
|
||||
'EkiohFlow',
|
||||
'Arachne',
|
||||
'LibWeb',
|
||||
'Maple',
|
||||
];
|
||||
|
||||
/**
|
||||
* Returns list of all available browser engines
|
||||
* @return array
|
||||
*/
|
||||
public static function getAvailableEngines(): array
|
||||
{
|
||||
return self::$availableEngines;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
$matches = false;
|
||||
|
||||
foreach ($this->getRegexes() as $regex) {
|
||||
$matches = $this->matchUserAgent($regex['regex']);
|
||||
|
||||
if ($matches) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($matches) || empty($regex)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$name = $this->buildByMatch($regex['name'], $matches);
|
||||
|
||||
foreach (self::getAvailableEngines() as $engineName) {
|
||||
if (\strtolower($name) === \strtolower($engineName)) {
|
||||
return ['engine' => $engineName];
|
||||
}
|
||||
}
|
||||
|
||||
// This Exception should never be thrown. If so a defined browser name is missing in $availableEngines
|
||||
throw new \Exception(\sprintf(
|
||||
'Detected browser engine was not found in $availableEngines. Tried to parse user agent: %s',
|
||||
$this->userAgent
|
||||
)); // @codeCoverageIgnore
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client\Browser\Engine;
|
||||
|
||||
use DeviceDetector\Parser\Client\AbstractClientParser;
|
||||
|
||||
/**
|
||||
* Class Version
|
||||
*
|
||||
* Client parser for browser engine version detection
|
||||
*/
|
||||
class Version extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $engine;
|
||||
|
||||
/**
|
||||
* Version constructor.
|
||||
*
|
||||
* @param string $ua
|
||||
* @param string $engine
|
||||
*/
|
||||
public function __construct(string $ua, string $engine)
|
||||
{
|
||||
parent::__construct($ua);
|
||||
|
||||
$this->engine = $engine;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (empty($this->engine)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if ('Gecko' === $this->engine || 'Clecko' === $this->engine) {
|
||||
$pattern = '~[ ](?:rv[: ]([0-9.]+)).*(?:g|cl)ecko/[0-9]{8,10}~i';
|
||||
|
||||
if (\preg_match($pattern, $this->userAgent, $matches)) {
|
||||
return ['version' => \array_pop($matches)];
|
||||
}
|
||||
}
|
||||
|
||||
$engineToken = $this->engine;
|
||||
|
||||
if ('Blink' === $this->engine) {
|
||||
$engineToken = 'Chr[o0]me|Chromium|Cronet';
|
||||
}
|
||||
|
||||
if ('Arachne' === $this->engine) {
|
||||
$engineToken = 'Arachne\/5\.';
|
||||
}
|
||||
|
||||
if ('LibWeb' === $this->engine) {
|
||||
$engineToken = 'LibWeb\+LibJs';
|
||||
}
|
||||
|
||||
\preg_match(
|
||||
"~(?:{$engineToken})\s*[/_]?\s*((?(?=\d+\.\d)\d+[.\d]*|\d{1,7}(?=(?:\D|$))))~i",
|
||||
$this->userAgent,
|
||||
$matches
|
||||
);
|
||||
|
||||
if (!$matches) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return ['version' => \array_pop($matches)];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
/**
|
||||
* Class FeedReader
|
||||
*
|
||||
* Client parser for feed reader detection
|
||||
*/
|
||||
class FeedReader extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/feed_readers.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'feed reader';
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client\Hints;
|
||||
|
||||
use DeviceDetector\Parser\AbstractParser;
|
||||
|
||||
class AppHints extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/hints/apps.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'AppHints';
|
||||
|
||||
/**
|
||||
* Get application name if is in collection
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (null === $this->clientHints) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$appId = $this->clientHints->getApp();
|
||||
$name = $this->getRegexes()[$appId] ?? null;
|
||||
|
||||
if ('' === (string) $name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client\Hints;
|
||||
|
||||
use DeviceDetector\Parser\AbstractParser;
|
||||
|
||||
class BrowserHints extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/hints/browsers.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'BrowserHints';
|
||||
|
||||
/**
|
||||
* Get browser name if is in collection
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (null === $this->clientHints) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$appId = $this->clientHints->getApp();
|
||||
$name = $this->getRegexes()[$appId] ?? null;
|
||||
|
||||
if ('' === (string) $name) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
/**
|
||||
* Class Library
|
||||
*
|
||||
* Client parser for tool & software detection
|
||||
*/
|
||||
class Library extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/libraries.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'library';
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
/**
|
||||
* Class MediaPlayer
|
||||
*
|
||||
* Client parser for mediaplayer detection
|
||||
*/
|
||||
class MediaPlayer extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/mediaplayers.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'mediaplayer';
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
use DeviceDetector\Cache\CacheInterface;
|
||||
use DeviceDetector\ClientHints;
|
||||
use DeviceDetector\Parser\Client\Hints\AppHints;
|
||||
use DeviceDetector\Yaml\ParserInterface as YamlParser;
|
||||
|
||||
/**
|
||||
* Class MobileApp
|
||||
*
|
||||
* Client parser for mobile app detection
|
||||
*/
|
||||
class MobileApp extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var AppHints
|
||||
*/
|
||||
private $appHints;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/mobile_apps.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'mobile app';
|
||||
|
||||
/**
|
||||
* MobileApp constructor.
|
||||
*
|
||||
* @param string $ua
|
||||
* @param ClientHints|null $clientHints
|
||||
*/
|
||||
public function __construct(string $ua = '', ?ClientHints $clientHints = null)
|
||||
{
|
||||
$this->appHints = new AppHints($ua, $clientHints);
|
||||
parent::__construct($ua, $clientHints);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the client hints to parse
|
||||
*
|
||||
* @param ?ClientHints $clientHints client hints
|
||||
*/
|
||||
public function setClientHints(?ClientHints $clientHints): void
|
||||
{
|
||||
parent::setClientHints($clientHints);
|
||||
$this->appHints->setClientHints($clientHints);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user agent to parse
|
||||
*
|
||||
* @param string $ua user agent
|
||||
*/
|
||||
public function setUserAgent(string $ua): void
|
||||
{
|
||||
parent::setUserAgent($ua);
|
||||
$this->appHints->setUserAgent($ua);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Cache class
|
||||
*
|
||||
* @param CacheInterface $cache
|
||||
*/
|
||||
public function setCache(CacheInterface $cache): void
|
||||
{
|
||||
parent::setCache($cache);
|
||||
$this->appHints->setCache($cache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the YamlParser class
|
||||
*
|
||||
* @param YamlParser $yamlParser
|
||||
*/
|
||||
public function setYamlParser(YamlParser $yamlParser): void
|
||||
{
|
||||
parent::setYamlParser($yamlParser);
|
||||
$this->appHints->setYamlParser($this->getYamlParser());
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the current UA and checks whether it contains any client information
|
||||
* See parent::parse() for more details.
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
$result = parent::parse();
|
||||
$name = $result['name'] ?? '';
|
||||
$version = $result['version'] ?? '';
|
||||
$appHash = $this->appHints->parse();
|
||||
|
||||
if (null !== $appHash && $appHash['name'] !== $name) {
|
||||
$name = $appHash['name'];
|
||||
$version = '';
|
||||
}
|
||||
|
||||
if (empty($name)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
'type' => $this->parserName,
|
||||
'name' => $name,
|
||||
'version' => $version,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Client;
|
||||
|
||||
/**
|
||||
* Class PIM
|
||||
*
|
||||
* Client parser for pim (personal information manager) detection
|
||||
*/
|
||||
class PIM extends AbstractClientParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/client/pim.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'pim';
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class Camera
|
||||
*
|
||||
* Device parser for camera detection
|
||||
*/
|
||||
class Camera extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/cameras.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'camera';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (!$this->preMatchOverall()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::parse();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class CarBrowser
|
||||
*
|
||||
* Device parser for car browser detection
|
||||
*/
|
||||
class CarBrowser extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/car_browsers.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'car browser';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (!$this->preMatchOverall()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::parse();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class Console
|
||||
*
|
||||
* Device parser for console detection
|
||||
*/
|
||||
class Console extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/consoles.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'console';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (!$this->preMatchOverall()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::parse();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class HbbTv
|
||||
*
|
||||
* Device parser for hbbtv detection
|
||||
*/
|
||||
class HbbTv extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/televisions.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'tv';
|
||||
|
||||
/**
|
||||
* Parses the current UA and checks whether it contains HbbTv or SmartTvA information
|
||||
*
|
||||
* @see televisions.yml for list of detected televisions
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
// only parse user agents containing fragments: hbbtv or SmartTvA
|
||||
if (null === $this->isHbbTv()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
parent::parse();
|
||||
|
||||
// always set device type to tv, even if no model/brand could be found
|
||||
if (null === $this->deviceType) {
|
||||
$this->deviceType = self::DEVICE_TYPE_TV;
|
||||
}
|
||||
|
||||
return $this->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the parsed UA was identified as a HbbTV device
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function isHbbTv(): ?string
|
||||
{
|
||||
$regex = '(?:HbbTV|SmartTvA)/([1-9]{1}(?:\.[0-9]{1}){1,2})';
|
||||
$match = $this->matchUserAgent($regex);
|
||||
|
||||
return $match[1] ?? null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class Mobile
|
||||
*
|
||||
* Device parser for mobile detection
|
||||
*/
|
||||
class Mobile extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/mobiles.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'mobile';
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class Notebook
|
||||
*
|
||||
* Device parser for notebook detection in Facebook useragents
|
||||
*/
|
||||
class Notebook extends AbstractDeviceParser
|
||||
{
|
||||
protected $fixtureFile = 'regexes/device/notebooks.yml';
|
||||
|
||||
protected $parserName = 'notebook';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (!$this->matchUserAgent('FBMD/')) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::parse();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class PortableMediaPlayer
|
||||
*
|
||||
* Device parser for portable media player detection
|
||||
*/
|
||||
class PortableMediaPlayer extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/portable_media_player.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'portablemediaplayer';
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
if (!$this->preMatchOverall()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return parent::parse();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser\Device;
|
||||
|
||||
/**
|
||||
* Class ShellTv
|
||||
*/
|
||||
class ShellTv extends AbstractDeviceParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/device/shell_tv.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'shelltv';
|
||||
|
||||
/**
|
||||
* Returns if the parsed UA was identified as ShellTv device
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function isShellTv(): bool
|
||||
{
|
||||
$regex = '[a-z]+[ _]Shell[ _]\w{6}|tclwebkit(\d+[.\d]*)';
|
||||
$match = $this->matchUserAgent($regex);
|
||||
|
||||
return null !== $match;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the current UA and checks whether it contains ShellTv information
|
||||
*
|
||||
* @see shell_tv.yml for list of detected televisions
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
// only parse user agents containing fragments: {brand} shell
|
||||
if (false === $this->isShellTv()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
parent::parse();
|
||||
|
||||
// always set device type to tv, even if no model/brand could be found
|
||||
$this->deviceType = self::DEVICE_TYPE_TV;
|
||||
|
||||
return $this->getResult();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,756 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser;
|
||||
|
||||
use DeviceDetector\ClientHints;
|
||||
|
||||
/**
|
||||
* Class OperatingSystem
|
||||
*
|
||||
* Parses the useragent for operating system information
|
||||
*
|
||||
* Detected operating systems can be found in self::$operatingSystems and /regexes/oss.yml
|
||||
* This class also defined some operating system families and methods to get the family for a specific os
|
||||
*/
|
||||
class OperatingSystem extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/oss.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'os';
|
||||
|
||||
/**
|
||||
* Known operating systems mapped to their internal short codes
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $operatingSystems = [
|
||||
'AIX' => 'AIX',
|
||||
'AND' => 'Android',
|
||||
'ADR' => 'Android TV',
|
||||
'ALP' => 'Alpine Linux',
|
||||
'AMZ' => 'Amazon Linux',
|
||||
'AMG' => 'AmigaOS',
|
||||
'ARM' => 'Armadillo OS',
|
||||
'ARO' => 'AROS',
|
||||
'ATV' => 'tvOS',
|
||||
'ARL' => 'Arch Linux',
|
||||
'AOS' => 'AOSC OS',
|
||||
'ASP' => 'ASPLinux',
|
||||
'AZU' => 'Azure Linux',
|
||||
'BTR' => 'BackTrack',
|
||||
'SBA' => 'Bada',
|
||||
'BYI' => 'Baidu Yi',
|
||||
'BEO' => 'BeOS',
|
||||
'BLB' => 'BlackBerry OS',
|
||||
'QNX' => 'BlackBerry Tablet OS',
|
||||
'PAN' => 'blackPanther OS',
|
||||
'BOS' => 'Bliss OS',
|
||||
'BMP' => 'Brew',
|
||||
'BSN' => 'BrightSignOS',
|
||||
'CAI' => 'Caixa Mágica',
|
||||
'CES' => 'CentOS',
|
||||
'CST' => 'CentOS Stream',
|
||||
'CLO' => 'Clear Linux OS',
|
||||
'CLR' => 'ClearOS Mobile',
|
||||
'COS' => 'Chrome OS',
|
||||
'CRS' => 'Chromium OS',
|
||||
'CHN' => 'China OS',
|
||||
'COL' => 'Coolita OS',
|
||||
'CYN' => 'CyanogenMod',
|
||||
'DEB' => 'Debian',
|
||||
'DEE' => 'Deepin',
|
||||
'DFB' => 'DragonFly',
|
||||
'DVK' => 'DVKBuntu',
|
||||
'ELE' => 'ElectroBSD',
|
||||
'EUL' => 'EulerOS',
|
||||
'FED' => 'Fedora',
|
||||
'FEN' => 'Fenix',
|
||||
'FOS' => 'Firefox OS',
|
||||
'FIR' => 'Fire OS',
|
||||
'FOR' => 'Foresight Linux',
|
||||
'FRE' => 'Freebox',
|
||||
'BSD' => 'FreeBSD',
|
||||
'FRI' => 'FRITZ!OS',
|
||||
'FYD' => 'FydeOS',
|
||||
'FUC' => 'Fuchsia',
|
||||
'GNT' => 'Gentoo',
|
||||
'GNX' => 'GENIX',
|
||||
'GEO' => 'GEOS',
|
||||
'GNS' => 'gNewSense',
|
||||
'GRI' => 'GridOS',
|
||||
'GTV' => 'Google TV',
|
||||
'HPX' => 'HP-UX',
|
||||
'HAI' => 'Haiku OS',
|
||||
'IPA' => 'iPadOS',
|
||||
'HAR' => 'HarmonyOS',
|
||||
'HAS' => 'HasCodingOS',
|
||||
'HEL' => 'HELIX OS',
|
||||
'IRI' => 'IRIX',
|
||||
'INF' => 'Inferno',
|
||||
'JME' => 'Java ME',
|
||||
'JOL' => 'Joli OS',
|
||||
'KOS' => 'KaiOS',
|
||||
'KAL' => 'Kali',
|
||||
'KAN' => 'Kanotix',
|
||||
'KIN' => 'KIN OS',
|
||||
'KOL' => 'KolibriOS',
|
||||
'KNO' => 'Knoppix',
|
||||
'KTV' => 'KreaTV',
|
||||
'KBT' => 'Kubuntu',
|
||||
'LIN' => 'GNU/Linux',
|
||||
'LEA' => 'LeafOS',
|
||||
'LND' => 'LindowsOS',
|
||||
'LNS' => 'Linspire',
|
||||
'LEN' => 'Lineage OS',
|
||||
'LIR' => 'Liri OS',
|
||||
'LOO' => 'Loongnix',
|
||||
'LBT' => 'Lubuntu',
|
||||
'LOS' => 'Lumin OS',
|
||||
'LUN' => 'LuneOS',
|
||||
'VLN' => 'VectorLinux',
|
||||
'MAC' => 'Mac',
|
||||
'MAE' => 'Maemo',
|
||||
'MAG' => 'Mageia',
|
||||
'MDR' => 'Mandriva',
|
||||
'SMG' => 'MeeGo',
|
||||
'MET' => 'Meta Horizon',
|
||||
'MCD' => 'MocorDroid',
|
||||
'MON' => 'moonOS',
|
||||
'EZX' => 'Motorola EZX',
|
||||
'MIN' => 'Mint',
|
||||
'MLD' => 'MildWild',
|
||||
'MOR' => 'MorphOS',
|
||||
'NBS' => 'NetBSD',
|
||||
'MTK' => 'MTK / Nucleus',
|
||||
'MRE' => 'MRE',
|
||||
'NXT' => 'NeXTSTEP',
|
||||
'NWS' => 'NEWS-OS',
|
||||
'WII' => 'Nintendo',
|
||||
'NDS' => 'Nintendo Mobile',
|
||||
'NOV' => 'Nova',
|
||||
'OS2' => 'OS/2',
|
||||
'T64' => 'OSF1',
|
||||
'OBS' => 'OpenBSD',
|
||||
'OVS' => 'OpenVMS',
|
||||
'OVZ' => 'OpenVZ',
|
||||
'OWR' => 'OpenWrt',
|
||||
'OTV' => 'Opera TV',
|
||||
'ORA' => 'Oracle Linux',
|
||||
'ORD' => 'Ordissimo',
|
||||
'PAR' => 'Pardus',
|
||||
'PCL' => 'PCLinuxOS',
|
||||
'PIC' => 'PICO OS',
|
||||
'PLA' => 'Plasma Mobile',
|
||||
'PSP' => 'PlayStation Portable',
|
||||
'PS3' => 'PlayStation',
|
||||
'PVE' => 'Proxmox VE',
|
||||
'PUF' => 'Puffin OS',
|
||||
'PUR' => 'PureOS',
|
||||
'QTP' => 'Qtopia',
|
||||
'PIO' => 'Raspberry Pi OS',
|
||||
'RAS' => 'Raspbian',
|
||||
'RHT' => 'Red Hat',
|
||||
'RST' => 'Red Star',
|
||||
'RED' => 'RedOS',
|
||||
'REV' => 'Revenge OS',
|
||||
'RIS' => 'risingOS',
|
||||
'ROS' => 'RISC OS',
|
||||
'ROC' => 'Rocky Linux',
|
||||
'ROK' => 'Roku OS',
|
||||
'RSO' => 'Rosa',
|
||||
'ROU' => 'RouterOS',
|
||||
'REM' => 'Remix OS',
|
||||
'RRS' => 'Resurrection Remix OS',
|
||||
'REX' => 'REX',
|
||||
'RZD' => 'RazoDroiD',
|
||||
'RXT' => 'RTOS & Next',
|
||||
'SAB' => 'Sabayon',
|
||||
'SSE' => 'SUSE',
|
||||
'SAF' => 'Sailfish OS',
|
||||
'SCI' => 'Scientific Linux',
|
||||
'SEE' => 'SeewoOS',
|
||||
'SER' => 'SerenityOS',
|
||||
'SIR' => 'Sirin OS',
|
||||
'SLW' => 'Slackware',
|
||||
'SOS' => 'Solaris',
|
||||
'SBL' => 'Star-Blade OS',
|
||||
'SYL' => 'Syllable',
|
||||
'SYM' => 'Symbian',
|
||||
'SYS' => 'Symbian OS',
|
||||
'S40' => 'Symbian OS Series 40',
|
||||
'S60' => 'Symbian OS Series 60',
|
||||
'SY3' => 'Symbian^3',
|
||||
'TEN' => 'TencentOS',
|
||||
'TDX' => 'ThreadX',
|
||||
'TIZ' => 'Tizen',
|
||||
'TIV' => 'TiVo OS',
|
||||
'TOS' => 'TmaxOS',
|
||||
'TUR' => 'Turbolinux',
|
||||
'UBT' => 'Ubuntu',
|
||||
'ULT' => 'ULTRIX',
|
||||
'UOS' => 'UOS',
|
||||
'VID' => 'VIDAA',
|
||||
'VIZ' => 'ViziOS',
|
||||
'WAS' => 'watchOS',
|
||||
'WER' => 'Wear OS',
|
||||
'WTV' => 'WebTV',
|
||||
'WHS' => 'Whale OS',
|
||||
'WIN' => 'Windows',
|
||||
'WCE' => 'Windows CE',
|
||||
'WIO' => 'Windows IoT',
|
||||
'WMO' => 'Windows Mobile',
|
||||
'WPH' => 'Windows Phone',
|
||||
'WRT' => 'Windows RT',
|
||||
'WPO' => 'WoPhone',
|
||||
'XBX' => 'Xbox',
|
||||
'XBT' => 'Xubuntu',
|
||||
'YNS' => 'YunOS',
|
||||
'ZEN' => 'Zenwalk',
|
||||
'ZOR' => 'ZorinOS',
|
||||
'IOS' => 'iOS',
|
||||
'POS' => 'palmOS',
|
||||
'WEB' => 'Webian',
|
||||
'WOS' => 'webOS',
|
||||
];
|
||||
|
||||
/**
|
||||
* Operating system families mapped to the short codes of the associated operating systems
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $osFamilies = [
|
||||
'Android' => [
|
||||
'AND', 'CYN', 'FIR', 'REM', 'RZD', 'MLD', 'MCD', 'YNS', 'GRI', 'HAR',
|
||||
'ADR', 'CLR', 'BOS', 'REV', 'LEN', 'SIR', 'RRS', 'WER', 'PIC', 'ARM',
|
||||
'HEL', 'BYI', 'RIS', 'PUF', 'LEA', 'MET',
|
||||
],
|
||||
'AmigaOS' => ['AMG', 'MOR', 'ARO'],
|
||||
'BlackBerry' => ['BLB', 'QNX'],
|
||||
'Brew' => ['BMP'],
|
||||
'BeOS' => ['BEO', 'HAI'],
|
||||
'Chrome OS' => ['COS', 'CRS', 'FYD', 'SEE'],
|
||||
'Firefox OS' => ['FOS', 'KOS'],
|
||||
'Gaming Console' => ['WII', 'PS3'],
|
||||
'Google TV' => ['GTV'],
|
||||
'IBM' => ['OS2'],
|
||||
'iOS' => ['IOS', 'ATV', 'WAS', 'IPA'],
|
||||
'RISC OS' => ['ROS'],
|
||||
'GNU/Linux' => [
|
||||
'LIN', 'ARL', 'DEB', 'KNO', 'MIN', 'UBT', 'KBT', 'XBT', 'LBT', 'FED',
|
||||
'RHT', 'VLN', 'MDR', 'GNT', 'SAB', 'SLW', 'SSE', 'CES', 'BTR', 'SAF',
|
||||
'ORD', 'TOS', 'RSO', 'DEE', 'FRE', 'MAG', 'FEN', 'CAI', 'PCL', 'HAS',
|
||||
'LOS', 'DVK', 'ROK', 'OWR', 'OTV', 'KTV', 'PUR', 'PLA', 'FUC', 'PAR',
|
||||
'FOR', 'MON', 'KAN', 'ZEN', 'LND', 'LNS', 'CHN', 'AMZ', 'TEN', 'CST',
|
||||
'NOV', 'ROU', 'ZOR', 'RED', 'KAL', 'ORA', 'VID', 'TIV', 'BSN', 'RAS',
|
||||
'UOS', 'PIO', 'FRI', 'LIR', 'WEB', 'SER', 'ASP', 'AOS', 'LOO', 'EUL',
|
||||
'SCI', 'ALP', 'CLO', 'ROC', 'OVZ', 'PVE', 'RST', 'EZX', 'GNS', 'JOL',
|
||||
'TUR', 'QTP', 'WPO', 'PAN', 'VIZ', 'AZU', 'COL',
|
||||
],
|
||||
'Mac' => ['MAC'],
|
||||
'Mobile Gaming Console' => ['PSP', 'NDS', 'XBX'],
|
||||
'OpenVMS' => ['OVS'],
|
||||
'Real-time OS' => ['MTK', 'TDX', 'MRE', 'JME', 'REX', 'RXT', 'KOL'],
|
||||
'Other Mobile' => ['WOS', 'POS', 'SBA', 'TIZ', 'SMG', 'MAE', 'LUN', 'GEO'],
|
||||
'Symbian' => ['SYM', 'SYS', 'SY3', 'S60', 'S40'],
|
||||
'Unix' => [
|
||||
'SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64',
|
||||
'INF', 'ELE', 'GNX', 'ULT', 'NWS', 'NXT', 'SBL',
|
||||
],
|
||||
'WebTV' => ['WTV'],
|
||||
'Windows' => ['WIN'],
|
||||
'Windows Mobile' => ['WPH', 'WMO', 'WCE', 'WRT', 'WIO', 'KIN'],
|
||||
'Other Smart TV' => ['WHS'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Contains a list of mappings from OS names we use to known client hint values
|
||||
*
|
||||
* @var array<string, array<string>>
|
||||
*/
|
||||
protected static $clientHintMapping = [
|
||||
'GNU/Linux' => ['Linux'],
|
||||
'Mac' => ['MacOS'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Operating system families that are known as desktop only
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $desktopOsArray = [
|
||||
'AmigaOS', 'IBM', 'GNU/Linux', 'Mac', 'Unix', 'Windows', 'BeOS', 'Chrome OS',
|
||||
];
|
||||
|
||||
/**
|
||||
* Fire OS version mapping
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $fireOsVersionMapping = [
|
||||
'11' => '8',
|
||||
'10' => '8',
|
||||
'9' => '7',
|
||||
'7' => '6',
|
||||
'5' => '5',
|
||||
'4.4.3' => '4.5.1',
|
||||
'4.4.2' => '4',
|
||||
'4.2.2' => '3',
|
||||
'4.0.3' => '3',
|
||||
'4.0.2' => '3',
|
||||
'4' => '2',
|
||||
'2' => '1',
|
||||
];
|
||||
|
||||
/**
|
||||
* Lineage OS version mapping
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $lineageOsVersionMapping = [
|
||||
'16' => '23',
|
||||
'15' => '22',
|
||||
'14' => '21',
|
||||
'13' => '20.0',
|
||||
'12.1' => '19.1',
|
||||
'12' => '19.0',
|
||||
'11' => '18.0',
|
||||
'10' => '17.0',
|
||||
'9' => '16.0',
|
||||
'8.1.0' => '15.1',
|
||||
'8.0.0' => '15.0',
|
||||
'7.1.2' => '14.1',
|
||||
'7.1.1' => '14.1',
|
||||
'7.0' => '14.0',
|
||||
'6.0.1' => '13.0',
|
||||
'6.0' => '13.0',
|
||||
'5.1.1' => '12.1',
|
||||
'5.0.2' => '12.0',
|
||||
'5.0' => '12.0',
|
||||
'4.4.4' => '11.0',
|
||||
'4.3' => '10.2',
|
||||
'4.2.2' => '10.1',
|
||||
'4.0.4' => '9.1.0',
|
||||
];
|
||||
|
||||
/**
|
||||
* Returns all available operating systems
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAvailableOperatingSystems(): array
|
||||
{
|
||||
return self::$operatingSystems;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all available operating system families
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getAvailableOperatingSystemFamilies(): array
|
||||
{
|
||||
return self::$osFamilies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the os name and shot name
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getShortOsData(string $name): array
|
||||
{
|
||||
$short = 'UNK';
|
||||
|
||||
foreach (self::$operatingSystems as $osShort => $osName) {
|
||||
if (\strtolower($name) !== \strtolower($osName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = $osName;
|
||||
$short = $osShort;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return \compact('short', 'name');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
$this->restoreUserAgentFromClientHints();
|
||||
|
||||
$osFromClientHints = $this->parseOsFromClientHints();
|
||||
$osFromUserAgent = $this->parseOsFromUserAgent();
|
||||
|
||||
if (!empty($osFromClientHints['name'])) {
|
||||
$name = $osFromClientHints['name'];
|
||||
$version = $osFromClientHints['version'];
|
||||
|
||||
// use version from user agent if non was provided in client hints, but os family from useragent matches
|
||||
if (empty($version)
|
||||
&& self::getOsFamily($name) === self::getOsFamily($osFromUserAgent['name'])
|
||||
) {
|
||||
$version = $osFromUserAgent['version'];
|
||||
}
|
||||
|
||||
// On Windows, version 0.0.0 can be either 7, 8 or 8.1
|
||||
if ('Windows' === $name && '0.0.0' === $version) {
|
||||
$version = ('10' === $osFromUserAgent['version']) ? '' : $osFromUserAgent['version'];
|
||||
}
|
||||
|
||||
// If the OS name detected from client hints matches the OS family from user agent
|
||||
// but the os name is another, we use the one from user agent, as it might be more detailed
|
||||
if (self::getOsFamily($osFromUserAgent['name']) === $name && $osFromUserAgent['name'] !== $name) {
|
||||
$name = $osFromUserAgent['name'];
|
||||
|
||||
if ('LeafOS' === $name || 'HarmonyOS' === $name) {
|
||||
$version = '';
|
||||
}
|
||||
|
||||
if ('PICO OS' === $name) {
|
||||
$version = $osFromUserAgent['version'];
|
||||
}
|
||||
|
||||
if ('Fire OS' === $name && !empty($osFromClientHints['version'])) {
|
||||
$majorVersion = (int) (\explode('.', $version, 1)[0] ?? '0');
|
||||
|
||||
$version = $this->fireOsVersionMapping[$version]
|
||||
?? $this->fireOsVersionMapping[$majorVersion] ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
$short = $osFromClientHints['short_name'];
|
||||
|
||||
// Chrome OS is in some cases reported as Linux in client hints, we fix this only if the version matches
|
||||
if ('GNU/Linux' === $name
|
||||
&& 'Chrome OS' === $osFromUserAgent['name']
|
||||
&& $osFromClientHints['version'] === $osFromUserAgent['version']
|
||||
) {
|
||||
$name = $osFromUserAgent['name'];
|
||||
$short = $osFromUserAgent['short_name'];
|
||||
}
|
||||
|
||||
// Chrome OS is in some cases reported as Android in client hints
|
||||
if ('Android' === $name && 'Chrome OS' === $osFromUserAgent['name']) {
|
||||
$name = $osFromUserAgent['name'];
|
||||
$version = '';
|
||||
$short = $osFromUserAgent['short_name'];
|
||||
}
|
||||
|
||||
// Meta Horizon is reported as Linux in client hints
|
||||
if ('GNU/Linux' === $name && 'Meta Horizon' === $osFromUserAgent['name']) {
|
||||
$name = $osFromUserAgent['name'];
|
||||
$short = $osFromUserAgent['short_name'];
|
||||
}
|
||||
} elseif (!empty($osFromUserAgent['name'])) {
|
||||
$name = $osFromUserAgent['name'];
|
||||
$version = $osFromUserAgent['version'];
|
||||
$short = $osFromUserAgent['short_name'];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
|
||||
$platform = $this->parsePlatform();
|
||||
$family = self::getOsFamily($short);
|
||||
$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) {
|
||||
$name = 'Android';
|
||||
$family = 'Android';
|
||||
$short = 'ADR';
|
||||
$version = '';
|
||||
}
|
||||
|
||||
if ('org.lineageos.jelly' === $this->clientHints->getApp() && 'Lineage OS' !== $name) {
|
||||
$majorVersion = (int) (\explode('.', $version, 1)[0] ?? '0');
|
||||
|
||||
$name = 'Lineage OS';
|
||||
$family = 'Android';
|
||||
$short = 'LEN';
|
||||
$version = $this->lineageOsVersionMapping[$version]
|
||||
?? $this->lineageOsVersionMapping[$majorVersion] ?? '';
|
||||
}
|
||||
|
||||
if ('org.mozilla.tv.firefox' === $this->clientHints->getApp() && 'Fire OS' !== $name) {
|
||||
$majorVersion = (int) (\explode('.', $version, 1)[0] ?? '0');
|
||||
|
||||
$name = 'Fire OS';
|
||||
$family = 'Android';
|
||||
$short = 'FIR';
|
||||
$version = $this->fireOsVersionMapping[$version] ?? $this->fireOsVersionMapping[$majorVersion] ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
$return = [
|
||||
'name' => $name,
|
||||
'short_name' => $short,
|
||||
'version' => $version,
|
||||
'platform' => $platform,
|
||||
'family' => $family,
|
||||
];
|
||||
|
||||
if (\in_array($return['name'], self::$operatingSystems)) {
|
||||
$return['short_name'] = \array_search($return['name'], self::$operatingSystems);
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the operating system family for the given operating system
|
||||
*
|
||||
* @param string $osLabel name or short name
|
||||
*
|
||||
* @return string|null If null, "Unknown"
|
||||
*/
|
||||
public static function getOsFamily(string $osLabel): ?string
|
||||
{
|
||||
if (\in_array($osLabel, self::$operatingSystems)) {
|
||||
$osLabel = \array_search($osLabel, self::$operatingSystems);
|
||||
}
|
||||
|
||||
foreach (self::$osFamilies as $family => $labels) {
|
||||
if (\in_array($osLabel, $labels)) {
|
||||
return (string) $family;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if OS is desktop
|
||||
*
|
||||
* @param string $osName OS short name
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isDesktopOs(string $osName): bool
|
||||
{
|
||||
$osFamily = self::getOsFamily($osName);
|
||||
|
||||
return \in_array($osFamily, self::$desktopOsArray);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the full name for the given short name
|
||||
*
|
||||
* @param string $os
|
||||
* @param string|null $ver
|
||||
*
|
||||
* @return ?string
|
||||
*/
|
||||
public static function getNameFromId(string $os, ?string $ver = null): ?string
|
||||
{
|
||||
if (\array_key_exists($os, self::$operatingSystems)) {
|
||||
$osFullName = self::$operatingSystems[$os];
|
||||
|
||||
return \trim($osFullName . ' ' . $ver);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the OS that can be safely detected from client hints
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function parseOsFromClientHints(): array
|
||||
{
|
||||
$name = $version = $short = '';
|
||||
|
||||
if ($this->clientHints instanceof ClientHints && $this->clientHints->getOperatingSystem()) {
|
||||
$hintName = $this->applyClientHintMapping($this->clientHints->getOperatingSystem());
|
||||
|
||||
foreach (self::$operatingSystems as $osShort => $osName) {
|
||||
if ($this->fuzzyCompare($hintName, $osName)) {
|
||||
$name = $osName;
|
||||
$short = $osShort;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$version = $this->clientHints->getOperatingSystemVersion();
|
||||
|
||||
if ('Windows' === $name) {
|
||||
$majorVersion = (int) (\explode('.', $version, 1)[0] ?? '0');
|
||||
$minorVersion = (int) (\explode('.', $version, 2)[1] ?? '0');
|
||||
|
||||
if (0 === $majorVersion) {
|
||||
$minorVersionMapping = [1 => '7', 2 => '8', 3 => '8.1'];
|
||||
$version = $minorVersionMapping[$minorVersion] ?? $version;
|
||||
} elseif ($majorVersion > 0 && $majorVersion < 11) {
|
||||
$version = '10';
|
||||
} elseif ($majorVersion > 10) {
|
||||
$version = '11';
|
||||
}
|
||||
}
|
||||
|
||||
// On Windows, version 0.0.0 can be either 7, 8 or 8.1, so we return 0.0.0
|
||||
if ('Windows' !== $name && '0.0.0' !== $version && 0 === (int) $version) {
|
||||
$version = '';
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'short_name' => $short,
|
||||
'version' => $this->buildVersion($version, []),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the OS that can be detected from useragent
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function parseOsFromUserAgent(): array
|
||||
{
|
||||
$osRegex = $matches = [];
|
||||
$name = $version = $short = '';
|
||||
|
||||
foreach ($this->getRegexes() as $osRegex) {
|
||||
$matches = $this->matchUserAgent($osRegex['regex']);
|
||||
|
||||
if ($matches) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($matches)) {
|
||||
$name = $this->buildByMatch($osRegex['name'], $matches);
|
||||
['name' => $name, 'short' => $short] = self::getShortOsData($name);
|
||||
|
||||
$version = \array_key_exists('version', $osRegex)
|
||||
? $this->buildVersion((string) $osRegex['version'], $matches)
|
||||
: '';
|
||||
|
||||
foreach ($osRegex['versions'] ?? [] as $regex) {
|
||||
$matches = $this->matchUserAgent($regex['regex']);
|
||||
|
||||
if (!$matches) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (\array_key_exists('name', $regex)) {
|
||||
$name = $this->buildByMatch($regex['name'], $matches);
|
||||
['name' => $name, 'short' => $short] = self::getShortOsData($name);
|
||||
}
|
||||
|
||||
if (\array_key_exists('version', $regex)) {
|
||||
$version = $this->buildVersion((string) $regex['version'], $matches);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'short_name' => $short,
|
||||
'version' => $version,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse current UserAgent string for the operating system platform
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function parsePlatform(): string
|
||||
{
|
||||
// Use architecture from client hints if available
|
||||
if ($this->clientHints instanceof ClientHints && $this->clientHints->getArchitecture()) {
|
||||
$arch = \strtolower($this->clientHints->getArchitecture());
|
||||
|
||||
if (false !== \strpos($arch, 'arm')) {
|
||||
return 'ARM';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'loongarch64')) {
|
||||
return 'LoongArch64';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'mips')) {
|
||||
return 'MIPS';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'sh4')) {
|
||||
return 'SuperH';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'sparc64')) {
|
||||
return 'SPARC64';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'x64')
|
||||
|| (false !== \strpos($arch, 'x86') && '64' === $this->clientHints->getBitness())
|
||||
) {
|
||||
return 'x64';
|
||||
}
|
||||
|
||||
if (false !== \strpos($arch, 'x86')) {
|
||||
return 'x86';
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('arm[ _;)ev]|.*arm$|.*arm64|aarch64|Apple ?TV|Watch ?OS|Watch1,[12]')) {
|
||||
return 'ARM';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('loongarch64')) {
|
||||
return 'LoongArch64';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('mips')) {
|
||||
return 'MIPS';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('sh4')) {
|
||||
return 'SuperH';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('sparc64')) {
|
||||
return 'SPARC64';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('64-?bit|WOW64|(?:Intel)?x64|WINDOWS_64|win64|.*amd64|.*x86_?64')) {
|
||||
return 'x64';
|
||||
}
|
||||
|
||||
if ($this->matchUserAgent('.*32bit|.*win32|(?:i[0-9]|x)86|i86pc')) {
|
||||
return 'x86';
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Parser;
|
||||
|
||||
/**
|
||||
* Class VendorFragments
|
||||
*
|
||||
* Device parser for vendor fragment detection
|
||||
*/
|
||||
class VendorFragment extends AbstractParser
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $fixtureFile = 'regexes/vendorfragments.yml';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $parserName = 'vendorfragments';
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $matchedRegex = null;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function parse(): ?array
|
||||
{
|
||||
foreach ($this->getRegexes() as $brand => $regexes) {
|
||||
foreach ($regexes as $regex) {
|
||||
if ($this->matchUserAgent($regex . '[^a-z0-9]+')) {
|
||||
$this->matchedRegex = $regex;
|
||||
|
||||
return ['brand' => $brand];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getMatchedRegex(): ?string
|
||||
{
|
||||
return $this->matchedRegex;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Yaml;
|
||||
|
||||
interface ParserInterface
|
||||
{
|
||||
/**
|
||||
* Parses the file with the given filename and returns the converted content
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function parseFile(string $file);
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Yaml;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Class Pecl
|
||||
*
|
||||
* Parses a YAML file with LibYAML library
|
||||
* @see http://php.net/manual/en/function.yaml-parse-file.php
|
||||
*/
|
||||
class Pecl implements ParserInterface
|
||||
{
|
||||
/**
|
||||
* Parses the file with the given filename using PECL and returns the converted content
|
||||
|
||||
* @param string $file The path to the YAML file to be parsed
|
||||
*
|
||||
* @return mixed The YAML converted to a PHP value or FALSE on failure
|
||||
*
|
||||
* @throws Exception If the YAML extension is not installed
|
||||
*/
|
||||
public function parseFile(string $file)
|
||||
{
|
||||
if (false === \function_exists('yaml_parse_file')) {
|
||||
throw new Exception('Pecl YAML extension is not installed');
|
||||
}
|
||||
|
||||
return \yaml_parse_file($file);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Yaml;
|
||||
|
||||
use Spyc as SpycParser;
|
||||
|
||||
class Spyc implements ParserInterface
|
||||
{
|
||||
/**
|
||||
* Parses the file with the given filename using Spyc and returns the converted content
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function parseFile(string $file)
|
||||
{
|
||||
return SpycParser::YAMLLoad($file);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
*
|
||||
* @link https://matomo.org
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DeviceDetector\Yaml;
|
||||
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
class Symfony implements ParserInterface
|
||||
{
|
||||
/**
|
||||
* Parses the file with the given filename using Symfony Yaml parser and returns the converted content
|
||||
*
|
||||
* @param string $file
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function parseFile(string $file)
|
||||
{
|
||||
return Yaml::parseFile($file);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* PSR-4 autoloader implementation for the DeviceDetector namespace.
|
||||
* First we define the 'dd_autoload' function, and then we register
|
||||
* it with 'spl_autoload_register' so that PHP knows to use it.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Automatically include the file that defines <code>class</code>.
|
||||
*
|
||||
* @param string $class
|
||||
* the name of the class to load
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function dd_autoload(string $class): void
|
||||
{
|
||||
if (false === strpos($class, 'DeviceDetector\\')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$namespaceMap = ['DeviceDetector\\' => __DIR__ . '/'];
|
||||
|
||||
foreach ($namespaceMap as $prefix => $dir) {
|
||||
/* First swap out the namespace prefix with a directory... */
|
||||
$path = str_replace($prefix, $dir, $class);
|
||||
/* replace the namespace separator with a directory separator... */
|
||||
$path = str_replace('\\', '/', $path);
|
||||
/* and finally, add the PHP file extension to the result. */
|
||||
$path .= '.php';
|
||||
/* $path should now contain the path to a PHP file defining $class */
|
||||
require $path;
|
||||
}
|
||||
}
|
||||
|
||||
spl_autoload_register('dd_autoload');
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"name": "matomo/device-detector",
|
||||
"type": "library",
|
||||
"description": "The Universal Device Detection library, that parses User Agents and detects devices (desktop, tablet, mobile, tv, cars, console, etc.), clients (browsers, media players, mobile apps, feed readers, libraries, etc), operating systems, devices, brands and models.",
|
||||
"keywords": ["useragent","parser","devicedetection"],
|
||||
"homepage": "https://matomo.org",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"authors": [
|
||||
{
|
||||
"name": "The Matomo Team",
|
||||
"email": "hello@matomo.org",
|
||||
"homepage": "https://matomo.org/team/"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"forum": "https://forum.matomo.org/",
|
||||
"issues": "https://github.com/matomo-org/device-detector/issues",
|
||||
"wiki": "https://dev.matomo.org/",
|
||||
"source": "https://github.com/matomo-org/matomo"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "DeviceDetector\\": "" },
|
||||
"exclude-from-classmap": ["Tests/"]
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2|^8.0",
|
||||
"mustangostang/spyc": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.8",
|
||||
"psr/cache": "^1.0.1",
|
||||
"psr/simple-cache": "^1.0.1",
|
||||
"matthiasmullie/scrapbook": "^1.4.7",
|
||||
"phpstan/phpstan": "^1.10.44",
|
||||
"mayflower/mo4-coding-standard": "^v9.0.0",
|
||||
"slevomat/coding-standard": "<8.16.0",
|
||||
"symfony/yaml": "^5.1.7"
|
||||
},
|
||||
"suggest": {
|
||||
"doctrine/cache": "Can directly be used for caching purpose",
|
||||
"ext-yaml": "Necessary for using the Pecl YAML parser"
|
||||
},
|
||||
"scripts": {
|
||||
"php-cs-fixed": "php vendor/bin/phpcbf"
|
||||
},
|
||||
"archive": {
|
||||
"exclude": ["/autoload.php"]
|
||||
},
|
||||
"replace": {
|
||||
"piwik/device-detector":"self.version"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="device-detector">
|
||||
<description>Device Detector Coding Standard</description>
|
||||
|
||||
<file>.</file>
|
||||
|
||||
<exclude-pattern>vendor/</exclude-pattern>
|
||||
|
||||
<!-- use MO4 coding standard as base -->
|
||||
<rule ref="MO4">
|
||||
<exclude name="SlevomatCodingStandard.Classes.ForbiddenPublicProperty.ForbiddenPublicProperty"/>
|
||||
<exclude name="SlevomatCodingStandard.Commenting.UselessInheritDocComment"/>
|
||||
<exclude name="SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter"/>
|
||||
<exclude name="Squiz.PHP.DisallowMultipleAssignments.Found"/>
|
||||
<exclude name="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator"/>
|
||||
</rule>
|
||||
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.RequireTernaryOperator">
|
||||
<properties>
|
||||
<property name="ignoreMultiLine" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<rule ref="Symfony.Commenting">
|
||||
<exclude-pattern>misc/</exclude-pattern>
|
||||
<exclude-pattern>Tests/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="Squiz.Functions.GlobalFunction.Found">
|
||||
<exclude-pattern>misc/</exclude-pattern>
|
||||
<exclude-pattern>autoload.php</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<rule ref="PSR1.Files.SideEffects.FoundWithSymbols">
|
||||
<exclude-pattern>misc/</exclude-pattern>
|
||||
<exclude-pattern>autoload.php</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<!-- Disallow more than 120 chars per line -->
|
||||
<rule ref="Generic.Files.LineLength">
|
||||
<properties>
|
||||
<property name="lineLimit" value="120" />
|
||||
<property name="absoluteLineLimit" value="120" />
|
||||
</properties>
|
||||
<exclude-pattern>misc/</exclude-pattern>
|
||||
<exclude-pattern>Tests/</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<!-- Require spaces around string concatenating -->
|
||||
<rule ref="Squiz.Strings.ConcatenationSpacing">
|
||||
<properties>
|
||||
<property name="spacing" value="1" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Disallow is_null function -->
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions">
|
||||
<properties>
|
||||
<property name="forbiddenFunctions" type="array" value="is_null=>null"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Require empty lines around control structures -->
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.BlockControlStructureSpacing"/>
|
||||
|
||||
<!-- Require strict types -->
|
||||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
|
||||
<properties>
|
||||
<property name="linesCountBeforeDeclare" value="1" />
|
||||
<property name="spacesCountAroundEqualsSign" value="0" />
|
||||
<property name="linesCountAfterDeclare" value="1" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Require Yoda-Conditions -->
|
||||
<rule ref="SlevomatCodingStandard.ControlStructures.RequireYodaComparison"/>
|
||||
|
||||
<!-- Disallow useless semicolons -->
|
||||
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon" />
|
||||
|
||||
<!-- Disallow old type hints in comments (e.g. "int[]" should be "array<int>") -->
|
||||
<rule ref="SlevomatCodingStandard.TypeHints.DisallowArrayTypeHintSyntax"/>
|
||||
|
||||
<!-- Disallow spaces after splat operator -->
|
||||
<rule ref="SlevomatCodingStandard.Operators.SpreadOperatorSpacing"/>
|
||||
|
||||
<!-- Disallow empty lines around class braces -->
|
||||
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
|
||||
<properties>
|
||||
<property name="linesCountAfterOpeningBrace" value="0" />
|
||||
<property name="linesCountBeforeClosingBrace" value="0" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Require empty lines around namespace definition -->
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.NamespaceSpacing">
|
||||
<properties>
|
||||
<property name="linesCountBeforeNamespace" value="1" />
|
||||
<property name="linesCountAfterNamespace" value="1" />
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Require empty lines around use statements -->
|
||||
<rule ref="SlevomatCodingStandard.Namespaces.UseSpacing">
|
||||
<properties>
|
||||
<property name="linesCountBeforeFirstUse" value="1" />
|
||||
<property name="linesCountBetweenUseTypes" value="0" />
|
||||
<property name="linesCountAfterLastUse" value="1" />
|
||||
</properties>
|
||||
</rule>
|
||||
</ruleset>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
- regex: 'NetFront'
|
||||
name: 'NetFront'
|
||||
|
||||
- regex: 'Edge/'
|
||||
name: 'Edge'
|
||||
|
||||
- regex: 'Trident'
|
||||
name: 'Trident'
|
||||
|
||||
- regex: 'Chr[o0]me/(?!1?\d\.|2[0-7]\.)'
|
||||
name: 'Blink'
|
||||
|
||||
- regex: '(?:Apple)?WebKit'
|
||||
name: 'WebKit'
|
||||
|
||||
- regex: 'Presto'
|
||||
name: 'Presto'
|
||||
|
||||
- regex: 'Goanna'
|
||||
name: 'Goanna'
|
||||
|
||||
- regex: '(?<!like )Clecko' # fork of Gecko
|
||||
name: 'Clecko'
|
||||
|
||||
- regex: '(?<!like )Gecko'
|
||||
name: 'Gecko'
|
||||
|
||||
- regex: 'KHTML'
|
||||
name: 'KHTML'
|
||||
|
||||
- regex: 'NetSurf'
|
||||
name: 'NetSurf'
|
||||
|
||||
- regex: 'Servo'
|
||||
name: 'Servo'
|
||||
|
||||
- regex: 'Ekioh(?:Flow)?'
|
||||
name: 'EkiohFlow'
|
||||
|
||||
- regex: 'xChaos_Arachne'
|
||||
name: 'Arachne'
|
||||
|
||||
- regex: 'LibWeb\+LibJs'
|
||||
name: 'LibWeb'
|
||||
|
||||
- regex: 'Maple (?!III)(\d+[.\d]+)|Maple\d{4}'
|
||||
name: 'Maple'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,146 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
- regex: 'Akregator(?:/(\d+[.\d]+))?'
|
||||
name: 'Akregator'
|
||||
version: '$1'
|
||||
url: 'http://userbase.kde.org/Akregator'
|
||||
|
||||
- regex: 'Apple-PubSub(?:/(\d+[.\d]+))?'
|
||||
name: 'Apple PubSub'
|
||||
version: '$1'
|
||||
url: 'https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pubsub.1.html'
|
||||
|
||||
- regex: 'BashPodder'
|
||||
name: 'BashPodder'
|
||||
version: ''
|
||||
url: 'http://lincgeek.org/bashpodder/'
|
||||
|
||||
- regex: 'Breaker/v?([\d.]+)'
|
||||
name: 'Breaker'
|
||||
version: '$1'
|
||||
url: 'https://www.breaker.audio/'
|
||||
|
||||
- regex: 'FeedDemon(?:/(\d+[.\d]+))?'
|
||||
name: 'FeedDemon'
|
||||
version: '$1'
|
||||
url: 'http://www.feeddemon.com/'
|
||||
|
||||
- regex: 'Feeddler(?:RSS|PRO)(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Feeddler RSS Reader'
|
||||
version: '$1'
|
||||
url: 'http://www.chebinliu.com/projects/iphone/feeddler-rss-reader/'
|
||||
|
||||
- regex: 'QuiteRSS(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'QuiteRSS'
|
||||
version: '$1'
|
||||
url: 'https://quiterss.org'
|
||||
|
||||
- regex: 'gPodder/([\d.]+)'
|
||||
name: 'gPodder'
|
||||
version: '$1'
|
||||
url: 'http://gpodder.org/'
|
||||
|
||||
- regex: 'JetBrains Omea Reader(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'JetBrains Omea Reader'
|
||||
version: '$1'
|
||||
url: 'http://www.jetbrains.com/omea/reader/'
|
||||
|
||||
- regex: 'Liferea(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Liferea'
|
||||
version: '$1'
|
||||
url: 'http://liferea.sf.net/'
|
||||
|
||||
- regex: '(?:NetNewsWire|Evergreen.+MacOS)(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'NetNewsWire'
|
||||
version: '$1'
|
||||
url: 'http://netnewswireapp.com/'
|
||||
|
||||
- regex: 'NewsBlur (?:iPhone|iPad) App(?: v(\d+[.\d]+))?'
|
||||
name: 'NewsBlur Mobile App'
|
||||
version: '$1'
|
||||
url: 'http://www.newsblur.com'
|
||||
|
||||
- regex: 'NewsBlur(?:/(\d+[.\d]+))'
|
||||
name: 'NewsBlur'
|
||||
version: '$1'
|
||||
url: 'http://www.newsblur.com'
|
||||
|
||||
- regex: 'newsbeuter(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Newsbeuter'
|
||||
version: '$1'
|
||||
url: 'http://www.newsbeuter.org/'
|
||||
|
||||
- regex: 'PritTorrent/([\d.]+)'
|
||||
name: 'PritTorrent'
|
||||
version: '$1'
|
||||
url: 'http://bitlove.org'
|
||||
|
||||
- regex: 'Pulp[/ ](\d+[.\d]+)'
|
||||
name: 'Pulp'
|
||||
version: '$1'
|
||||
url: 'http://www.acrylicapps.com/pulp/'
|
||||
|
||||
- regex: 'ReadKit(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'ReadKit'
|
||||
version: '$1'
|
||||
url: 'http://readkitapp.com/'
|
||||
|
||||
- regex: 'Reeder[/ ](\d+[.\d]+)'
|
||||
name: 'Reeder'
|
||||
version: '$1'
|
||||
url: 'http://reederapp.com/'
|
||||
|
||||
- regex: 'RSSBandit(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'RSS Bandit'
|
||||
version: '$1'
|
||||
url: 'http://www.rssbandit.org)'
|
||||
|
||||
- regex: 'RSS Junkie(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'RSS Junkie'
|
||||
version: '$1'
|
||||
url: 'https://play.google.com/store/apps/details?id=com.bitpowder.rssjunkie'
|
||||
|
||||
- regex: 'RSSOwl(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'RSSOwl'
|
||||
version: '$1'
|
||||
url: 'https://www.rssowl.org/'
|
||||
|
||||
- regex: 'Stringer'
|
||||
name: 'Stringer'
|
||||
version: ''
|
||||
url: 'https://github.com/swanson/stringer'
|
||||
|
||||
- regex: '^castero (\d+\.[.\d]+)'
|
||||
name: 'castero'
|
||||
version: '$1'
|
||||
url: 'https://github.com/xgi/castero'
|
||||
|
||||
- regex: '^castget (\d+\.[.\d]+)'
|
||||
name: 'castget'
|
||||
version: '$1'
|
||||
url: 'https://castget.johndal.com/'
|
||||
|
||||
- regex: '^Newsboat/([a-z\d\.]+)'
|
||||
name: 'Newsboat'
|
||||
version: '$1'
|
||||
url: 'https://newsboat.org/index.html'
|
||||
|
||||
- regex: '^Playapod(?: Lite)?/(\d+\.[.\d]+)'
|
||||
name: 'Playapod'
|
||||
version: '$1'
|
||||
url: 'https://playapod.com/'
|
||||
|
||||
- regex: 'PodPuppy (\d+\.[.\d]+)'
|
||||
name: 'PodPuppy'
|
||||
version: '$1'
|
||||
url: 'https://github.com/felixwatts/PodPuppy'
|
||||
|
||||
- regex: '^Reeder/([\d.]+)'
|
||||
name: 'Reeder'
|
||||
version: '$1'
|
||||
url: 'https://reederapp.com/'
|
||||
@@ -0,0 +1,166 @@
|
||||
# Apps
|
||||
|
||||
'org.telegram.messenger': 'Telegram'
|
||||
'org.telegram.messenger.web': 'Telegram'
|
||||
'com.snapchat.android': 'Snapchat'
|
||||
'info.sunista.app': 'Sanista Persian Instagram'
|
||||
'com.instapro.app': 'InstaPro'
|
||||
'com.tencent.mm': 'WeChat'
|
||||
'com.kakao.talk': 'KakaoTalk'
|
||||
'com.ayoba.ayoba': 'Ayoba'
|
||||
'snapu2b.com': 'SnapU2B'
|
||||
'com.facebook.katana': 'Facebook'
|
||||
'com.facebook.orca': 'Facebook Messenger'
|
||||
'com.yahoo.onesearch': 'Yahoo OneSearch'
|
||||
'jp.co.yahoo.android.yjtop': 'Yahoo! Japan'
|
||||
'it.ideasolutions.kyms': 'KYMS - Keep Your Media Safe'
|
||||
'it.tolelab.fvd': 'FVD - Free Video Downloader'
|
||||
'kik.android': 'Kik'
|
||||
'com.tinder': 'Tinder'
|
||||
'com.videochat.livu': 'LivU'
|
||||
'io.metamask': 'MetaMask'
|
||||
'com.totalav.android': 'TotalAV'
|
||||
'com.fsecure.ms.saunalahti_m': 'Elisa Turvapaketti'
|
||||
'com.fsecure.ms.ziggo': 'Ziggo Safe Online'
|
||||
'com.aol.mobile.aolapp': 'AOL'
|
||||
'com.fancyclean.security.antivirus': 'Fancy Security'
|
||||
'com.google.android.gms': 'Google Play'
|
||||
'com.appsinnova.android.keepclean': 'KeepClean'
|
||||
'com.turtc': 'TurTc'
|
||||
'com.sony.nfx.app.sfrc': 'News Suite by Sony'
|
||||
'com.rcplatform.livechat': 'Tumile'
|
||||
'jp.gocro.smartnews.android': 'SmartNews'
|
||||
'com.lenovo.anyshare.gps': 'SHAREit'
|
||||
'com.espn.score_center': 'ESPN'
|
||||
'com.active.cleaner': 'Active Cleaner'
|
||||
'com.hld.anzenbokusucal': 'Calculator Photo Vault'
|
||||
'com.hld.anzenbokusufake': 'Calculator Hide Photos'
|
||||
'com.hld.anzenbokusu': 'Sgallery'
|
||||
'com.huawei.appmarket': 'AppGallery'
|
||||
'com.michatapp.im': 'MiChat'
|
||||
'com.michatapp.im.lite': 'MiChat Lite'
|
||||
'com.noxgroup.app.security': 'Nox Security'
|
||||
'phone.cleaner.antivirus.speed.booster': 'Super Cleaner'
|
||||
'com.yy.hiyo': 'Hago'
|
||||
'com.instagram.android': 'Instagram'
|
||||
'com.instagram.barcelona': 'Threads'
|
||||
'com.microsoft.office.outlook': 'Microsoft Outlook'
|
||||
'com.microsoft.bing': 'Microsoft Bing'
|
||||
'com.microsoft.bingintl': 'Microsoft Bing'
|
||||
'com.nhn.android.search': 'Naver'
|
||||
'com.jb.security': 'GO Security'
|
||||
'com.fsecure.ms.safe': 'F-Secure SAFE'
|
||||
'com.jaumo': 'Jaumo'
|
||||
'com.jaumo.prime': 'Jaumo Prime'
|
||||
'com.skout.android': 'SKOUT'
|
||||
'com.hornet.android': 'Hornet'
|
||||
'com.fsecure.ms.darty': 'Darty Sécurité'
|
||||
'com.fsecure.ms.dc': 'F-Secure Mobile Security'
|
||||
'com.fsecure.ms.swisscom.sa': 'Swisscom Internet Security'
|
||||
'com.andrewshu.android.reddit': 'Reddit is fun'
|
||||
'com.andrewshu.android.redditdonation': 'Reddit is fun'
|
||||
'org.quantumbadger.redreader': 'RedReader'
|
||||
'com.sina.weibo': 'Sina Weibo'
|
||||
'com.wiseplay': 'Wiseplay'
|
||||
'com.fsecure.ms.nifty': 'Always Safe Security 24'
|
||||
'com.zeebusiness.news': 'Zee Business'
|
||||
'com.awesapp.isp': 'iSafePlay'
|
||||
'com.baidu.searchbox': 'Baidu Box App'
|
||||
'hesoft.T2S': 'T2S'
|
||||
'hippeis.com.photochecker': 'Photo Sherlock'
|
||||
'com.thinkfree.searchbyimage': 'Reverse Image Search'
|
||||
'com.tct.launcher': 'Joy Launcher'
|
||||
'com.tcl.live': 'TCL Live'
|
||||
'com.harshad.someto': 'Social Media Explorer'
|
||||
'com.reddit.frontpage': 'Reddit'
|
||||
'com.opera.app.news': 'Opera News'
|
||||
'com.palmteam.imagesearch': 'Search By Image'
|
||||
'com.sharekaro.app': 'ShareKaro'
|
||||
'com.til.timesnews': 'NewsPoint'
|
||||
'com.transsion.XOSLauncher': 'XOS Launcher'
|
||||
'com.transsion.hilauncher': 'HiOS Launcher'
|
||||
'com.transsion.itel.launcher': 'itel Launcher'
|
||||
'com.twitter.android': 'Twitter'
|
||||
'com.waze': 'Waze'
|
||||
'com.tuya.smartlife': 'Tuya Smart Life'
|
||||
'com.cleanmaster.mguard': 'Clean Master'
|
||||
'com.cleanmaster.mguard.huawei': 'Clean Master'
|
||||
'de.twokit.castbrowsernexusplayer': 'TV Cast'
|
||||
'de.twokit.video.tv.cast.browser.firetv': 'TV Cast'
|
||||
'de.twokit.video.tv.cast.browser.lg': 'TV Cast'
|
||||
'de.twokit.video.tv.cast.browser.samsung': 'TV Cast'
|
||||
'com.cleanmaster.security': 'CM Security'
|
||||
'com.antivirus.master.cmsecurity': 'CM Security'
|
||||
'idm.video.free': 'IDM Video Download Manager'
|
||||
'mobi.deallauncher.coupons.shopping': 'Coupons & Deals'
|
||||
'com.wukongtv.wkcast.intl': 'Quick Cast'
|
||||
'com.tt.android.dm.view': 'Download Manager'
|
||||
'com.fsecure.ms.kpn.veilig': 'KPN Veilig'
|
||||
'com.fsecure.ms.actshield': 'ACT Shield'
|
||||
'com.fsecure.ms.talktalksa': 'TalkTalk SuperSafe'
|
||||
'com.fsecure.ms.dnafi': 'DNA Digiturva'
|
||||
'com.fsecure.ms.teliasweden': 'Telia Trygg'
|
||||
'com.fsecure.ms.upc.ch': 'UPC Internet Security'
|
||||
'com.fsecure.ms.sfr': 'SFR Sécurité'
|
||||
'com.fsecure.ms.sonera': 'Telia Turvapaketti'
|
||||
'com.bifrostwallet.app': 'Bifrost Wallet'
|
||||
'com.anydesk.anydeskandroid': 'AnyDesk Remote Desktop'
|
||||
'com.google.android.youtube': 'YouTube'
|
||||
'io.bluewallet.bluewallet': 'BlueWallet'
|
||||
'com.google.android.apps.searchlite': 'Google Go'
|
||||
'com.snaptube.premium': 'SnapTube'
|
||||
'com.myhomescreen.sms': 'Messenger Home'
|
||||
'com.myhomescreen.email': 'Email Home'
|
||||
'com.myhomescreen.weather': 'Weather Home'
|
||||
'com.myhomescreen.access': 'Big Keyboard'
|
||||
'com.myhomescreen.messenger.home.emoji.lite': 'Messenger Lite'
|
||||
'com.myhomescreen.fitness': 'Fit Home'
|
||||
'com.myhomescreen.news': 'News Home'
|
||||
'com.amazon.webapps.gms.search': 'Google Search App'
|
||||
'com.huawei.fastapp': 'Huawei Quick App Center'
|
||||
'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'
|
||||
'com.oxoo.kinogo': 'Kinogo.ge'
|
||||
'com.tradron.hdvideodownloader': 'Download Hub'
|
||||
'net.daum.android.daum': 'Daum'
|
||||
'com.massimple.nacion.gcba.es': '+Simple'
|
||||
'com.massimple.nacion.parana.es': '+Simple'
|
||||
'com.microsoft.math': 'Microsoft Math Solver'
|
||||
'com.instabridge.android': 'Instabridge'
|
||||
'com.repotools.whatplay': 'Whatplay'
|
||||
'com.saf.seca': 'SearchCraft'
|
||||
'com.huawei.hwsearch': 'Petal Search'
|
||||
'com.playit.videoplayer': 'PLAYit'
|
||||
'com.droidlogic.xlauncher': 'X Launcher'
|
||||
'nu.bi.moya': 'Moya'
|
||||
'com.microsoft.copilot': 'Microsoft Copilot'
|
||||
'com.nate.android.portalmini': 'nate'
|
||||
'za.co.tracker.consumer': 'Tracker Connect'
|
||||
'com.larus.wolf': 'Cici'
|
||||
'com.qihoo.security': '360 Security'
|
||||
'com.infinix.xshare': 'XShare'
|
||||
'com.transsion.magicshow': 'Visha'
|
||||
'com.bigqsys.photosearch.searchbyimage2020': 'Photo Search'
|
||||
'com.stickypassword.android': 'Sticky Password'
|
||||
'com.nytimes.crossword': 'The Crossword'
|
||||
'castify.roku': 'Castify'
|
||||
'com.castify': 'Castify'
|
||||
'mojeek.app': 'Mojeek'
|
||||
'org.aka.messenger': 'Aka Messenger'
|
||||
'org.aka.lite': 'Aka Messenger Lite'
|
||||
'the.best.gram': 'Bestgram'
|
||||
'ir.ilmili.telegraph': 'Graph Messenger'
|
||||
|
||||
# Vpns
|
||||
'org.torproject.android': 'Orbot'
|
||||
'free.vpn.unblock.proxy.vpnmonster': 'VPN Monster'
|
||||
'com.udicorn.proxy': 'Blue Proxy'
|
||||
'com.v2.vpn.security.free': 'V2Free'
|
||||
'com.surfshark.vpnclient.android': 'Surfshark'
|
||||
'com.omshyapps.vpn': 'Omshy VPN'
|
||||
'com.kuto.vpn': 'KUTO VPN'
|
||||
'com.ezt.vpn': 'EZVPN'
|
||||
'com.nocardteam.nocardvpn': 'NoCard VPN'
|
||||
'com.nocardteam.nocardvpn.lite': 'NoCard VPN Lite'
|
||||
@@ -0,0 +1,326 @@
|
||||
# Browsers
|
||||
'mark.via.gg': 'Via'
|
||||
'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'
|
||||
'acr.browser.raisebrowserfull': 'Raise Fast Browser'
|
||||
'acr.tez.browse': 'Browspeed Browser'
|
||||
'com.Fast.BrowserUc.lite': 'Fast Browser UC Lite'
|
||||
'acr.browser.barebones': 'Lightning Browser'
|
||||
'anar.app.darkweb': 'Dark Web Browser'
|
||||
'com.darkbrowser': 'Dark Browser'
|
||||
'com.kiwibrowser.browser': 'Kiwi'
|
||||
'com.cloudmosa.puffinFree': 'Puffin Web Browser'
|
||||
'com.cloudmosa.puffin': 'Puffin Web Browser' # or Puffin Web Browser Pro
|
||||
'com.cloudmosa.puffinIncognito': 'Puffin Incognito Browser'
|
||||
'com.cloudmosa.puffinCloudBrowser': 'Puffin Cloud Browser'
|
||||
'com.aloha.browser': 'Aloha Browser'
|
||||
'com.cake.browser': 'Cake Browser'
|
||||
'com.UCMobile.intl': 'UC Browser'
|
||||
'com.iebrowser.fast': 'IE Browser Fast'
|
||||
'com.internet.browser.secure': 'Internet Browser Secure'
|
||||
'acr.browser.linxy': 'Vegas Browser'
|
||||
'com.oh.bro': 'OH Browser'
|
||||
'com.oh.brop': 'OH Private Browser'
|
||||
'com.duckduckgo.mobile.android': 'DuckDuckGo Privacy Browser'
|
||||
'net.onecook.browser': 'Stargon'
|
||||
'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'
|
||||
'com.anka.browser': 'Anka Browser'
|
||||
'org.mozilla.focus': 'Firefox Focus'
|
||||
'org.mozilla.tv.firefox': 'Firefox Focus'
|
||||
'com.vivaldi.browser': 'Vivaldi'
|
||||
'web.browser.dragon': 'Dragon Browser'
|
||||
'org.easyweb.browser': 'Easy Browser'
|
||||
'com.xbrowser.play': 'XBrowser Mini'
|
||||
'com.sharkeeapp.browser': 'Sharkee Browser'
|
||||
'com.mobiu.browser': 'Lark Browser'
|
||||
'com.qflair.browserq': 'Pluma'
|
||||
'com.noxgroup.app.browser': 'Nox Browser'
|
||||
'com.jio.web': 'JioSphere'
|
||||
'com.ume.browser.cust': 'Ume Browser'
|
||||
'com.ume.browser.international': 'Ume Browser'
|
||||
'com.ume.browser.bose': 'Ume Browser'
|
||||
'com.ume.browser.euas': 'Ume Browser'
|
||||
'com.ume.browser.latinamerican': 'Ume Browser'
|
||||
'com.ume.browser.mexicotelcel': 'Ume Browser'
|
||||
'com.ume.browser.venezuelavtelca': 'Ume Browser'
|
||||
'com.ume.browser.northamerica': 'Ume Browser'
|
||||
'com.ume.browser.newage': 'Ume Browser'
|
||||
'com.kuto.browser': 'KUTO Mini Browser'
|
||||
'com.dolphin.browser.zero': 'Dolphin Zero'
|
||||
'mobi.mgeek.TunnyBrowser': 'Dolphin' # Dolphin + AdBlock
|
||||
'nextapp.atlas': 'Atlas'
|
||||
'org.mozilla.rocket': 'Firefox Rocket' # Firefox Lite
|
||||
'com.mx.browser': 'Maxthon'
|
||||
'com.ecosia.android': 'Ecosia'
|
||||
'org.lineageos.jelly': 'Jelly'
|
||||
'com.opera.gx': 'Opera GX'
|
||||
'br.marcelo.monumentbrowser': 'Monument Browser'
|
||||
'com.airfind.deltabrowser': 'Delta Browser'
|
||||
'com.apusapps.browser': 'APUS Browser'
|
||||
'com.ask.browser': 'Ask.com'
|
||||
'com.browser.tssomas': 'Super Fast Browser'
|
||||
'iron.web.jalepano.browser': 'SuperFast Browser'
|
||||
'yuce.browser.mini': 'Ui Browser Mini'
|
||||
'SavySoda.PrivateBrowsing': 'SavySoda'
|
||||
'savannah.internet.web.browser': 'Savannah Browser'
|
||||
'com.gl9.cloudBrowser': 'Surf Browser'
|
||||
'com.ucold.browser.secure.browse': 'UC Browser Mini'
|
||||
'com.mycompany.app.soulbrowser': 'Soul Browser'
|
||||
'com.quickbig.browser': 'Indian UC Mini Browser' # (alternative name Splash UC Mini Browser)
|
||||
'com.opera.browser': 'Opera'
|
||||
'com.opera.mini.native': 'Opera Mini'
|
||||
'com.wSilverMobBrowser': 'SilverMob US'
|
||||
'com.ksmobile.cb': 'CM Browser'
|
||||
'com.cmcm.armorfly': 'Armorfly Browser'
|
||||
'org.mini.freebrowser': 'CM Mini'
|
||||
'com.anc.web.browser': 'Comfort Browser'
|
||||
'fast.explorer.web.browser': 'Fast Explorer'
|
||||
'net.soti.surf': 'SOTI Surf'
|
||||
'com.lexi.browser': 'Lexi Browser'
|
||||
'com.browser.pintar': 'Smart Browser'
|
||||
'com.belva.browser': 'Belva Browser'
|
||||
'com.belva.safe.browser': 'Belva Browser'
|
||||
'com.youcare.browser': 'YouCare'
|
||||
'org.lilo.mobile.android2020': 'Lilo'
|
||||
'com.opera.cryptobrowser': 'Opera Crypto'
|
||||
'AlohaBrowser': 'Aloha Browser'
|
||||
'mark.via': 'Via'
|
||||
'com.xpp.floatbrowser': 'Float Browser'
|
||||
'com.kiddoware.kidsafebrowser': 'Kids Safe Browser'
|
||||
'com.hideitpro.vbrowser': 'vBrowser'
|
||||
'com.cgbrowser.rn': 'CG Browser'
|
||||
'com.azka.browser.anti.blokir': 'Azka Browser'
|
||||
'com.azka.browser': 'Azka Browser'
|
||||
'com.micromaxinfo.browser': 'Mmx Browser'
|
||||
'com.zeesitech.bitchutebrowser': 'Bitchute Browser'
|
||||
'nova.all.video.downloader': 'Nova Video Downloader Pro'
|
||||
'tukidev.pronhubbrowser.tanpavpn': 'PronHub Browser'
|
||||
'com.crowbar.beaverlite': 'Frost'
|
||||
'com.crowbar.beaverbrowser': 'Frost+'
|
||||
'com.lenovo.browser': 'Lenovo Browser'
|
||||
'com.transsion.phoenix': 'Phoenix Browser'
|
||||
'quick.browser.secure': 'Quick Browser'
|
||||
'com.asus.browser': 'Asus Browser'
|
||||
'com.opera.touch': 'Opera Touch'
|
||||
'com.ghostery.android.ghostery': 'Ghostery Privacy Browser'
|
||||
'com.oceanhero.search': 'OceanHero'
|
||||
'com.mebrowser.webapp': 'Me Browser'
|
||||
'info.plateaukao.einkbro': 'EinkBro'
|
||||
'com.fevdev.nakedbrowser': 'Naked Browser'
|
||||
'com.fevdev.nakedbrowserlts': 'Naked Browser'
|
||||
'com.fevdev.nakedbrowserpro': 'Naked Browser Pro'
|
||||
'com.yasirshakoor.ducbrowser': 'DUC Browser'
|
||||
'com.wDesiBrowser_13255326': 'Desi Browser'
|
||||
'com.huawei.browser': 'Huawei Browser Mobile'
|
||||
'com.phantom.me': 'Phantom.me'
|
||||
'com.opera.mini.android': 'Opera Mini'
|
||||
'jp.ejimax.berrybrowser': 'Berry Browser'
|
||||
'com.fulldive.mobile': 'Fulldive'
|
||||
'com.talpa.hibrowser': 'Hi Browser'
|
||||
'org.midorinext.android': 'Midori Lite'
|
||||
'reactivephone.msearch': 'Smart Search & Web Browser'
|
||||
'com.sibimobilelab.amazebrowser': 'Amaze Browser'
|
||||
'com.alohamobile.browser.lite': 'Aloha Browser Lite'
|
||||
'com.tcl.browser': 'BrowseHere'
|
||||
'com.seraphic.openinet.pre': 'Open Browser'
|
||||
'com.seraphic.openinet.cvte': 'Open Browser'
|
||||
'privatebrowser.securebrowser.com.klar': 'Secure Private Browser'
|
||||
'in.pokebbrowser.bukablokirsitus': 'HUB Browser'
|
||||
'com.wOpenBrowser_12576500': 'Open Browser fast 5G'
|
||||
'com.wOpenbrowser_13506467': 'Open Browser 4U'
|
||||
'com.MaxTube.browser': 'MaxTube Browser'
|
||||
'com.ninexgen.chowbo': 'Chowbo'
|
||||
'net.pertiller.debuggablebrowser': 'Debuggable Browser'
|
||||
'com.appssppa.idesktoppcbrowser': 'iDesktop PC Browser'
|
||||
'pi.browser': 'Pi Browser'
|
||||
'com.xooloo.internet': 'Xooloo Internet'
|
||||
'com.u_browser': 'U Browser'
|
||||
'ai.blokee.browser.android': 'Bloket'
|
||||
'com.vast.vpn.proxy.unblock': 'Vast Browser'
|
||||
'com.security.xvpn.z35kb': 'X-VPN'
|
||||
'com.security.xvpn.z35kb.amazon': 'X-VPN'
|
||||
'com.security.xvpn.z35kb.huawei': 'X-VPN'
|
||||
'com.yandex.browser.lite': 'Yandex Browser Lite'
|
||||
'com.yandex.browser.beta': 'Yandex Browser'
|
||||
'com.yandex.browser.alpha': 'Yandex Browser'
|
||||
'cz.seznam.sbrowser': 'Seznam Browser'
|
||||
'com.morrisxar.nav88': 'Office Browser'
|
||||
'com.rabbit.incognito.browser': 'Rabbit Private Browser'
|
||||
'arun.com.chromer': 'Lynket Browser'
|
||||
'jp.hazuki.yuzubrowser': 'Yuzu Browser'
|
||||
'com.swiftariel.browser.cherry': 'Cherry Browser'
|
||||
'id.browser.vivid3': 'Vivid Browser Mini'
|
||||
'com.browser.yo.indian': 'Yo Browser'
|
||||
'com.mercandalli.android.browser': 'G Browser'
|
||||
'com.bf.browser': 'BXE Browser'
|
||||
'com.qihoo.browser': '360 Secure Browser'
|
||||
'com.qihoo.contents': '360 Secure Browser'
|
||||
'com.qihoo.haosou': '360 Secure Browser'
|
||||
'com.qihoo.padbrowser': '360 Secure Browser'
|
||||
'com.qihoo.sonybrowser': '360 Secure Browser'
|
||||
'org.zirco': 'Zirco Browser'
|
||||
'org.tint': 'Tint Browser'
|
||||
'com.skyfire.browser': 'Skyfire'
|
||||
'com.sonymobile.smallbrowser': 'Sony Small Browser'
|
||||
'org.hola': 'hola! Browser'
|
||||
'it.ideasolutions.amerigo': 'Amerigo'
|
||||
'org.xbrowser.prosuperfast': 'xBrowser Pro Super Fast'
|
||||
'org.plus18.android': '18+ Privacy Browser'
|
||||
'com.beyond.privatebrowser': 'Beyond Private Browser'
|
||||
'com.blacklion.browser': 'Black Lion Browser'
|
||||
'com.opera.mini.native.ShonizME': 'Opera Mini'
|
||||
'com.tuc.mini.st': 'TUC Mini Browser'
|
||||
'com.roidtechnologies.appbrowzer': 'AppBrowzer'
|
||||
'com.futuristic.sx': 'SX Browser'
|
||||
'hot.fiery.browser': 'Fiery Browser'
|
||||
'in.nismah.yagi': 'YAGI'
|
||||
'com.apn.mobile.browser.cherry': 'APN Browser'
|
||||
'com.apn.mobile.browser.umeatt': 'APN Browser'
|
||||
'com.apn.mobile.browser.zte': 'APN Browser'
|
||||
'com.tencent.mtt': 'QQ Browser'
|
||||
'com.wordly.translate.browser': 'NextWord Browser'
|
||||
'idm.internet.download.manager': '1DM Browser'
|
||||
'idm.internet.download.manager.plus': '1DM+ Browser'
|
||||
'com.veeraapps.newadult': 'Adult Browser'
|
||||
'com.xnxbrowser.rampage': 'XNX Browser'
|
||||
'com.xtremecast': 'XtremeCast'
|
||||
'com.xvideobrowserlite.xvideoDownloaderbrowserlite': 'X Browser Lite'
|
||||
'com.xxnxx.browser.proxy.vpn': 'xBrowser'
|
||||
'com.sweetbrowser.ice': 'Sweet Browser'
|
||||
'com.mcent.browser': 'mCent'
|
||||
'com.htc.sense.browser': 'HTC Browser'
|
||||
'com.browlser': 'Browlser'
|
||||
'app.browserhub.download': 'Browser Hup Pro'
|
||||
'com.flyperinc.flyperlink': 'Flyperlink'
|
||||
'com.w3engineers.banglabrowser': 'Bangla Browser'
|
||||
'com.coccoc.trinhduyet': 'Coc Coc'
|
||||
'com.browser.explore': 'Explore Browser'
|
||||
'com.microsoft.emmx': 'Microsoft Edge'
|
||||
'com.explore.web.browser': 'Web Browser & Explorer'
|
||||
'privacy.explorer.fast.safe.browser': 'Privacy Explorer Fast Safe'
|
||||
'app.soundy.browser': 'Soundy Browser'
|
||||
'com.ivvi.browser': 'IVVI Browser'
|
||||
'com.nomone.vrbrowser': 'NOMone VR Browser'
|
||||
'com.opus.browser': 'Opus Browser'
|
||||
'com.arvin.browser': 'Arvin'
|
||||
'com.pawxy.browser': 'Pawxy'
|
||||
'com.internet.tvbrowser': 'LUJO TV Browser'
|
||||
'com.logicui.tvbrowser2': 'LogicUI TV Browser'
|
||||
'com.opera.browser.afin': 'Opera'
|
||||
'com.opera.browser.beta': 'Opera'
|
||||
'com.quark.browser': 'Quark'
|
||||
'jp.co.yahoo.android.ybrowser': 'Yahoo! Japan Browser'
|
||||
'com.tv.browser.open': 'Open TV Browser'
|
||||
'com.ornet.torbrowser': 'OrNET Browser'
|
||||
'com.browsbit': 'BrowsBit'
|
||||
'org.mozilla.firefox': 'Firefox Mobile'
|
||||
'com.yandex.browser': 'Yandex Browser'
|
||||
'com.opera.mini.native.beta': 'Opera Mini'
|
||||
'com.sec.android.app.sbrowser': 'Samsung Browser'
|
||||
'com.sec.android.app.sbrowser.lite': 'Samsung Browser Lite'
|
||||
'com.browser.elmurzaev': 'World Browser'
|
||||
'every.browser.inc': 'Every Browser'
|
||||
'com.mi.globalbrowser': 'Mi Browser'
|
||||
'nu.tommie.inbrowser': 'InBrowser'
|
||||
'com.insta.browser': 'Insta Browser'
|
||||
'com.alohamobile.vertexsurf': 'Vertex Surf'
|
||||
'com.hollabrowser.meforce': 'Holla Web Browser'
|
||||
'org.torbrowser.torproject': 'Tor Browser'
|
||||
'org.torproject.torbrowser': 'Tor Browser'
|
||||
'com.marslab.browserz': 'MarsLab Web Browser'
|
||||
'com.mini.web.browser': 'Sunflower Browser'
|
||||
'com.cavebrowser': 'Cave Browser'
|
||||
'com.zordo.browser': 'Zordo Browser'
|
||||
'freedom.theanarch.org.freedom': 'Freedom Browser'
|
||||
'com.lechneralexander.privatebrowser': 'Private Internet Browser'
|
||||
'com.airfind.browser': 'Airfind Secure Browser'
|
||||
'com.securex.browser': 'SecureX'
|
||||
'com.sec.android.app.sbrowser.beta': 'Samsung Browser'
|
||||
'threads.thor': 'Thor'
|
||||
'com.androidbull.incognito.browser': 'Incognito Browser'
|
||||
'com.mosoft.godzilla': 'Godzilla Browser'
|
||||
'com.oceanbrowser.mobile.android': 'Ocean Browser'
|
||||
'com.qmamu.browser': 'Qmamu'
|
||||
'com.techlastudio.bfbrowser': 'BF Browser'
|
||||
'com.befaster.bfbrowser': 'BF Browser'
|
||||
'app.nextinnovations.brokeep': 'BroKeep Browser'
|
||||
'org.lilo.app': 'Lilo'
|
||||
'proxy.browser.unblock.sites.proxybrowser.unblocksites': 'Proxy Browser'
|
||||
'com.hotsurf.browser': 'HotBrowser'
|
||||
'vpn.video.downloader': 'VD Browser'
|
||||
'com.aospstudio.tvsearch': 'Quick Search TV'
|
||||
'com.go.browser': 'GO Browser'
|
||||
'com.apgsolutionsllc.APGSOLUTIONSLLC0007': 'Basic Web Browser'
|
||||
'com.phlox.tvwebbrowser': 'TV Bro'
|
||||
'com.lovense.vibemate': 'VibeMate'
|
||||
'dev.sect.lotus.browser.videoapp': 'Lotus'
|
||||
'com.qjy.browser': 'QJY TV Browser' # http://www.qianjiayue.com/new/?c=index&a=show&id=100
|
||||
'com.airwatch.browser': 'VMware AirWatch'
|
||||
'com.microsoft.intune.mam.managedbrowser': 'Intune Managed Browser'
|
||||
'com.tencent.bang': 'Bang'
|
||||
'com.outcoder.browser': 'Surfy Browser'
|
||||
'ginxdroid.gdm': 'GinxDroid Browser'
|
||||
'on.browser': 'OnBrowser Lite'
|
||||
'com.pico.browser.overseas': 'PICO Browser'
|
||||
'com.cliqz.browser': 'Cliqz'
|
||||
'org.hola.prem': 'hola! Browser'
|
||||
'com.baidu.browser.inter': 'Baidu Browser'
|
||||
'org.torproject.torbrowser_alpha': 'Tor Browser'
|
||||
'com.ilegendsoft.mercury': 'Mercury'
|
||||
'com.apn.mobile.browser.coolpad': 'APN Browser'
|
||||
'com.apn.mobile.browser.infosonics': 'APN Browser'
|
||||
'net.dezor.browser': 'Dezor'
|
||||
'com.involta.involtago': 'Involta Go'
|
||||
'jp.ddo.pigsty.HabitBrowser': 'Habit Browser'
|
||||
'org.browser.owl': 'Owl Browser'
|
||||
'com.orbitum.browser': 'Orbitum'
|
||||
'com.appsverse.photon': 'Photon'
|
||||
'fr.agrange.bbbrowser': 'Keyboard Browser'
|
||||
'com.stealthmobile.browser': 'Stealth Browser'
|
||||
'com.wcd.talkto': 'TalkTo'
|
||||
'com.foxylab.airfox': 'Proxynet'
|
||||
'io.github.mthli.goodbrowser': 'Good Browser'
|
||||
'app.proxyiumbrowser.android': 'Proxyium'
|
||||
'com.vuhuv': 'Vuhuv'
|
||||
'com.fast.fireBrowser': 'Fire Browser'
|
||||
'acr.browser.lightning': 'Lightning Browser Plus'
|
||||
'birapp.dark.web': 'Dark Web'
|
||||
'birapp.dark.web.private': 'Dark Web Private'
|
||||
'com.hihonor.baidu.browser': 'HONOR Browser'
|
||||
'com.browser.pintar.vpn': 'Pintar Browser'
|
||||
'com.ucimini.internetbrowser': 'Browser Mini'
|
||||
'de.baumann.browser': 'FOSS Browser'
|
||||
'com.oversea.mybrowser': 'Peach Browser'
|
||||
'com.apptec360.android.browser': 'AppTec Secure Browser'
|
||||
'com.ojr.browser.anti.blokir': 'OJR Browser'
|
||||
'com.vworldc.tusk': 'TUSK'
|
||||
'com.stoutner.privacybrowser.standard': 'Privacy Browser'
|
||||
'com.techlastudio.proxyfoxbrowser': 'ProxyFox'
|
||||
'com.vielianztlabs.browser': 'ProxyMax'
|
||||
'com.keepsolid.privatebrowser': 'KeepSolid Browser'
|
||||
'com.onionsearchengine.focus': 'ONIONBrowser'
|
||||
'com.best.quick.browser': 'Ai Browser'
|
||||
'miada.tv.webbrowser': 'Internet Webbrowser'
|
||||
'com.kaweapp.webexplorer': 'Web Explorer'
|
||||
'com.halo.browser': 'Halo Browser'
|
||||
'com.mmbox.xbrowser': 'MMBOX XBrowser'
|
||||
'com.tvwebbrowser.v22': 'TV-Browser Internet'
|
||||
'com.tvwebbrowserpaid.v22': 'TV-Browser Internet'
|
||||
'xnx.browser.browse.Xnxnewx': 'XnBrowse'
|
||||
'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'
|
||||
'company.thebrowser.arc': 'Arc Search'
|
||||
'com.android.webview': 'Chrome Webview'
|
||||
@@ -0,0 +1,701 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
- regex: 'PhantomJS(?:/(\d+[.\d]+))?'
|
||||
name: 'PhantomJS'
|
||||
version: '$1'
|
||||
url: 'https://phantomjs.org/'
|
||||
|
||||
- regex: 'IPinfoClient/.*/(\d+[.\d]+)'
|
||||
name: 'IPinfo'
|
||||
version: '$1'
|
||||
url: 'https://github.com/ipinfo'
|
||||
|
||||
- regex: 'kiwi-tcms/(\d+[.\d]+)'
|
||||
name: 'Kiwi TCMS'
|
||||
version: '$1'
|
||||
url: 'https://kiwitcms.org'
|
||||
|
||||
- regex: 'tcms-api/(\d+[.\d]+)'
|
||||
name: 'Kiwi TCMS API'
|
||||
version: '$1'
|
||||
url: 'https://kiwitcms.org'
|
||||
|
||||
- regex: 'Fuzz Faster U Fool v(\d+[.\d]+)'
|
||||
name: 'FFUF'
|
||||
version: '$1'
|
||||
url: 'https://github.com/ffuf/ffuf'
|
||||
|
||||
- regex: 'Slim Framework'
|
||||
name: 'Slim Framework'
|
||||
version: ''
|
||||
url: 'https://www.slimframework.com/'
|
||||
|
||||
- regex: 'msray-plus'
|
||||
name: 'Msray-Plus'
|
||||
version: ''
|
||||
url: 'https://github.com/super-l/msray'
|
||||
|
||||
- regex: 'HTMLParser(?:/(\d+[.\d]+))?'
|
||||
name: 'HTML Parser'
|
||||
version: '$1'
|
||||
url: 'https://htmlparser.sourceforge.net/'
|
||||
|
||||
# got - a nodejs library
|
||||
- regex: '^got(?:/(\d+\.[.\d]+))? \('
|
||||
name: 'got'
|
||||
version: '$1'
|
||||
url: 'https://github.com/sindresorhus/got'
|
||||
|
||||
# Typhoeus
|
||||
- regex: 'Typhoeus'
|
||||
name: 'Typhoeus'
|
||||
version: ''
|
||||
url: 'https://github.com/typhoeus/typhoeus'
|
||||
|
||||
# req
|
||||
- regex: 'req/v([.\d]+)'
|
||||
name: 'req'
|
||||
version: '$1'
|
||||
url: 'https://github.com/imroc/req'
|
||||
|
||||
# quic-go
|
||||
- regex: 'quic-go[ -]HTTP/3'
|
||||
name: 'quic-go'
|
||||
version: ''
|
||||
url: 'https://github.com/lucas-clemente/quic-go'
|
||||
|
||||
# Azure Data Factory
|
||||
- regex: 'azure-data-factory(?:/(\d+[.\d]+))?'
|
||||
name: 'Azure Data Factory'
|
||||
version: '$1'
|
||||
url: 'https://azure.microsoft.com/en-us/products/data-factory/'
|
||||
|
||||
# Dart
|
||||
- regex: 'Dart/(\d+[.\d]+)'
|
||||
name: 'Dart'
|
||||
version: '$1'
|
||||
url: 'https://dart.dev/'
|
||||
|
||||
# r-curl
|
||||
- regex: 'r-curl(?:/(\d+[.\d]+))?'
|
||||
name: 'r-curl'
|
||||
version: '$1'
|
||||
url: 'https://github.com/jeroen/curl'
|
||||
|
||||
# HTTPX
|
||||
- regex: 'python-httpx(?:/(\d+[.\d]+))?'
|
||||
name: 'HTTPX'
|
||||
version: '$1'
|
||||
url: 'https://www.python-httpx.org/'
|
||||
|
||||
# fasthttp
|
||||
- regex: 'fasthttp(?:/(\d+[.\d]+))?'
|
||||
name: 'fasthttp'
|
||||
version: '$1'
|
||||
url: 'https://github.com/valyala/fasthttp'
|
||||
|
||||
# GeoIP Update
|
||||
- regex: 'geoipupdate(?:/(\d+[.\d]+))?'
|
||||
name: 'GeoIP Update'
|
||||
version: '$1'
|
||||
url: 'https://github.com/maxmind/geoipupdate'
|
||||
|
||||
# PHP cURL Class
|
||||
- regex: 'PHP-Curl-Class(?:/(\d+[.\d]+))?'
|
||||
name: 'PHP cURL Class'
|
||||
version: '$1'
|
||||
url: 'https://github.com/php-curl-class/php-curl-class'
|
||||
|
||||
# cPanel HTTP Client
|
||||
- regex: 'Cpanel-HTTP-Client(?:/(\d+[.\d]+))?'
|
||||
name: 'cPanel HTTP Client'
|
||||
version: '$1'
|
||||
url: 'https://www.cpanel.net/'
|
||||
|
||||
# AnyEvent HTTP
|
||||
- regex: 'AnyEvent-HTTP(?:/(\d+[.\d]+))?'
|
||||
name: 'AnyEvent HTTP'
|
||||
version: '$1'
|
||||
url: 'http://software.schmorp.de/pkg/AnyEvent'
|
||||
|
||||
# SlimerJS
|
||||
- regex: 'SlimerJS/(\d+[.\d]+)'
|
||||
name: 'SlimerJS'
|
||||
version: '$1'
|
||||
url: 'https://www.slimerjs.org/'
|
||||
|
||||
# Jaunt
|
||||
- regex: 'Jaunt/(\d+[.\d]+)'
|
||||
name: 'Jaunt'
|
||||
version: '$1'
|
||||
url: 'https://jaunt-api.com/'
|
||||
|
||||
# Cypress
|
||||
- regex: 'Cypress/(\d+[.\d]+)'
|
||||
name: 'Cypress'
|
||||
version: '$1'
|
||||
url: 'https://github.com/cypress-io/cypress'
|
||||
|
||||
- regex: 'Wget(?:/(\d+[.\d]+))?'
|
||||
name: 'Wget'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Guzzle(?:Http)?(?:/(\d+[.\d]+))?'
|
||||
name: 'Guzzle (PHP HTTP Client)'
|
||||
version: '$1'
|
||||
|
||||
# symphony php http client
|
||||
- regex: '^Symfony HttpClient/'
|
||||
name: 'Symfony'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:lib)?curl(?:/(\d+[.\d]+))?'
|
||||
name: 'curl'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'python-requests(?:/(\d+[.\d]+))?'
|
||||
name: 'Python Requests'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Python-httplib2(?:/(\d+[.\d]+))?'
|
||||
name: 'httplib2'
|
||||
version: '$1'
|
||||
url: 'https://pypi.org/project/httplib2/'
|
||||
|
||||
- regex: 'Python-urllib3?(?:/?(\d+[.\d]+))?'
|
||||
name: 'Python urllib'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Apache-HttpClient(?:/?(\d+[.\d]+))?'
|
||||
name: 'Apache HTTP Client'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Java-http-client(?:/?(\d+[.\d]+))?'
|
||||
name: 'Java HTTP Client'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Java/?(\d+[.\d]+)'
|
||||
name: 'Java'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:perlclient|libwww-perl)(?:/?(\d+[.\d]+))?'
|
||||
name: 'Perl'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'grpc-java-okhttp/([\d.]+)'
|
||||
name: 'gRPC-Java'
|
||||
version: '$1'
|
||||
url: 'https://github.com/grpc/grpc-java'
|
||||
|
||||
# java library
|
||||
- regex: '(?:okhttp|network-okhttp3)/([\d.]+)'
|
||||
name: 'OkHttp'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'okhttp3-([\d.]+)'
|
||||
name: 'OkHttp'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'HTTP_Request2(?:/(\d+[.\d]+))?'
|
||||
name: 'HTTP_Request2'
|
||||
version: '$1'
|
||||
url: 'https://pear.php.net/package/http_request2'
|
||||
|
||||
- regex: 'Mechanize(?:/(\d+[.\d]+))?'
|
||||
name: 'Mechanize'
|
||||
version: '$1'
|
||||
url: 'https://github.com/sparklemotion/mechanize'
|
||||
|
||||
- regex: 'aiohttp(?:/(\d+[.\d]+))?'
|
||||
name: 'aiohttp'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Google-HTTP-Java-Client(?:/(\d+[\.\w-]+))?'
|
||||
name: 'Google HTTP Java Client'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'WWW-Mechanize(?:/(\d+[.\d]+))?'
|
||||
name: 'WWW-Mechanize'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Faraday(?: v(\d+[.\d]+))?'
|
||||
name: 'Faraday'
|
||||
version: '$1'
|
||||
url: 'https://github.com/lostisland/faraday'
|
||||
|
||||
- regex: '(?:Go-http-client|^Go )/?(?:(\d+[.\d]+))?(?: package http)?'
|
||||
name: 'Go-http-client'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'urlgrabber(?:/(\d+[.\d]+))?'
|
||||
name: 'urlgrabber (yum)'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'libdnf(?:/(\d+[.\d]+))?'
|
||||
name: 'libdnf'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'HTTPie(?:/(\d+[.\d]+))?'
|
||||
name: 'HTTPie'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'rest-client/(\d+\.[.\d]+) .*ruby'
|
||||
name: 'REST Client for Ruby'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'RestSharp/(\d+[.\d]+)'
|
||||
name: 'RestSharp'
|
||||
version: '$1'
|
||||
url: 'https://github.com/restsharp/RestSharp'
|
||||
|
||||
- regex: 'scalaj-http/(\d+[.\d]+)'
|
||||
name: 'ScalaJ HTTP'
|
||||
version: '$1'
|
||||
url: 'https://github.com/scalaj/scalaj-http'
|
||||
|
||||
- regex: 'REST::Client/(\d+)'
|
||||
name: 'Perl REST::Client'
|
||||
version: '$1'
|
||||
url: 'https://metacpan.org/pod/REST::Client'
|
||||
|
||||
- regex: 'node-fetch/?(\d+[.\d]+)?'
|
||||
name: 'Node Fetch'
|
||||
version: '$1'
|
||||
url: 'https://github.com/node-fetch/node-fetch'
|
||||
|
||||
- regex: 'electron-fetch/?(\d+[.\d]+)?'
|
||||
name: 'Electron Fetch'
|
||||
version: '$1'
|
||||
url: 'https://github.com/arantes555/electron-fetch'
|
||||
|
||||
- regex: 'ReactorNetty/(\d+[.\d]+)'
|
||||
name: 'ReactorNetty'
|
||||
version: '$1'
|
||||
url: 'https://github.com/reactor/reactor-netty'
|
||||
|
||||
- regex: 'PostmanRuntime(?:/(\d+[.\d]+))?'
|
||||
name: 'Postman Desktop'
|
||||
version: '$1'
|
||||
url: 'https://github.com/postmanlabs/postman-runtime'
|
||||
|
||||
- regex: 'insomnia(?:/(\d+[.\d]+))?'
|
||||
name: 'Insomnia REST Client'
|
||||
version: '$1'
|
||||
url: 'https://insomnia.rest'
|
||||
|
||||
- regex: 'Jakarta Commons-HttpClient/([.\d]+)'
|
||||
name: 'Jakarta Commons HttpClient'
|
||||
version: '$1'
|
||||
url: 'https://hc.apache.org/httpclient-3.x'
|
||||
|
||||
- regex: 'WinHttp\.WinHttpRequest.+([.\d]+)'
|
||||
name: 'WinHttp WinHttpRequest'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'WinHTTP'
|
||||
name: 'Windows HTTP'
|
||||
version: ''
|
||||
|
||||
# THTTPClient in delphi 10+ default useragent
|
||||
- regex: 'Embarcadero URI Client/([.\d]+)'
|
||||
name: 'Embarcadero URI Client'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Mikrotik/([.\d]+)'
|
||||
name: 'Mikrotik Fetch'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'GRequests(?:/(\d+[.\d]+))?'
|
||||
name: 'GRequests'
|
||||
version: '$1'
|
||||
|
||||
# https://doc.akka.io/
|
||||
- regex: 'akka-http/([.\d]+)'
|
||||
name: 'Akka HTTP'
|
||||
version: '$1'
|
||||
|
||||
# this added need added tests
|
||||
- regex: 'aria2(?:/(\d+[.\d]+))?'
|
||||
name: 'Aria2'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:BTWebClient/|^uTorrent/)'
|
||||
name: 'uTorrent'
|
||||
version: ''
|
||||
|
||||
- regex: 'gvfs/(?:(\d+[.\d]+))?'
|
||||
name: 'gvfs'
|
||||
version: '$1'
|
||||
|
||||
# https://openwrt.org/packages/pkgdata/uclient-fetch
|
||||
- regex: 'uclient-fetch'
|
||||
name: 'uclient-fetch'
|
||||
version: ''
|
||||
|
||||
# https://github.com/microsoft/cpprestsdk
|
||||
- regex: 'cpprestsdk/([.\d]+)'
|
||||
name: 'C++ REST SDK'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'lua-resty-http/([.\d]+).+ngx_'
|
||||
name: 'LUA OpenResty NGINX'
|
||||
version: '$1'
|
||||
|
||||
# https://github.com/Kong/unirest-java
|
||||
- regex: 'unirest-java/([.\d]+)'
|
||||
name: 'Unirest for Java'
|
||||
version: '$1'
|
||||
|
||||
# jsdom (https://github.com/jsdom/jsdom)
|
||||
- regex: 'jsdom/([.\d]+)'
|
||||
name: 'jsdom'
|
||||
version: '$1'
|
||||
|
||||
# hackney (https://github.com/benoitc/hackney) (elixir)
|
||||
- regex: 'hackney/([.\d]+)'
|
||||
name: 'hackney'
|
||||
version: '$1'
|
||||
|
||||
# Resty (https://github.com/go-resty/resty)
|
||||
- regex: 'go-resty/([.\d]+)'
|
||||
name: 'Resty'
|
||||
version: '$1'
|
||||
|
||||
# Pa11y (https://pa11y.org/)
|
||||
- regex: 'pa11y/([.\d]+)'
|
||||
name: 'Pa11y'
|
||||
version: '$1'
|
||||
|
||||
# Ultimate Sitemap Parser (https://github.com/mediacloud/ultimate-sitemap-parser)
|
||||
- regex: 'ultimate_sitemap_parser/([.\d]+)'
|
||||
name: 'Ultimate Sitemap Parser'
|
||||
version: '$1'
|
||||
|
||||
# Container-related useragents
|
||||
|
||||
# Artifactory (https://jfrog.com/de/artifactory/)
|
||||
- regex: 'Artifactory/([.\d]+)'
|
||||
name: 'Artifactory'
|
||||
version: '$1'
|
||||
|
||||
# Open build service (https://build.opensuse.org/)
|
||||
- regex: 'BSRPC ([.\d]+)'
|
||||
name: 'Open Build Service'
|
||||
version: '$1'
|
||||
|
||||
# Buildah (https://github.com/containers/buildah)
|
||||
- regex: 'Buildah/([.\d]+)'
|
||||
name: 'Buildah'
|
||||
version: '$1'
|
||||
|
||||
# Buildkit (https://github.com/moby/buildkit)
|
||||
- regex: 'buildkit/v?([.\d]+)'
|
||||
name: 'BuildKit'
|
||||
version: '$1'
|
||||
|
||||
# containerd (https://github.com/containerd/containerd)
|
||||
- regex: 'containerd/v?([.\d]+)'
|
||||
name: 'Containerd'
|
||||
version: '$1'
|
||||
|
||||
# containers (https://github.com/containers/image)
|
||||
- regex: 'containers/([.\d]+)'
|
||||
name: 'containers'
|
||||
version: '$1'
|
||||
|
||||
# cri-o (https://github.com/cri-o/cri-)o
|
||||
- regex: 'cri-o/([.\d]+)'
|
||||
name: 'cri-o'
|
||||
version: '$1'
|
||||
|
||||
# docker (https://github.com/moby/moby)
|
||||
- regex: 'docker/([.\d]+)'
|
||||
name: 'docker'
|
||||
version: '$1'
|
||||
|
||||
# gcr (https://github.com/google/go-containerregistry)
|
||||
- regex: 'go-containerregistry/v([.\d]+)'
|
||||
name: 'go-container registry'
|
||||
version: '$1'
|
||||
|
||||
# libpod (https://github.com/dankohn/libpod)
|
||||
- regex: 'libpod/([.\d]+)'
|
||||
name: 'libpod'
|
||||
version: '$1'
|
||||
|
||||
# skopeo (https://github.com/containers/skopeo)
|
||||
- regex: 'skopeo/([.\d]+)'
|
||||
name: 'Skopeo'
|
||||
version: '$1'
|
||||
|
||||
# helm (https://github.com/helm/helm)
|
||||
- regex: 'Helm/([.\d]+)'
|
||||
name: 'Helm'
|
||||
version: '$1'
|
||||
|
||||
# harbor client (https://goharbor.io/)
|
||||
- regex: 'harbor-registry-client'
|
||||
name: 'Harbor registry client'
|
||||
version: ''
|
||||
|
||||
# axios http (https://axios-http.com/)
|
||||
- regex: 'axios(?:/?(\d+[.\d]+))?'
|
||||
name: Axios
|
||||
version: '$1'
|
||||
|
||||
# Classier solution for file uploads for Rails, Sinatra and other Ruby web frameworks
|
||||
- regex: '^CarrierWave/(\d+\.[.\d]+)'
|
||||
name: 'CarrierWave'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^Deno/(\d+\.[.\d]+)'
|
||||
name: 'Deno'
|
||||
version: '$1'
|
||||
|
||||
# Streaming downloads using net/http, http.rb, HTTPX or wget (ruby)
|
||||
- regex: '^Down/(\d+\.[.\d]+)'
|
||||
name: 'Down'
|
||||
version: '$1'
|
||||
|
||||
# various programs can use this, like vlc, but the underlying lib is ffmpeg
|
||||
- regex: '^Lavf/'
|
||||
name: 'ffmpeg'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^FileDownloader/(\d+\.[.\d]+)'
|
||||
name: 'FileDownloader'
|
||||
version: '$1'
|
||||
|
||||
# Allows managing large files with git, without storing the file contents in git
|
||||
- regex: '^git-annex/(\d+\.[.\d]+)'
|
||||
name: 'git-annex'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^GStreamer(?: souphttpsrc)[ /](\d+\.[.\d]+)?'
|
||||
name: 'GStreamer'
|
||||
version: '$1'
|
||||
|
||||
# A small, simple, correct HTTP/1.1 client (Perl)
|
||||
- regex: '^HTTP-Tiny/(\d+\.[.\d]+)'
|
||||
name: 'HTTP:Tiny'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'KaiOS Downloader'
|
||||
name: 'KaiOS Downloader'
|
||||
version: ''
|
||||
|
||||
# HTTP client/server library for GNOME
|
||||
- regex: '^libsoup/(\d+\.[.\d]+)'
|
||||
name: 'libsoup'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^Android\.LVLDM$'
|
||||
name: 'Android License Verification Library'
|
||||
version: '$1'
|
||||
|
||||
# A file downloader library for Android with pause and resume support
|
||||
- regex: '^PRDownloader$'
|
||||
name: 'PRDownloader'
|
||||
version: ''
|
||||
|
||||
# a rust http library
|
||||
- regex: '^reqwest/(\d+\.[.\d]+)'
|
||||
name: 'reqwest'
|
||||
version: '$1'
|
||||
|
||||
# lua http library
|
||||
- regex: '^resty-requests'
|
||||
name: 'resty-requests'
|
||||
version: ''
|
||||
|
||||
# ruby core lib http download
|
||||
- regex: '^Ruby'
|
||||
name: 'ruby'
|
||||
version: ''
|
||||
|
||||
# SFSafariViewController, some safari service
|
||||
- regex: '^SafariViewService/(\d+\.[.\d]+)'
|
||||
name: 'Safari View Service'
|
||||
version: '$1'
|
||||
|
||||
# a nodejs lib
|
||||
- regex: '^undici$'
|
||||
name: 'undici'
|
||||
version: ''
|
||||
|
||||
# URL, an emacs plugin
|
||||
- regex: '^URL/Emacs Emacs/(\d+\.[.\d]+)'
|
||||
name: 'Emacs'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^FDM[ /]([\d.]+)'
|
||||
name: 'Free Download Manager'
|
||||
version: '$1'
|
||||
|
||||
# 'https://github.com/lingochamp/okdownload'
|
||||
- regex: 'OkDownload/([\d.]+)'
|
||||
name: 'OKDownload Library'
|
||||
version: '$1'
|
||||
|
||||
# podcast host https://libsyn.com (probably an importer)
|
||||
- regex: '^Libsyn4-?(?:peek|download)$'
|
||||
name: 'Libsyn'
|
||||
version: ''
|
||||
|
||||
# any ios application that uses apple core media but doesn't set its user
|
||||
# agent will default to this, always with 1.0.0 version.
|
||||
# there was a time when (not even that long ago) apple didn't let you set
|
||||
# a user agent so a ton of random applications still identify themselves this way.
|
||||
- regex: 'AppleCoreMedia/1\.0\.0'
|
||||
name: 'iOS Application'
|
||||
version: ''
|
||||
|
||||
- regex: 'cpp-httplib(?:/(\d+[.\d]+))?'
|
||||
name: 'cpp-httplib'
|
||||
version: '$1'
|
||||
url: 'https://github.com/yhirose/cpp-httplib'
|
||||
|
||||
- regex: 'Definitely-Not-Requests'
|
||||
name: 'Requests'
|
||||
version: ''
|
||||
url: 'https://github.com/psf/requests'
|
||||
|
||||
- regex: 'Stealer ([\d.]+)'
|
||||
name: 'Stealer'
|
||||
version: '$1'
|
||||
url: 'https://github.com/hotrush/stealer/'
|
||||
|
||||
- regex: 'Mandrill-PHP(?:/(\d+[.\d]+))?'
|
||||
name: 'Mandrill PHP'
|
||||
version: '$1'
|
||||
url: 'https://bitbucket.org/mailchimp/mandrill-api-php/src/master/'
|
||||
|
||||
- regex: '^Podgrab'
|
||||
name: 'Podgrab'
|
||||
version: ''
|
||||
url: 'https://github.com/akhilrex/podgrab'
|
||||
|
||||
- regex: '^Podcast Provider.*?Radio Downloader ([\d.]+)'
|
||||
name: 'Radio Downloader'
|
||||
version: '$1'
|
||||
url: 'https://nerdoftheherd.com/tools/radiodld/'
|
||||
|
||||
- regex: '^ESP32 HTTP Client/([\d.]+)'
|
||||
name: 'ESP32 HTTP Client'
|
||||
version: '$1'
|
||||
url: 'https://github.com/espressif/arduino-esp32'
|
||||
|
||||
- regex: 'babashka\.http-client(?:/(\d+[.\d]+))?'
|
||||
name: 'Babashka HTTP Client'
|
||||
version: '$1'
|
||||
url: 'https://github.com/babashka/http-client'
|
||||
|
||||
- regex: 'http\.rb(?:/(\d+[.\d]+))?'
|
||||
name: 'http.rb'
|
||||
version: '$1'
|
||||
url: 'https://github.com/httprb/http'
|
||||
|
||||
- regex: 'node-superagent(?:/(\d+[.\d]+))?'
|
||||
name: 'superagent'
|
||||
version: '$1'
|
||||
url: 'https://github.com/ladjs/superagent'
|
||||
|
||||
- regex: 'CakePHP'
|
||||
name: 'CakePHP'
|
||||
version: ''
|
||||
url: 'https://www.cakephp.org/'
|
||||
|
||||
- regex: 'request\.js'
|
||||
name: 'request'
|
||||
version: ''
|
||||
url: 'https://github.com/request/request'
|
||||
|
||||
- regex: 'qbhttp(?:/(\d+[.\d]+))?'
|
||||
name: 'QbHttp'
|
||||
version: '$1'
|
||||
url: 'https://github.com/OpenQb/QbHttp'
|
||||
|
||||
- regex: 'httprs(?:/(\d+[.\d]+))?'
|
||||
name: 'httprs'
|
||||
version: '$1'
|
||||
url: 'https://github.com/http-server-rs/http-server'
|
||||
|
||||
- regex: 'Boto3(?:/(\d+[.\d]+))?'
|
||||
name: 'Boto3'
|
||||
version: '$1'
|
||||
url: 'https://github.com/boto/boto3'
|
||||
|
||||
- regex: 'Python-xmlrpc(?:/(\d+[.\d]+))?'
|
||||
name: 'XML-RPC'
|
||||
version: '$1'
|
||||
url: 'https://docs.python.org/3/library/xmlrpc.html'
|
||||
|
||||
- regex: 'ICAP-Client-Library(?:/(\d+[.\d]+))?'
|
||||
name: 'ICAP Client'
|
||||
version: '$1'
|
||||
url: 'https://github.com/Peoplecantfly/icapserver'
|
||||
|
||||
- regex: 'Cygwin-Setup(?:/(\d+[.\d]+))?'
|
||||
name: 'Cygwin'
|
||||
version: '$1'
|
||||
url: 'https://www.cygwin.com/'
|
||||
|
||||
- regex: 'azsdk-python-storage-blob(?:/(\d+[.\d]+))?'
|
||||
name: 'Azure Blob Storage'
|
||||
version: '$1'
|
||||
url: 'https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-python'
|
||||
|
||||
- regex: 'trafilatura(?:/(\d+[.\d]+))?'
|
||||
name: 'trafilatura'
|
||||
version: '$1'
|
||||
url: 'https://github.com/adbar/trafilatura'
|
||||
|
||||
- regex: 'sqlmap(?:/(\d+[.\d]+))?'
|
||||
name: 'sqlmap'
|
||||
version: '$1'
|
||||
url: 'https://sqlmap.org/'
|
||||
|
||||
- regex: 'vimeo\.php(?: (\d+[.\d]+))?'
|
||||
name: 'vimeo.php'
|
||||
version: '$1'
|
||||
url: 'https://github.com/vimeo/vimeo.php'
|
||||
|
||||
- regex: '^PHP/?(\d+[.\d]+)'
|
||||
name: 'PHP'
|
||||
version: '$1'
|
||||
url: ''
|
||||
|
||||
- regex: 'go-network-v(\d+[.\d]+)'
|
||||
name: 'go-network'
|
||||
version: '$1'
|
||||
url: ''
|
||||
|
||||
- regex: 'Bun/(\d+\.[.\d]+)'
|
||||
name: 'Bun'
|
||||
version: '$1'
|
||||
url: 'https://bun.sh/'
|
||||
|
||||
- regex: 'Apidog/(\d+\.[.\d]+)'
|
||||
name: 'Apidog'
|
||||
version: '$1'
|
||||
url: 'https://apidog.com/'
|
||||
|
||||
- regex: 'webchk v(\d+\.[.\d]+)'
|
||||
name: 'webchk'
|
||||
version: '$1'
|
||||
url: 'https://github.com/amgedr/webchk'
|
||||
|
||||
- regex: 'MatomoTrackerSDK/(\d+[.\d]+)'
|
||||
name: 'MatomoTracker'
|
||||
version: '$1'
|
||||
url: 'https://github.com/matomo-org/matomo-sdk-ios'
|
||||
|
||||
- regex: 'libHTTP/(\d+[.\d]+)'
|
||||
name: 'LibHTTP'
|
||||
version: '$1'
|
||||
url: 'https://www.libhttp.org/'
|
||||
@@ -0,0 +1,183 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
- regex: 'Audacious(?:[ /]([\d.]+))?'
|
||||
name: 'Audacious'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:AlexaMediaPlayer/|^AlexaMediaPlayer/|^Echo/|Amazon;Echo(?:_|;)|^AlexaService/|^Alexa Mobile Voice/)([a-z\d]+\.[a-z.\d]+)?'
|
||||
name: 'Alexa'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Banshee(?:[ /]([\d.]+))?'
|
||||
name: 'Banshee'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Boxee(?:[ /]([\d.]+))?'
|
||||
name: 'Boxee'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Clementine(?:[ /]([\d.]+))?'
|
||||
name: 'Clementine'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Deezer(?:/([\d.]+))?'
|
||||
name: 'Deezer'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'iTunes(?:-iPhone|-iPad)?(?:/([\d.]+))?'
|
||||
name: 'iTunes'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'FlyCast(?:/([\d.]+))?'
|
||||
name: 'FlyCast'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'foobar2000(?:/([\d.]+))?'
|
||||
name: 'Foobar2000'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'MediaMonkey(?:[ /](\d+[.\d]+))?'
|
||||
name: 'MediaMonkey'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Miro(?:/(\d+[.\d]+))?'
|
||||
name: 'Miro'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'NexPlayer(?:/(\d+[.\d]+))?'
|
||||
name: 'NexPlayer'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Nightingale(?:/([\d.]+))?'
|
||||
name: 'Nightingale'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'QuickTime(?:(?:(?:.+qtver=)|(?:(?: E-)?[\./]))([\d.]+))?'
|
||||
name: 'QuickTime'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Songbird(?:/([\d.]+))?'
|
||||
name: 'Songbird'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'SubStream(?:/([\d.]+))?'
|
||||
name: 'SubStream'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Sonos/([\d.]+)?'
|
||||
name: 'SONOS'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:Lib)?VLC(?:/([\d.]+))?'
|
||||
name: 'VLC'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Winamp(?:MPEG)?(?:/(\d+[.\d]+))?'
|
||||
name: 'Winamp'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'J\. River Internet Reader/(\d+\.[.\d]+)'
|
||||
name: 'JRiver Media Center'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:Windows-Media-Player|NSPlayer)(?:/(\d+[.\d]+))?'
|
||||
name: 'Windows Media Player'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'XBMC(?:/([\d.]+))?'
|
||||
name: 'XBMC'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Kodi(?:/([\d.]+))?'
|
||||
name: 'Kodi'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'stagefright(?:/([\d.]+))?'
|
||||
name: 'Stagefright'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'GoogleChirp(?:/(\d+[.\d]+))?'
|
||||
name: 'Google Podcasts'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Music Player Daemon (?:(\d+[.\d]+))?'
|
||||
name: 'Music Player Daemon'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'mpv (?:(\d+[.\d]+))?'
|
||||
name: 'mpv'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'HTC Streaming Player'
|
||||
name: 'HTC Streaming Player'
|
||||
version: ''
|
||||
|
||||
- regex: 'MediaGo(?:/([\w\.]+))?'
|
||||
name: 'Sony Media Go'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'MPlayer[ /](\d+\.[\d.])'
|
||||
name: 'MPlayer'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Downcast/(\d+\.[\d.]+)?'
|
||||
name: 'Downcast'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^Juice/([\d.]+)'
|
||||
name: 'Juice'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'just_audio/(\d+\.[.\d]+)'
|
||||
name: 'Just Audio'
|
||||
version: '$1'
|
||||
|
||||
# https://apps.kde.org/kasts/ ?
|
||||
- regex: '^Kasts/(\d+\.[.\d]+)'
|
||||
name: 'Kasts'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'MixerBox(?:%20Pro)?/([.\d]+)'
|
||||
name: 'MixerBox'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^MusicBee(?:/(\d+\.[.\d]+))?'
|
||||
name: 'MusicBee'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^amarok/(\d+\.[.\d]+)'
|
||||
name: 'Amarok'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Hubhopper/([\d.]+)'
|
||||
name: 'Hubhopper'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'StudioDisplay/(\d+\.[\d.]+)'
|
||||
name: 'StudioDisplay'
|
||||
version: '$1'
|
||||
|
||||
# JHelioviewer (https://www.jhelioviewer.org/)
|
||||
- regex: 'JHV/SWHV-([.\d+]+)'
|
||||
name: 'JHelioviewer'
|
||||
version: '$1'
|
||||
|
||||
# Xtream Player (https://play.google.com/store/apps/details?id=com.devcoder.iptvxtreamplayer)
|
||||
- regex: 'com\.devcoder\.iptvxtreamplayer'
|
||||
name: 'Xtream Player'
|
||||
version: ''
|
||||
|
||||
# DIGA (https://av.jpn.support.panasonic.com/support/global/cs/bd/diga_player/2013/android/index.html)
|
||||
- regex: 'DIGA(?:Plus/(\d+\.[.\d]+))?'
|
||||
name: 'DIGA'
|
||||
version: '$1'
|
||||
|
||||
# YouView (https://www.youview.com/)
|
||||
- regex: 'YouView(?:HTML/(\d+\.[.\d]+))?'
|
||||
name: 'YouView'
|
||||
version: '$1'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,167 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
- regex: 'Outlook-Express(?:/(\d+[.\d]+))?'
|
||||
name: 'Outlook Express'
|
||||
version: '$1'
|
||||
|
||||
# Outlook https://apps.apple.com/ru/app/microsoft-outlook/id951937596
|
||||
- regex: '^Outlook-iOS/(?:.+\((\d+[.\d]+)\)$)?'
|
||||
name: 'Microsoft Outlook'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:(?:Microsoft )?Outlook|MacOutlook)(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Microsoft Outlook'
|
||||
version: '$1'
|
||||
|
||||
# Default Mail Client for Windows
|
||||
- regex: 'WindowsMail(?:/(\d+[.\d]+))'
|
||||
name: 'Windows Mail'
|
||||
version: '$1'
|
||||
|
||||
- regex: '(?:Thunderbird|Icedove|Shredder)(?:/(\d+[.\d]+))?'
|
||||
name: 'Thunderbird'
|
||||
version: '$1'
|
||||
|
||||
# Spicebird (http://www.spicebird.org/)
|
||||
- regex: 'Spicebird/(\d+\.[.\d]+)'
|
||||
name: 'Spicebird'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Airmail(?: (\d+[.\d]+))?'
|
||||
name: 'Airmail'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Lotus-Notes(?:/(\d+[.\d]+))?'
|
||||
name: 'Lotus Notes'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Barca(?:Pro)?(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Barca'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'Postbox(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'Postbox'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'MailBar(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'MailBar'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'The Bat!(?: Voyager)?(?:[/ ](\d+[.\d]+))?'
|
||||
name: 'The Bat!'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'DAVdroid(?:/(\d+[.\d]+))?'
|
||||
name: 'DAVdroid'
|
||||
version: '$1'
|
||||
|
||||
# SeaMonkey
|
||||
- regex: '(?:SeaMonkey|Iceape)(?:/(\d+[.\d]+))?'
|
||||
name: 'SeaMonkey'
|
||||
version: '$1'
|
||||
|
||||
# Live5ch
|
||||
- regex: 'Live5ch/(\d+[.\d]+)'
|
||||
name: 'Live5ch'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'JaneView/'
|
||||
name: 'JaneView'
|
||||
version: ''
|
||||
|
||||
- regex: 'BathyScaphe/'
|
||||
name: 'BathyScaphe'
|
||||
version: ''
|
||||
|
||||
# Raindrop.io (https://raindrop.io/)
|
||||
- regex: 'Raindrop\.io/(\d+[.\d]+)'
|
||||
name: 'Raindrop.io'
|
||||
version: '$1'
|
||||
|
||||
# Franz (https://meetfranz.com/)
|
||||
- regex: 'Franz/(\d+[.\d]+)'
|
||||
name: 'Franz'
|
||||
version: '$1'
|
||||
|
||||
# Mailspring (https://www.electronjs.org/apps/mailspring)
|
||||
- regex: 'Mailspring/(\d+[.\d]+)'
|
||||
name: 'Mailspring'
|
||||
version: '$1'
|
||||
|
||||
# Notion (https://www.notion.so/)
|
||||
- regex: 'Notion/(\d+[.\d]+)'
|
||||
name: 'Notion'
|
||||
version: '$1'
|
||||
|
||||
# Basecamp (https://basecamp.com/)
|
||||
- regex: 'Basecamp[0-9]/?(\d+[.\d]+)'
|
||||
name: 'Basecamp'
|
||||
version: '$1'
|
||||
|
||||
# Evernote (https://evernote.com/)
|
||||
- regex: 'Evernote/?(\d+[.\d]+)'
|
||||
name: 'Evernote'
|
||||
version: '$1'
|
||||
|
||||
# Rambox Pro (https://rambox.app/)
|
||||
- regex: 'ramboxpro/(\d+\.[.\d]+)?'
|
||||
name: 'Rambox Pro'
|
||||
version: '$1'
|
||||
|
||||
# Mailbird (https://www.getmailbird.com/)
|
||||
- regex: 'Mailbird/(\d+\.[.\d]+)/'
|
||||
name: 'Mailbird'
|
||||
version: '$1'
|
||||
|
||||
# Yahoo Mail (https://apps.apple.com/us/app/yahoo-mail-organised-email/id577586159)
|
||||
- regex: 'Yahoo%20Mail'
|
||||
name: 'Yahoo Mail'
|
||||
version: ''
|
||||
|
||||
# Yahoo! Mail (https://play.google.com/store/apps/details?id=jp.co.yahoo.android.ymail | https://apps.apple.com/jp/app/yahoo-%E3%83%A1%E3%83%BC%E3%83%AB/id669931877)
|
||||
- regex: 'jp.co.yahoo.ymail/([\d.]+)'
|
||||
name: 'Yahoo! Mail'
|
||||
version: '$1'
|
||||
|
||||
# eM Client (https://emclient.com/)
|
||||
- regex: 'eM ?Client/(\d+\.[.\d]+)'
|
||||
name: 'eM Client'
|
||||
version: '$1'
|
||||
|
||||
# NAVER Mail (https://play.google.com/store/apps/details?id=com.nhn.android.mail)
|
||||
- regex: 'NaverMailApp/(\d+\.[.\d]+)'
|
||||
name: 'NAVER Mail'
|
||||
version: '$1'
|
||||
|
||||
- regex: '^Mail/([\d.]+)'
|
||||
name: 'Apple Mail'
|
||||
version: '$1'
|
||||
|
||||
# Foxmail (https://www.foxmail.com/)
|
||||
- regex: 'Foxmail/(\d+[.\d]+)'
|
||||
name: 'Foxmail'
|
||||
version: '$1'
|
||||
|
||||
# Mail Master (https://apps.apple.com/mw/app/mail-master-by-netease/id897003024)
|
||||
- regex: 'MailMaster(?:PC|_Android_Mobile)?/(\d+[.\d]+)'
|
||||
name: 'Mail Master'
|
||||
version: '$1'
|
||||
|
||||
# BlueMail (https://bluemail.me/)
|
||||
- regex: 'BlueMail/(\d+[.\d]+)'
|
||||
name: 'BlueMail'
|
||||
version: '$1'
|
||||
|
||||
- regex: 'mailapp/(\d+\.[.\d]+)'
|
||||
name: 'mailapp'
|
||||
version: '$1'
|
||||
|
||||
# Gmail
|
||||
- regex: 'Android-Gmail'
|
||||
name: 'Gmail'
|
||||
version: ''
|
||||
@@ -0,0 +1,28 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
#Nikon
|
||||
Nikon:
|
||||
regex: 'Coolpix S800c'
|
||||
device: 'camera'
|
||||
model: 'Coolpix S800c'
|
||||
|
||||
# Samsung
|
||||
Samsung:
|
||||
regex: 'EK-G[CN][0-9]{3}'
|
||||
device: 'camera'
|
||||
models:
|
||||
- regex: 'EK-GN120'
|
||||
model: 'Galaxy NX'
|
||||
- regex: 'EK-GC100'
|
||||
model: 'Galaxy Camera'
|
||||
- regex: 'EK-GC110'
|
||||
model: 'Galaxy Camera WiFi only'
|
||||
- regex: 'EK-GC200'
|
||||
model: 'Galaxy Camera 2'
|
||||
- regex: 'EK-GC([0-9]{3})'
|
||||
model: 'Galaxy Camera $1'
|
||||
@@ -0,0 +1,48 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
# BMW (https://www.bmw.com/)
|
||||
BMW:
|
||||
regex: 'AFTLBT962E2(?:[);/ ]|$)'
|
||||
device: 'car browser'
|
||||
models:
|
||||
- regex: 'AFTLBT962E2(?:[);/ ]|$)'
|
||||
model: 'Car (2022)'
|
||||
|
||||
# Jeep (https://www.jeep.com/)
|
||||
Jeep:
|
||||
regex: 'AFTLFT962X3(?:[);/ ]|$)'
|
||||
device: 'car browser'
|
||||
models:
|
||||
- regex: 'AFTLFT962X3(?:[);/ ]|$)'
|
||||
model: 'Wagoneer'
|
||||
|
||||
# Tesla Model S
|
||||
Tesla:
|
||||
regex: '(?:Tesla/(?:(?:develop|feature|terminal-das-fsd-eap)-)?[0-9.]+|QtCarBrowser)'
|
||||
device: 'car browser'
|
||||
models:
|
||||
- regex: 'QtCarBrowser'
|
||||
model: 'Model S'
|
||||
- regex: 'Tesla/[0-9.]+'
|
||||
model: ''
|
||||
|
||||
# Mac Audio
|
||||
MAC AUDIO:
|
||||
regex: 'Mac Audio Spro'
|
||||
device: 'car browser'
|
||||
models:
|
||||
- regex: 'Spro'
|
||||
model: 'S Pro'
|
||||
|
||||
# Topway
|
||||
Topway:
|
||||
regex: 'sp9853i_1h10_vmm'
|
||||
device: 'car browser'
|
||||
models:
|
||||
- regex: 'sp9853i_1h10_vmm'
|
||||
model: 'TS9'
|
||||
@@ -0,0 +1,80 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
Archos:
|
||||
regex: 'Archos.*GAMEPAD([2]?)'
|
||||
device: 'console'
|
||||
model: 'Gamepad $1'
|
||||
|
||||
Microsoft:
|
||||
regex: 'Xbox'
|
||||
device: 'console'
|
||||
models:
|
||||
- regex: 'Xbox Series X'
|
||||
model: 'Xbox Series X'
|
||||
- regex: 'Xbox One X'
|
||||
model: 'Xbox One X'
|
||||
- regex: 'Xbox One'
|
||||
model: 'Xbox One'
|
||||
- regex: 'XBOX_ONE_ED'
|
||||
model: 'Xbox One S'
|
||||
- regex: 'Xbox'
|
||||
model: 'Xbox 360'
|
||||
|
||||
Nintendo:
|
||||
regex: 'Nintendo (([3]?DS[i]?)|Wii[U]?|Switch|GameBoy)'
|
||||
device: 'console'
|
||||
model: '$1'
|
||||
|
||||
OUYA:
|
||||
regex: 'OUYA'
|
||||
device: 'console'
|
||||
model: 'OUYA'
|
||||
|
||||
Sanyo:
|
||||
regex: 'Aplix_SANYO'
|
||||
device: 'console'
|
||||
model: '3DO TRY'
|
||||
|
||||
Sega:
|
||||
regex: 'Dreamcast|Aplix_SEGASATURN'
|
||||
device: 'console'
|
||||
models:
|
||||
- regex: 'Dreamcast'
|
||||
model: 'Dreamcast'
|
||||
- regex: 'Aplix_SEGASATURN'
|
||||
model: 'Saturn'
|
||||
|
||||
JXD:
|
||||
regex: 'JXD_S601WIFI'
|
||||
device: 'console'
|
||||
model: 'S601 WiFi'
|
||||
|
||||
Sony:
|
||||
regex: '(?:PlayStation ?(4 Pro|[2-5]|Portable|Vita)|sony_tv;ps5;|\(PS3\))'
|
||||
device: 'console'
|
||||
models:
|
||||
- regex: 'sony_tv;ps5;'
|
||||
model: 'PlayStation 5'
|
||||
- regex: 'PlayStation 4 PRO'
|
||||
model: 'PlayStation 4 Pro'
|
||||
- regex: '\(PS3\)'
|
||||
model: 'PlayStation 3'
|
||||
- regex: 'PlayStation ?(4 Pro|[2-5]|Portable|Vita)'
|
||||
model: 'PlayStation $1'
|
||||
|
||||
# Retroid Pocket (www.goretroid.com)
|
||||
Retroid Pocket:
|
||||
regex: 'Retroid Pocket'
|
||||
device: 'console'
|
||||
models:
|
||||
- regex: 'Pocket ([23]) ?(?:Plus|\+)'
|
||||
model: '$1 Plus'
|
||||
- regex: 'Pocket 4 Pro'
|
||||
model: '4 Pro'
|
||||
- regex: 'Pocket ([235])'
|
||||
model: '$1'
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,127 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
Acer:
|
||||
regex: 'FBMD/(?:Aspire E5-421G|Z5WAL|One S1003);'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'FBMD/Aspire E5-421G;'
|
||||
model: 'Aspire E5-421G'
|
||||
- regex: 'FBMD/Z5WAL;'
|
||||
model: 'Aspire E5-511'
|
||||
- regex: 'FBMD/One S1003;'
|
||||
model: 'One 10'
|
||||
|
||||
Asus:
|
||||
regex: 'FBMD/(?:K50IN|K54L|T100HAN|T103HAF|UX360CAK|X550LB|X553MA|X555LN|X556UQK);'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'FBMD/K50IN;'
|
||||
model: 'K50IN'
|
||||
- regex: 'FBMD/K54L;'
|
||||
model: 'K54L'
|
||||
- regex: 'FBMD/T100HAN;'
|
||||
model: 'Transformer Book'
|
||||
- regex: 'FBMD/T103HAF;'
|
||||
model: 'Transformer Mini'
|
||||
- regex: 'FBMD/UX360CAK;'
|
||||
model: 'ZenBook Flip'
|
||||
- regex: 'FBMD/X550LB;'
|
||||
model: 'X550LB'
|
||||
- regex: 'FBMD/X553MA;'
|
||||
model: 'X553MA'
|
||||
- regex: 'FBMD/X555LN;'
|
||||
model: 'X555LN'
|
||||
- regex: 'FBMD/X556UQK;'
|
||||
model: 'X556UQK'
|
||||
|
||||
Alienware:
|
||||
regex: 'FBMD/(?:Alienware [0-9]{2,3}R[0-9]{1,2}|Area-51m|R3|R4|Alienware Aurora R[0-9]+(:? [0-9]+)?);'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'Alienware 15R3;'
|
||||
model: 'Alienware 15 R3'
|
||||
- regex: 'Alienware 17R4;'
|
||||
model: 'Alienware 17 R4'
|
||||
- regex: 'Area-51m;'
|
||||
model: 'Area-51m'
|
||||
- regex: 'Aurora (R[0-9]+)'
|
||||
model: 'Aurora $1'
|
||||
|
||||
Dell:
|
||||
regex: 'FBMD/(?:Latitude E4300|Inspiron 3541|XPS 15 95[35]0);'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'Latitude E4300'
|
||||
model: 'Latitude E4300'
|
||||
- regex: 'Inspiron 3541'
|
||||
model: 'Inspiron 3541'
|
||||
- regex: 'XPS 15 9530'
|
||||
model: 'XPS 15 9530'
|
||||
- regex: 'XPS 15 9550'
|
||||
model: 'XPS 15 9550'
|
||||
|
||||
HP:
|
||||
regex: 'FBMD/((?:Compaq|HP) |23-f364)'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'Compaq Presario CQ61 Notebook PC'
|
||||
model: 'Compaq Presario CQ61'
|
||||
- regex: 'HP Pavilion x2 Detachable'
|
||||
model: 'Pavilion x2'
|
||||
- regex: 'HP Laptop 15-bs0xx'
|
||||
model: '15 Laptop PC'
|
||||
- regex: 'HP ENVY x360 Convertible 15-bp0xx'
|
||||
model: 'ENVY x360 Convertible PC'
|
||||
- regex: 'HP EliteBook (25[67]0p)'
|
||||
model: 'EliteBook $1'
|
||||
- regex: 'HP ProBook (440 G5|6[35]60b)'
|
||||
model: 'ProBook $1'
|
||||
- regex: 'HP Pavilion dv6 Notebook PC'
|
||||
model: 'Pavilion dv6'
|
||||
- regex: 'HP Pavilion Notebook'
|
||||
model: 'Pavilion'
|
||||
- regex: 'HP Spectre x360 Convertible'
|
||||
model: 'Spectre x360'
|
||||
- regex: 'HP Pavilion All-in-One 24-r0xx'
|
||||
model: 'Pavilion 24-r0xx All-in-One Desktop PC'
|
||||
device: 'desktop'
|
||||
- regex: '23-f364'
|
||||
model: 'Pavilion TouchSmart 23-f364 All-in-One Desktop PC'
|
||||
device: 'desktop'
|
||||
|
||||
Lenovo:
|
||||
regex: 'FBMD/(?:37021C5|80E5|80SM|80VR);'
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'FBMD/37021C5;'
|
||||
model: 'ThinkPad Helix 3702'
|
||||
- regex: 'FBMD/80E5;'
|
||||
model: 'G50-80'
|
||||
- regex: 'FBMD/80SM;'
|
||||
model: 'Ideapad 310-15ISK'
|
||||
- regex: 'FBMD/80VR;'
|
||||
model: 'Legion Y720'
|
||||
|
||||
Schneider:
|
||||
regex: 'FBMD/SCL141CTP;'
|
||||
device: 'desktop'
|
||||
model: 'Notebook 14" Cherry Trail'
|
||||
|
||||
Thomson:
|
||||
regex: 'FBMD/TH360R12\.32CTW;'
|
||||
device: 'desktop'
|
||||
model: 'Prestige TH-360R12.32CTW'
|
||||
|
||||
Toshiba:
|
||||
regex: 'FBMD/Satellite '
|
||||
device: 'desktop'
|
||||
models:
|
||||
- regex: 'Satellite (A[25]00|C650|C855|L650|S855)'
|
||||
model: 'Satellite $1'
|
||||
- regex: 'Satellite ([^;\)]+);'
|
||||
model: 'Satellite $1'
|
||||
@@ -0,0 +1,136 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
Apple:
|
||||
regex: '(?:Apple-)?iPod'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: '(?:Apple-)?iPod1[C,_]?1'
|
||||
model: 'iPod Touch 1G'
|
||||
- regex: '(?:Apple-)?iPod2[C,_]?1'
|
||||
model: 'iPod Touch 2G'
|
||||
- regex: '(?:Apple-)?iPod3[C,_]?1'
|
||||
model: 'iPod Touch 3'
|
||||
- regex: '(?:Apple-)?iPod4[C,_]?1'
|
||||
model: 'iPod Touch 4'
|
||||
- regex: '(?:Apple-)?iPod5[C,_]?1'
|
||||
model: 'iPod Touch 5'
|
||||
- regex: '(?:Apple-)?iPod7[C,_]?1'
|
||||
model: 'iPod Touch 6'
|
||||
- regex: '(?:Apple-)?iPod9[C,_]?1|iPodTouch7'
|
||||
model: 'iPod Touch 7'
|
||||
- regex: '(?:Apple-)?iPod'
|
||||
model: 'iPod Touch'
|
||||
|
||||
Cowon:
|
||||
regex: 'COWON ([^;/]+) Build'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# FiiO (https://www.fiio.com/)
|
||||
FiiO:
|
||||
regex: 'FiiO'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'M11 Plus LTD'
|
||||
model: 'M11 Plus LTD'
|
||||
- regex: 'FiiO M(11S|1[157]|6)'
|
||||
model: 'M$1'
|
||||
|
||||
Microsoft:
|
||||
regex: 'Microsoft ZuneHD'
|
||||
device: 'portable media player'
|
||||
model: 'Zune HD'
|
||||
|
||||
Panasonic:
|
||||
regex: '(SV-MV100)'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
Samsung:
|
||||
regex: 'YP-(G[SIPB]?1|G[57]0|GB70D)'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'YP-G[B]?1'
|
||||
model: 'Galaxy Player 4.0'
|
||||
- regex: 'YP-G70'
|
||||
model: 'Galaxy Player 5.0'
|
||||
- regex: 'YP-GS1'
|
||||
model: 'Galaxy Player 3.6'
|
||||
- regex: 'YP-GI1'
|
||||
model: 'Galaxy Player 4.2'
|
||||
- regex: 'YP-GP1'
|
||||
model: 'Galaxy Player 5.8'
|
||||
- regex: 'YP-G50'
|
||||
model: 'Galaxy Player 50'
|
||||
- regex: 'YP-GB70D'
|
||||
model: 'Galaxy Player 70 Plus'
|
||||
|
||||
Wizz:
|
||||
regex: '(DV-PTB1080)(?:[);/ ]|$)'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# Shanling
|
||||
Shanling:
|
||||
regex: 'Shanling M6'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'Shanling (M6\(21\))'
|
||||
model: '$1'
|
||||
|
||||
# Sylvania
|
||||
Sylvania:
|
||||
regex: '(SLTDVD102[34])'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# KuGou
|
||||
KuGou:
|
||||
regex: 'KuGou[_ -](P5)'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# Surfans
|
||||
Surfans:
|
||||
regex: '(Y57A)(?:[);/ ]|$)'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# Oilsky (oilsky.com.cn)
|
||||
Oilsky:
|
||||
regex: 'Oilsky (M501|M303)(?:-Pro)?(?:[);/ ]|$)'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'M303-Pro'
|
||||
model: 'M303 Pro'
|
||||
- regex: '(M501|M303)'
|
||||
model: '$1'
|
||||
|
||||
# Diofox
|
||||
Diofox:
|
||||
regex: 'Diofox[ _](M8|M10|M508)(?:[);/ ]|$)'
|
||||
device: 'portable media player'
|
||||
model: '$1'
|
||||
|
||||
# MECHEN (mechen.com.cn)
|
||||
MECHEN:
|
||||
regex: 'MECHEN'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'MECHEN[- _]([^;/)]+)[- _]Pro(?: Build|[);])'
|
||||
model: '$1 Pro'
|
||||
- regex: 'MECHEN[- _]([^;/)]+)(?: Build|[);])'
|
||||
model: '$1'
|
||||
|
||||
# Fanvace
|
||||
Fanvace:
|
||||
regex: 'Fanvace'
|
||||
device: 'portable media player'
|
||||
models:
|
||||
- regex: 'Fanvace[- _]([^;/)]+)(?: Build|[);])'
|
||||
model: '$1'
|
||||
@@ -0,0 +1,145 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
#
|
||||
# ATTENTION: This file may only include tv user agents that contain '[a-z]+[ _]Shell[ _]\w{6}'
|
||||
#
|
||||
###############
|
||||
|
||||
# Telefunken
|
||||
Telefunken:
|
||||
regex: 'Telefunken Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# JVC
|
||||
JVC:
|
||||
regex: 'JVC Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Leff
|
||||
Leff:
|
||||
regex: 'Leff Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Leben
|
||||
Leben:
|
||||
regex: 'Leben Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Lumus
|
||||
Lumus:
|
||||
regex: 'LUMUS Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Erisson
|
||||
Erisson:
|
||||
regex: 'Erisson[_ ]Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# BBK
|
||||
BBK:
|
||||
regex: 'BBK shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Novex
|
||||
Novex:
|
||||
regex: 'Novex shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Digma
|
||||
Digma:
|
||||
regex: 'Digma Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# AMCV
|
||||
AMCV:
|
||||
regex: 'AMCV Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Mystery
|
||||
Mystery:
|
||||
regex: 'Mystery Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# ECON (econ.su)
|
||||
ECON:
|
||||
regex: 'ECON Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Starwind (starwind.com.ru)
|
||||
Starwind:
|
||||
regex: 'Starwind Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Kvant (tvkvant.ru)
|
||||
Kvant:
|
||||
regex: 'Kvant Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Hi
|
||||
Hi:
|
||||
regex: 'Hi Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# AKIRA (myakira.com)
|
||||
AKIRA:
|
||||
regex: 'AKIRA Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Loview
|
||||
Loview:
|
||||
regex: 'Loview Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Supra
|
||||
Supra:
|
||||
regex: 'Supra Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Yuno (yuno.bbk.ru)
|
||||
Yuno:
|
||||
regex: 'Yuno Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
TCL:
|
||||
regex: 'TCL/TCL-'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# RCA Tablets (RCA) (https://www.rca.com/)
|
||||
RCA Tablets:
|
||||
regex: 'TCL/RCA-'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
# Thomson
|
||||
Thomson:
|
||||
regex: 'TCL/THOM-'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
|
||||
DEXP:
|
||||
regex: 'DEXP Shell'
|
||||
device: 'tv'
|
||||
model: ''
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,75 @@
|
||||
###############
|
||||
# Device Detector - The Universal Device Detection library for parsing User Agents
|
||||
#
|
||||
# @link https://matomo.org
|
||||
# @license http://www.gnu.org/licenses/lgpl.html LGPL v3 or later
|
||||
###############
|
||||
|
||||
Dell:
|
||||
- 'MDDR(JS)?'
|
||||
- 'MDDC(JS)?'
|
||||
- 'MDDS(JS)?'
|
||||
|
||||
Acer:
|
||||
- 'MAAR(JS)?'
|
||||
|
||||
Sony:
|
||||
- 'MASE(JS)?'
|
||||
- 'MASP(JS)?'
|
||||
- 'MASA(JS)?'
|
||||
|
||||
Asus:
|
||||
- 'MAAU'
|
||||
- 'NP0[26789]'
|
||||
- 'ASJB'
|
||||
- 'ASU2(JS)?'
|
||||
|
||||
Samsung:
|
||||
- 'MASM(JS)?'
|
||||
- 'SMJB'
|
||||
|
||||
Lenovo:
|
||||
- 'MALC(JS)?'
|
||||
- 'MALE(JS)?'
|
||||
- 'MALN(JS)?'
|
||||
- 'LCJB'
|
||||
- 'LEN2'
|
||||
|
||||
Toshiba:
|
||||
- 'MATM(JS)?'
|
||||
- 'MATB(JS)?'
|
||||
- 'MATP(JS)?'
|
||||
- 'TNJB'
|
||||
- 'TAJB'
|
||||
|
||||
Medion:
|
||||
- 'MAMD'
|
||||
|
||||
MSI:
|
||||
- 'MAMI(JS)?'
|
||||
- 'MAM3'
|
||||
|
||||
Gateway:
|
||||
- 'MAGW(JS)?'
|
||||
|
||||
Fujitsu:
|
||||
- 'MAFS(JS)?'
|
||||
- 'FSJB'
|
||||
|
||||
Compaq:
|
||||
- 'CPDTDF'
|
||||
- 'CPNTDF(JS?)'
|
||||
- 'CMNTDF(JS)?'
|
||||
- 'CMDTDF(JS)?'
|
||||
|
||||
HP:
|
||||
- 'HPCMHP'
|
||||
- 'HPNTDF(JS)?'
|
||||
- 'HPDTDF(JS)?'
|
||||
|
||||
Hyrican:
|
||||
- 'MANM(JS)?'
|
||||
|
||||
Ordissimo:
|
||||
- 'Ordissimo'
|
||||
- 'webissimo3'
|
||||
Reference in New Issue
Block a user