Commit 5bb15cf3 by Marcus Olsson Committed by GitHub

Build: Update ua-parser/uap-go (#18788)

parent e1112323
...@@ -54,6 +54,7 @@ require ( ...@@ -54,6 +54,7 @@ require (
github.com/onsi/gomega v1.5.0 // indirect github.com/onsi/gomega v1.5.0 // indirect
github.com/opentracing/opentracing-go v1.1.0 github.com/opentracing/opentracing-go v1.1.0
github.com/patrickmn/go-cache v2.1.0+incompatible github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/client_golang v0.9.2 github.com/prometheus/client_golang v0.9.2
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90 github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90
github.com/prometheus/common v0.2.0 github.com/prometheus/common v0.2.0
...@@ -66,7 +67,7 @@ require ( ...@@ -66,7 +67,7 @@ require (
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a
github.com/stretchr/testify v1.3.0 github.com/stretchr/testify v1.3.0
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
github.com/ua-parser/uap-go v0.0.0-20190303233514-1004ccd816b3 github.com/ua-parser/uap-go v0.0.0-20190826212731-daf92ba38329
github.com/uber-go/atomic v1.3.2 // indirect github.com/uber-go/atomic v1.3.2 // indirect
github.com/uber/jaeger-client-go v2.16.0+incompatible github.com/uber/jaeger-client-go v2.16.0+incompatible
github.com/uber/jaeger-lib v2.0.0+incompatible // indirect github.com/uber/jaeger-lib v2.0.0+incompatible // indirect
......
...@@ -212,8 +212,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 ...@@ -212,8 +212,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ75iPqWZc0HeJWFYNCvKsfpQwFpRNTA= github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ75iPqWZc0HeJWFYNCvKsfpQwFpRNTA=
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0= github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0=
github.com/ua-parser/uap-go v0.0.0-20190303233514-1004ccd816b3 h1:E7xa7Zur8hLPvw+03gAeQ9esrglfV389j2PcwhiGf/I= github.com/ua-parser/uap-go v0.0.0-20190826212731-daf92ba38329 h1:VBsKFh4W1JEMz3eLCmM9zOJKZdDkP5W4b3Y4hc7SbZc=
github.com/ua-parser/uap-go v0.0.0-20190303233514-1004ccd816b3/go.mod h1:OBcG9bn7sHtXgarhUEb3OfCnNsgtGnkVf41ilSZ3K3E= github.com/ua-parser/uap-go v0.0.0-20190826212731-daf92ba38329/go.mod h1:OBcG9bn7sHtXgarhUEb3OfCnNsgtGnkVf41ilSZ3K3E=
github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo= github.com/uber-go/atomic v1.3.2 h1:Azu9lPBWRNKzYXSIwRfgRuDuS0YKsK4NFhiQv98gkxo=
github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g= github.com/uber-go/atomic v1.3.2/go.mod h1:/Ct5t2lcmbJ4OSe/waGBoaVvVqtO0bmtfVNex1PFV8g=
github.com/uber/jaeger-client-go v2.16.0+incompatible h1:Q2Pp6v3QYiocMxomCaJuwQGFt7E53bPYqEgug/AoBtY= github.com/uber/jaeger-client-go v2.16.0+incompatible h1:Q2Pp6v3QYiocMxomCaJuwQGFt7E53bPYqEgug/AoBtY=
......
...@@ -16,7 +16,9 @@ type RegexesDefinitions struct { ...@@ -16,7 +16,9 @@ type RegexesDefinitions struct {
UA []*uaParser `yaml:"user_agent_parsers"` UA []*uaParser `yaml:"user_agent_parsers"`
OS []*osParser `yaml:"os_parsers"` OS []*osParser `yaml:"os_parsers"`
Device []*deviceParser `yaml:"device_parsers"` Device []*deviceParser `yaml:"device_parsers"`
_ [4]byte // padding for alignment
sync.RWMutex sync.RWMutex
} }
type UserAgentSorter []*uaParser type UserAgentSorter []*uaParser
...@@ -32,6 +34,7 @@ type uaParser struct { ...@@ -32,6 +34,7 @@ type uaParser struct {
V1Replacement string `yaml:"v1_replacement"` V1Replacement string `yaml:"v1_replacement"`
V2Replacement string `yaml:"v2_replacement"` V2Replacement string `yaml:"v2_replacement"`
V3Replacement string `yaml:"v3_replacement"` V3Replacement string `yaml:"v3_replacement"`
_ [4]byte // padding for alignment
MatchesCount uint64 MatchesCount uint64
} }
...@@ -64,6 +67,7 @@ type osParser struct { ...@@ -64,6 +67,7 @@ type osParser struct {
V2Replacement string `yaml:"os_v2_replacement"` V2Replacement string `yaml:"os_v2_replacement"`
V3Replacement string `yaml:"os_v3_replacement"` V3Replacement string `yaml:"os_v3_replacement"`
V4Replacement string `yaml:"os_v4_replacement"` V4Replacement string `yaml:"os_v4_replacement"`
_ [4]byte // padding for alignment
MatchesCount uint64 MatchesCount uint64
} }
...@@ -97,6 +101,7 @@ type deviceParser struct { ...@@ -97,6 +101,7 @@ type deviceParser struct {
DeviceReplacement string `yaml:"device_replacement"` DeviceReplacement string `yaml:"device_replacement"`
BrandReplacement string `yaml:"brand_replacement"` BrandReplacement string `yaml:"brand_replacement"`
ModelReplacement string `yaml:"model_replacement"` ModelReplacement string `yaml:"model_replacement"`
_ [4]byte // padding for alignment
MatchesCount uint64 MatchesCount uint64
} }
......
...@@ -24,7 +24,7 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -24,7 +24,7 @@ var definitionYaml = []byte(`user_agent_parsers:
family_replacement: 'PingdomBot' family_replacement: 'PingdomBot'
- regex: '(PingdomTMS)/(\d+)\.(\d+)\.(\d+)' - regex: '(PingdomTMS)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'PingdomBot' family_replacement: 'PingdomBot'
- regex: ' (PTST)/(\d+)\.(\d+)$' - regex: ' (PTST)/(\d+)(?:\.(\d+)|)$'
family_replacement: 'WebPageTest.org bot' family_replacement: 'WebPageTest.org bot'
- regex: 'X11; (Datanyze); Linux' - regex: 'X11; (Datanyze); Linux'
- regex: '(NewRelicPinger)/(\d+)\.(\d+)' - regex: '(NewRelicPinger)/(\d+)\.(\d+)'
...@@ -54,24 +54,26 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -54,24 +54,26 @@ var definitionYaml = []byte(`user_agent_parsers:
family_replacement: 'Pinterestbot' family_replacement: 'Pinterestbot'
- regex: '(CSimpleSpider|Cityreview Robot|CrawlDaddy|CrawlFire|Finderbots|Index crawler|Job Roboter|KiwiStatus Spider|Lijit Crawler|QuerySeekerSpider|ScollSpider|Trends Crawler|USyd-NLP-Spider|SiteCat Webbot|BotName\/\$BotVersion|123metaspider-Bot|1470\.net crawler|50\.nu|8bo Crawler Bot|Aboundex|Accoona-[A-z]{1,30}-Agent|AdsBot-Google(?:-[a-z]{1,30}|)|altavista|AppEngine-Google|archive.{0,30}\.org_bot|archiver|Ask Jeeves|[Bb]ai[Dd]u[Ss]pider(?:-[A-Za-z]{1,30})(?:-[A-Za-z]{1,30}|)|bingbot|BingPreview|blitzbot|BlogBridge|Bloglovin|BoardReader Blog Indexer|BoardReader Favicon Fetcher|boitho.com-dc|BotSeer|BUbiNG|\b\w{0,30}favicon\w{0,30}\b|\bYeti(?:-[a-z]{1,30}|)|Catchpoint(?: bot|)|[Cc]harlotte|Checklinks|clumboot|Comodo HTTP\(S\) Crawler|Comodo-Webinspector-Crawler|ConveraCrawler|CRAWL-E|CrawlConvera|Daumoa(?:-feedfetcher|)|Feed Seeker Bot|Feedbin|findlinks|Flamingo_SearchEngine|FollowSite Bot|furlbot|Genieo|gigabot|GomezAgent|gonzo1|(?:[a-zA-Z]{1,30}-|)Googlebot(?:-[a-zA-Z]{1,30}|)|Google SketchUp|grub-client|gsa-crawler|heritrix|HiddenMarket|holmes|HooWWWer|htdig|ia_archiver|ICC-Crawler|Icarus6j|ichiro(?:/mobile|)|IconSurf|IlTrovatore(?:-Setaccio|)|InfuzApp|Innovazion Crawler|InternetArchive|IP2[a-z]{1,30}Bot|jbot\b|KaloogaBot|Kraken|Kurzor|larbin|LEIA|LesnikBot|Linguee Bot|LinkAider|LinkedInBot|Lite Bot|Llaut|lycos|Mail\.RU_Bot|masscan|masidani_bot|Mediapartners-Google|Microsoft .{0,30} Bot|mogimogi|mozDex|MJ12bot|msnbot(?:-media {0,2}|)|msrbot|Mtps Feed Aggregation System|netresearch|Netvibes|NewsGator[^/]{0,30}|^NING|Nutch[^/]{0,30}|Nymesis|ObjectsSearch|Orbiter|OOZBOT|PagePeeker|PagesInventory|PaxleFramework|Peeplo Screenshot Bot|PlantyNet_WebRobot|Pompos|Qwantify|Read%20Later|Reaper|RedCarpet|Retreiver|Riddler|Rival IQ|scooter|Scrapy|Scrubby|searchsight|seekbot|semanticdiscovery|SemrushBot|Simpy|SimplePie|SEOstats|SimpleRSS|SiteCon|Slackbot-LinkExpanding|Slack-ImgProxy|Slurp|snappy|Speedy Spider|Squrl Java|Stringer|TheUsefulbot|ThumbShotsBot|Thumbshots\.ru|Tiny Tiny RSS|TwitterBot|WhatsApp|URL2PNG|Vagabondo|VoilaBot|^vortex|Votay bot|^voyager|WASALive.Bot|Web-sniffer|WebThumb|WeSEE:[A-z]{1,30}|WhatWeb|WIRE|WordPress|Wotbox|www\.almaden\.ibm\.com|Xenu(?:.s|) Link Sleuth|Xerka [A-z]{1,30}Bot|yacy(?:bot|)|YahooSeeker|Yahoo! Slurp|Yandex\w{1,30}|YodaoBot(?:-[A-z]{1,30}|)|YottaaMonitor|Yowedo|^Zao|^Zao-Crawler|ZeBot_www\.ze\.bz|ZooShot|ZyBorg)(?:[ /]v?(\d+)(?:\.(\d+)(?:\.(\d+)|)|)|)' - regex: '(CSimpleSpider|Cityreview Robot|CrawlDaddy|CrawlFire|Finderbots|Index crawler|Job Roboter|KiwiStatus Spider|Lijit Crawler|QuerySeekerSpider|ScollSpider|Trends Crawler|USyd-NLP-Spider|SiteCat Webbot|BotName\/\$BotVersion|123metaspider-Bot|1470\.net crawler|50\.nu|8bo Crawler Bot|Aboundex|Accoona-[A-z]{1,30}-Agent|AdsBot-Google(?:-[a-z]{1,30}|)|altavista|AppEngine-Google|archive.{0,30}\.org_bot|archiver|Ask Jeeves|[Bb]ai[Dd]u[Ss]pider(?:-[A-Za-z]{1,30})(?:-[A-Za-z]{1,30}|)|bingbot|BingPreview|blitzbot|BlogBridge|Bloglovin|BoardReader Blog Indexer|BoardReader Favicon Fetcher|boitho.com-dc|BotSeer|BUbiNG|\b\w{0,30}favicon\w{0,30}\b|\bYeti(?:-[a-z]{1,30}|)|Catchpoint(?: bot|)|[Cc]harlotte|Checklinks|clumboot|Comodo HTTP\(S\) Crawler|Comodo-Webinspector-Crawler|ConveraCrawler|CRAWL-E|CrawlConvera|Daumoa(?:-feedfetcher|)|Feed Seeker Bot|Feedbin|findlinks|Flamingo_SearchEngine|FollowSite Bot|furlbot|Genieo|gigabot|GomezAgent|gonzo1|(?:[a-zA-Z]{1,30}-|)Googlebot(?:-[a-zA-Z]{1,30}|)|Google SketchUp|grub-client|gsa-crawler|heritrix|HiddenMarket|holmes|HooWWWer|htdig|ia_archiver|ICC-Crawler|Icarus6j|ichiro(?:/mobile|)|IconSurf|IlTrovatore(?:-Setaccio|)|InfuzApp|Innovazion Crawler|InternetArchive|IP2[a-z]{1,30}Bot|jbot\b|KaloogaBot|Kraken|Kurzor|larbin|LEIA|LesnikBot|Linguee Bot|LinkAider|LinkedInBot|Lite Bot|Llaut|lycos|Mail\.RU_Bot|masscan|masidani_bot|Mediapartners-Google|Microsoft .{0,30} Bot|mogimogi|mozDex|MJ12bot|msnbot(?:-media {0,2}|)|msrbot|Mtps Feed Aggregation System|netresearch|Netvibes|NewsGator[^/]{0,30}|^NING|Nutch[^/]{0,30}|Nymesis|ObjectsSearch|Orbiter|OOZBOT|PagePeeker|PagesInventory|PaxleFramework|Peeplo Screenshot Bot|PlantyNet_WebRobot|Pompos|Qwantify|Read%20Later|Reaper|RedCarpet|Retreiver|Riddler|Rival IQ|scooter|Scrapy|Scrubby|searchsight|seekbot|semanticdiscovery|SemrushBot|Simpy|SimplePie|SEOstats|SimpleRSS|SiteCon|Slackbot-LinkExpanding|Slack-ImgProxy|Slurp|snappy|Speedy Spider|Squrl Java|Stringer|TheUsefulbot|ThumbShotsBot|Thumbshots\.ru|Tiny Tiny RSS|TwitterBot|WhatsApp|URL2PNG|Vagabondo|VoilaBot|^vortex|Votay bot|^voyager|WASALive.Bot|Web-sniffer|WebThumb|WeSEE:[A-z]{1,30}|WhatWeb|WIRE|WordPress|Wotbox|www\.almaden\.ibm\.com|Xenu(?:.s|) Link Sleuth|Xerka [A-z]{1,30}Bot|yacy(?:bot|)|YahooSeeker|Yahoo! Slurp|Yandex\w{1,30}|YodaoBot(?:-[A-z]{1,30}|)|YottaaMonitor|Yowedo|^Zao|^Zao-Crawler|ZeBot_www\.ze\.bz|ZooShot|ZyBorg)(?:[ /]v?(\d+)(?:\.(\d+)(?:\.(\d+)|)|)|)'
- regex: '\b(Boto3?|JetS3t|aws-(?:cli|sdk-(?:cpp|go|java|nodejs|ruby2?))|s3fs)/(\d+)\.(\d+)(?:\.(\d+)|)' - regex: '\b(Boto3?|JetS3t|aws-(?:cli|sdk-(?:cpp|go|java|nodejs|ruby2?))|s3fs)/(\d+)\.(\d+)(?:\.(\d+)|)'
- regex: '(?:\/[A-Za-z0-9\.]+|) {0,5}([A-Za-z0-9 \-_\!\[\]:]{0,50}(?:[Aa]rchiver|[Ii]ndexer|[Ss]craper|[Bb]ot|[Ss]pider|[Cc]rawl[a-z]{0,50}))[/ ](\d+)(?:\.(\d+)(?:\.(\d+)|)|)'
- regex: '((?:[A-Za-z][A-Za-z0-9 -]{0,50}|)[^C][^Uu][Bb]ot)\b(?:(?:[ /]| v)(\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
- regex: '((?:[A-z0-9]{1,50}|[A-z\-]{1,50} ?|)(?: the |)(?:[Ss][Pp][Ii][Dd][Ee][Rr]|[Ss]crape|[Cc][Rr][Aa][Ww][Ll])[A-z0-9]{0,50})(?:(?:[ /]| v)(\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
- regex: '(HbbTV)/(\d+)\.(\d+)\.(\d+) \('
- regex: '(Chimera|SeaMonkey|Camino|Waterfox)/(\d+)\.(\d+)\.?([ab]?\d+[a-z]*|)'
- regex: '\[(FBAN/MessengerForiOS|FB_IAB/MESSENGER);FBAV/(\d+)(?:\.(\d+)(?:\.(\d+)|)|)' - regex: '\[(FBAN/MessengerForiOS|FB_IAB/MESSENGER);FBAV/(\d+)(?:\.(\d+)(?:\.(\d+)|)|)'
family_replacement: 'Facebook Messenger' family_replacement: 'Facebook Messenger'
- regex: '\[FB.*;(FBAV)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)' - regex: '\[FB.*;(FBAV)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)'
family_replacement: 'Facebook' family_replacement: 'Facebook'
- regex: '\[FB.*;' - regex: '\[FB.*;'
family_replacement: 'Facebook' family_replacement: 'Facebook'
- regex: '(?:\/[A-Za-z0-9\.]+|) {0,5}([A-Za-z0-9 \-_\!\[\]:]{0,50}(?:[Aa]rchiver|[Ii]ndexer|[Ss]craper|[Bb]ot|[Ss]pider|[Cc]rawl[a-z]{0,50}))[/ ](\d+)(?:\.(\d+)(?:\.(\d+)|)|)'
- regex: '((?:[A-Za-z][A-Za-z0-9 -]{0,50}|)[^C][^Uu][Bb]ot)\b(?:(?:[ /]| v)(\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
- regex: '((?:[A-z0-9]{1,50}|[A-z\-]{1,50} ?|)(?: the |)(?:[Ss][Pp][Ii][Dd][Ee][Rr]|[Ss]crape|[Cc][Rr][Aa][Ww][Ll])[A-z0-9]{0,50})(?:(?:[ /]| v)(\d+)(?:\.(\d+)|)(?:\.(\d+)|)|)'
- regex: '(HbbTV)/(\d+)\.(\d+)\.(\d+) \('
- regex: '(Chimera|SeaMonkey|Camino|Waterfox)/(\d+)\.(\d+)\.?([ab]?\d+[a-z]*|)'
- regex: '(SailfishBrowser)/(\d+)\.(\d+)(?:\.(\d+)|)'
family_replacement: 'Sailfish Browser'
- regex: '\[(Pinterest)/[^\]]+\]' - regex: '\[(Pinterest)/[^\]]+\]'
- regex: '(Pinterest)(?: for Android(?: Tablet|)|)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)' - regex: '(Pinterest)(?: for Android(?: Tablet|)|)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)'
- regex: 'Mozilla.*Mobile.*(Instagram).(\d+)\.(\d+)\.(\d+)' - regex: 'Mozilla.*Mobile.*(Instagram).(\d+)\.(\d+)\.(\d+)'
- regex: 'Mozilla.*Mobile.*(Flipboard).(\d+)\.(\d+)\.(\d+)' - regex: 'Mozilla.*Mobile.*(Flipboard).(\d+)\.(\d+)\.(\d+)'
- regex: 'Mozilla.*Mobile.*(Flipboard-Briefing).(\d+)\.(\d+)\.(\d+)' - regex: 'Mozilla.*Mobile.*(Flipboard-Briefing).(\d+)\.(\d+)\.(\d+)'
- regex: 'Mozilla.*Mobile.*(Onefootball)\/Android.(\d+)\.(\d+)\.(\d+)' - regex: 'Mozilla.*Mobile.*(Onefootball)\/Android.(\d+)\.(\d+)\.(\d+)'
- regex: '(Snapchat)\/(\d+)\.(\d+)\.(\d+).(\d+)' - regex: '(Snapchat)\/(\d+)\.(\d+)\.(\d+)\.(\d+)'
- regex: '(Firefox)/(\d+)\.(\d+) Basilisk/(\d+)' - regex: '(Firefox)/(\d+)\.(\d+) Basilisk/(\d+)'
family_replacement: 'Basilisk' family_replacement: 'Basilisk'
- regex: '(PaleMoon)/(\d+)\.(\d+)(?:\.(\d+)|)' - regex: '(PaleMoon)/(\d+)\.(\d+)(?:\.(\d+)|)'
...@@ -232,6 +234,7 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -232,6 +234,7 @@ var definitionYaml = []byte(`user_agent_parsers:
family_replacement: 'Whale' family_replacement: 'Whale'
- regex: '(Whale)/(\d+)\.(\d+)\.(\d+)' - regex: '(Whale)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Whale' family_replacement: 'Whale'
- regex: '(Ghost)/(\d+)\.(\d+)\.(\d+)'
- regex: '(Slack_SSB)/(\d+)\.(\d+)\.(\d+)' - regex: '(Slack_SSB)/(\d+)\.(\d+)\.(\d+)'
family_replacement: 'Slack Desktop Client' family_replacement: 'Slack Desktop Client'
- regex: '(HipChat)/?(\d+|)' - regex: '(HipChat)/?(\d+|)'
...@@ -249,6 +252,7 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -249,6 +252,7 @@ var definitionYaml = []byte(`user_agent_parsers:
- regex: 'Microsoft Outlook (?:Mail )?16\.\d+\.\d+' - regex: 'Microsoft Outlook (?:Mail )?16\.\d+\.\d+'
family_replacement: 'Outlook' family_replacement: 'Outlook'
v1_replacement: '2016' v1_replacement: '2016'
- regex: 'Microsoft Office (Word) 2014'
- regex: 'Outlook-Express\/7\.0.*' - regex: 'Outlook-Express\/7\.0.*'
family_replacement: 'Windows Live Mail' family_replacement: 'Windows Live Mail'
- regex: '(Airmail) (\d+)\.(\d+)(?:\.(\d+)|)' - regex: '(Airmail) (\d+)\.(\d+)(?:\.(\d+)|)'
...@@ -261,7 +265,8 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -261,7 +265,8 @@ var definitionYaml = []byte(`user_agent_parsers:
- regex: '(Lotus-Notes)/(\d+)\.(\d+)(?:\.(\d+)|)' - regex: '(Lotus-Notes)/(\d+)\.(\d+)(?:\.(\d+)|)'
family_replacement: 'Lotus Notes' family_replacement: 'Lotus Notes'
- regex: '(Vivaldi)/(\d+)\.(\d+)\.(\d+)' - regex: '(Vivaldi)/(\d+)\.(\d+)\.(\d+)'
- regex: '(Edge)/(\d+)(?:\.(\d+)|)' - regex: '(Edge?)/(\d+)(?:\.(\d+)|)(?:\.(\d+)|)(?:\.(\d+)|)'
family_replacement: 'Edge'
- regex: '(brave)/(\d+)\.(\d+)\.(\d+) Chrome' - regex: '(brave)/(\d+)\.(\d+)\.(\d+) Chrome'
family_replacement: 'Brave' family_replacement: 'Brave'
- regex: '(Chrome)/(\d+)\.(\d+)\.(\d+)[\d.]* Iron[^/]' - regex: '(Chrome)/(\d+)\.(\d+)\.(\d+)[\d.]* Iron[^/]'
...@@ -379,6 +384,8 @@ var definitionYaml = []byte(`user_agent_parsers: ...@@ -379,6 +384,8 @@ var definitionYaml = []byte(`user_agent_parsers:
family_replacement: 'Mobile Safari' family_replacement: 'Mobile Safari'
- regex: '(iPod|iPhone|iPad)' - regex: '(iPod|iPhone|iPad)'
family_replacement: 'Mobile Safari UI/WKWebView' family_replacement: 'Mobile Safari UI/WKWebView'
- regex: '(Watch)(\d+),(\d+)'
family_replacement: 'Apple $1 App'
- regex: '(Outlook-iOS)/\d+\.\d+\.prod\.iphone \((\d+)\.(\d+)\.(\d+)\)' - regex: '(Outlook-iOS)/\d+\.\d+\.prod\.iphone \((\d+)\.(\d+)\.(\d+)\)'
- regex: '(AvantGo) (\d+).(\d+)' - regex: '(AvantGo) (\d+).(\d+)'
- regex: '(OneBrowser)/(\d+).(\d+)' - regex: '(OneBrowser)/(\d+).(\d+)'
...@@ -527,6 +534,9 @@ os_parsers: ...@@ -527,6 +534,9 @@ os_parsers:
os_replacement: 'Windows Phone' os_replacement: 'Windows Phone'
- regex: '(Windows ?Mobile)' - regex: '(Windows ?Mobile)'
os_replacement: 'Windows Mobile' os_replacement: 'Windows Mobile'
- regex: '(Windows 10)'
os_replacement: 'Windows'
os_v1_replacement: '10'
- regex: '(Windows (?:NT 5\.2|NT 5\.1))' - regex: '(Windows (?:NT 5\.2|NT 5\.1))'
os_replacement: 'Windows' os_replacement: 'Windows'
os_v1_replacement: 'XP' os_v1_replacement: 'XP'
...@@ -559,9 +569,6 @@ os_parsers: ...@@ -559,9 +569,6 @@ os_parsers:
- regex: '(Windows NT 10\.0)' - regex: '(Windows NT 10\.0)'
os_replacement: 'Windows' os_replacement: 'Windows'
os_v1_replacement: '10' os_v1_replacement: '10'
- regex: '(Windows 10)'
os_replacement: 'Windows'
os_v1_replacement: '10'
- regex: '(Windows NT 5\.0)' - regex: '(Windows NT 5\.0)'
os_replacement: 'Windows' os_replacement: 'Windows'
os_v1_replacement: '2000' os_v1_replacement: '2000'
...@@ -784,6 +791,8 @@ os_parsers: ...@@ -784,6 +791,8 @@ os_parsers:
- regex: '\b(iOS[ /]|iOS; |iPhone(?:/| v|[ _]OS[/,]|; | OS : |\d,\d/|\d,\d; )|iPad/)(\d{1,2})[_\.](\d{1,2})(?:[_\.](\d+)|)' - regex: '\b(iOS[ /]|iOS; |iPhone(?:/| v|[ _]OS[/,]|; | OS : |\d,\d/|\d,\d; )|iPad/)(\d{1,2})[_\.](\d{1,2})(?:[_\.](\d+)|)'
os_replacement: 'iOS' os_replacement: 'iOS'
- regex: '\((iOS);' - regex: '\((iOS);'
- regex: '(watchOS)/(\d+)\.(\d+)(?:\.(\d+)|)'
os_replacement: 'WatchOS'
- regex: 'Outlook-(iOS)/\d+\.\d+\.prod\.iphone' - regex: 'Outlook-(iOS)/\d+\.\d+\.prod\.iphone'
- regex: '(iPod|iPhone|iPad)' - regex: '(iPod|iPhone|iPad)'
os_replacement: 'iOS' os_replacement: 'iOS'
...@@ -868,7 +877,7 @@ os_parsers: ...@@ -868,7 +877,7 @@ os_parsers:
- regex: '(hpw|web)OS/(\d+)\.(\d+)(?:\.(\d+)|)' - regex: '(hpw|web)OS/(\d+)\.(\d+)(?:\.(\d+)|)'
os_replacement: 'webOS' os_replacement: 'webOS'
- regex: '(VRE);' - regex: '(VRE);'
- regex: '(Fedora|Red Hat|PCLinuxOS|Puppy|Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Slackware|(?:Free|Open|Net|\b)BSD)[/ ](\d+)\.(\d+)(?:\.(\d+)|)(?:\.(\d+)|)' - regex: '(Fedora|Red Hat|PCLinuxOS|Puppy|Ubuntu|Kindle|Bada|Sailfish|Lubuntu|BackTrack|Slackware|(?:Free|Open|Net|\b)BSD)[/ ](\d+)\.(\d+)(?:\.(\d+)|)(?:\.(\d+)|)'
- regex: '(Linux)[ /](\d+)\.(\d+)(?:\.(\d+)|).*gentoo' - regex: '(Linux)[ /](\d+)\.(\d+)(?:\.(\d+)|).*gentoo'
os_replacement: 'Gentoo' os_replacement: 'Gentoo'
- regex: '\((Bada);' - regex: '\((Bada);'
...@@ -895,7 +904,7 @@ device_parsers: ...@@ -895,7 +904,7 @@ device_parsers:
device_replacement: 'Spider' device_replacement: 'Spider'
brand_replacement: 'Spider' brand_replacement: 'Spider'
model_replacement: 'Feature Phone' model_replacement: 'Feature Phone'
- regex: ' PTST/\d+\.\d+$' - regex: ' PTST/\d+(?:\.)?\d+$'
device_replacement: 'Spider' device_replacement: 'Spider'
brand_replacement: 'Spider' brand_replacement: 'Spider'
- regex: 'X11; Datanyze; Linux' - regex: 'X11; Datanyze; Linux'
...@@ -1539,6 +1548,10 @@ device_parsers: ...@@ -1539,6 +1548,10 @@ device_parsers:
device_replacement: 'Huawei $1' device_replacement: 'Huawei $1'
brand_replacement: 'Huawei' brand_replacement: 'Huawei'
model_replacement: '$1' model_replacement: '$1'
- regex: '; *((?:[A-Z]{3})\-L[A-Za0-9]{2})[\)]'
device_replacement: 'Huawei $1'
brand_replacement: 'Huawei'
model_replacement: '$1'
- regex: '; *HTC[ _]([^;]+); Windows Phone' - regex: '; *HTC[ _]([^;]+); Windows Phone'
device_replacement: 'HTC $1' device_replacement: 'HTC $1'
brand_replacement: 'HTC' brand_replacement: 'HTC'
...@@ -2135,7 +2148,7 @@ device_parsers: ...@@ -2135,7 +2148,7 @@ device_parsers:
device_replacement: 'OnePlus $1' device_replacement: 'OnePlus $1'
brand_replacement: 'OnePlus' brand_replacement: 'OnePlus'
model_replacement: '$1' model_replacement: '$1'
- regex: '; (ONEPLUS [a-zA-Z]\d+) Build/' - regex: '; (ONEPLUS [a-zA-Z]\d+)(?: Build/|)'
device_replacement: 'OnePlus $1' device_replacement: 'OnePlus $1'
brand_replacement: 'OnePlus' brand_replacement: 'OnePlus'
model_replacement: '$1' model_replacement: '$1'
...@@ -2324,6 +2337,10 @@ device_parsers: ...@@ -2324,6 +2337,10 @@ device_parsers:
device_replacement: 'Samsung $1' device_replacement: 'Samsung $1'
brand_replacement: 'Samsung' brand_replacement: 'Samsung'
model_replacement: '$1' model_replacement: '$1'
- regex: '; *((?:SC)\-[A-Za-z0-9 ]+)(/?[^ ]*|)\)'
device_replacement: 'Samsung $1'
brand_replacement: 'Samsung'
model_replacement: '$1'
- regex: ' ((?:SCH)\-[A-Za-z0-9 ]+)(/?[^ ]*|) Build' - regex: ' ((?:SCH)\-[A-Za-z0-9 ]+)(/?[^ ]*|) Build'
device_replacement: 'Samsung $1' device_replacement: 'Samsung $1'
brand_replacement: 'Samsung' brand_replacement: 'Samsung'
...@@ -2332,6 +2349,10 @@ device_parsers: ...@@ -2332,6 +2349,10 @@ device_parsers:
device_replacement: 'Samsung $1' device_replacement: 'Samsung $1'
brand_replacement: 'Samsung' brand_replacement: 'Samsung'
model_replacement: '$1' model_replacement: '$1'
- regex: '; *((?:SCH|SGH|SHV|SHW|SPH|SC|SM)\-[A-Za-z0-9]{5,6})[\)]'
device_replacement: 'Samsung $1'
brand_replacement: 'Samsung'
model_replacement: '$1'
- regex: '; *(SH\-?\d\d[^;/]+|SBM\d[^;/]+) Build' - regex: '; *(SH\-?\d\d[^;/]+|SBM\d[^;/]+) Build'
device_replacement: '$1' device_replacement: '$1'
brand_replacement: 'Sharp' brand_replacement: 'Sharp'
...@@ -2667,6 +2688,18 @@ device_parsers: ...@@ -2667,6 +2688,18 @@ device_parsers:
device_replacement: 'XiaoMi $1' device_replacement: 'XiaoMi $1'
brand_replacement: 'XiaoMi' brand_replacement: 'XiaoMi'
model_replacement: '$1' model_replacement: '$1'
- regex: '; *((Mi|MI|HM|MI-ONE|Redmi)[ -](NOTE |Note |)[^;/\)]*)'
device_replacement: 'XiaoMi $1'
brand_replacement: 'XiaoMi'
model_replacement: '$1'
- regex: '; *(MIX) (Build|MIUI)/'
device_replacement: 'XiaoMi $1'
brand_replacement: 'XiaoMi'
model_replacement: '$1'
- regex: '; *((MIX) ([^;/]*)) (Build|MIUI)/'
device_replacement: 'XiaoMi $1'
brand_replacement: 'XiaoMi'
model_replacement: '$1'
- regex: '; *XOLO[ _]([^;/]*tab.*) Build' - regex: '; *XOLO[ _]([^;/]*tab.*) Build'
regex_flag: 'i' regex_flag: 'i'
device_replacement: 'Xolo $1' device_replacement: 'Xolo $1'
...@@ -2978,6 +3011,10 @@ device_parsers: ...@@ -2978,6 +3011,10 @@ device_parsers:
device_replacement: '$1' device_replacement: '$1'
brand_replacement: 'Apple' brand_replacement: 'Apple'
model_replacement: '$1' model_replacement: '$1'
- regex: '(Watch)(\d+,\d+)'
device_replacement: 'Apple $1'
brand_replacement: 'Apple'
model_replacement: 'Apple $1 $2'
- regex: '(Apple Watch)(?:;| Simulator;)' - regex: '(Apple Watch)(?:;| Simulator;)'
device_replacement: '$1' device_replacement: '$1'
brand_replacement: 'Apple' brand_replacement: 'Apple'
...@@ -3026,6 +3063,10 @@ device_parsers: ...@@ -3026,6 +3063,10 @@ device_parsers:
device_replacement: 'Asus $1' device_replacement: 'Asus $1'
brand_replacement: 'Asus' brand_replacement: 'Asus'
model_replacement: '$1' model_replacement: '$1'
- regex: '(?:ASUS)_([A-Za-z0-9\-]+)'
device_replacement: 'Asus $1'
brand_replacement: 'Asus'
model_replacement: '$1'
- regex: '\bBIRD[ \-\.]([A-Za-z0-9]+)' - regex: '\bBIRD[ \-\.]([A-Za-z0-9]+)'
device_replacement: 'Bird $1' device_replacement: 'Bird $1'
brand_replacement: 'Bird' brand_replacement: 'Bird'
...@@ -3058,6 +3099,10 @@ device_parsers: ...@@ -3058,6 +3099,10 @@ device_parsers:
device_replacement: 'Huawei $1' device_replacement: 'Huawei $1'
brand_replacement: 'Huawei' brand_replacement: 'Huawei'
model_replacement: '$1' model_replacement: '$1'
- regex: 'HUAWEI ([A-Za-z0-9\-]+)'
device_replacement: 'Huawei $1'
brand_replacement: 'Huawei'
model_replacement: '$1'
- regex: 'vodafone([A-Za-z0-9]+)' - regex: 'vodafone([A-Za-z0-9]+)'
device_replacement: 'Huawei Vodafone $1' device_replacement: 'Huawei Vodafone $1'
brand_replacement: 'Huawei' brand_replacement: 'Huawei'
...@@ -3235,26 +3280,26 @@ device_parsers: ...@@ -3235,26 +3280,26 @@ device_parsers:
device_replacement: 'Generic Smartphone' device_replacement: 'Generic Smartphone'
brand_replacement: 'Generic' brand_replacement: 'Generic'
model_replacement: 'Smartphone' model_replacement: 'Smartphone'
- regex: 'Android[\- ][\d]+\.[\d]+; [A-Za-z]{2}\-[A-Za-z]{0,2}; WOWMobile (.+) Build[/ ]' - regex: 'Android[\- ][\d]+\.[\d]+; [A-Za-z]{2}\-[A-Za-z]{0,2}; WOWMobile (.+)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: 'Android[\- ][\d]+\.[\d]+\-update1; [A-Za-z]{2}\-[A-Za-z]{0,2} *; *(.+?) Build[/ ]' - regex: 'Android[\- ][\d]+\.[\d]+\-update1; [A-Za-z]{2}\-[A-Za-z]{0,2} *; *(.+?)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[A-Za-z]{2}[_\-][A-Za-z]{0,2}\-? *; *(.+?) Build[/ ]' - regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[A-Za-z]{2}[_\-][A-Za-z]{0,2}\-? *; *(.+?)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[A-Za-z]{0,2}\- *; *(.+?) Build[/ ]' - regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[A-Za-z]{0,2}\- *; *(.+?)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[a-z]{0,2}[_\-]?[A-Za-z]{0,2};? Build[/ ]' - regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *[a-z]{0,2}[_\-]?[A-Za-z]{0,2};?( Build[/ ]|\))'
device_replacement: 'Generic Smartphone' device_replacement: 'Generic Smartphone'
brand_replacement: 'Generic' brand_replacement: 'Generic'
model_replacement: 'Smartphone' model_replacement: 'Smartphone'
- regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *\-?[A-Za-z]{2}; *(.+?) Build[/ ]' - regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|); *\-?[A-Za-z]{2}; *(.+?)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|)(?:;.*|); *(.+?) Build[/ ]' - regex: 'Android[\- ][\d]+(?:\.[\d]+)(?:\.[\d]+|)(?:;.*|); *(.+?)( Build[/ ]|\))'
brand_replacement: 'Generic_Android' brand_replacement: 'Generic_Android'
model_replacement: '$1' model_replacement: '$1'
- regex: '(GoogleTV)' - regex: '(GoogleTV)'
......
...@@ -210,7 +210,7 @@ github.com/stretchr/testify/require ...@@ -210,7 +210,7 @@ github.com/stretchr/testify/require
github.com/stretchr/testify/assert github.com/stretchr/testify/assert
# github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf # github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
github.com/teris-io/shortid github.com/teris-io/shortid
# github.com/ua-parser/uap-go v0.0.0-20190303233514-1004ccd816b3 # github.com/ua-parser/uap-go v0.0.0-20190826212731-daf92ba38329
github.com/ua-parser/uap-go/uaparser github.com/ua-parser/uap-go/uaparser
# github.com/uber/jaeger-client-go v2.16.0+incompatible # github.com/uber/jaeger-client-go v2.16.0+incompatible
github.com/uber/jaeger-client-go/config github.com/uber/jaeger-client-go/config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment