Skip to content

Commit

Permalink
Update of user agent versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tarampampam committed Mar 16, 2024
1 parent 9442429 commit b6700fb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].

## v3.19.0

### Changed

- Update of user agent versions

## v3.18.0

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/useragent/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class Generator implements UseragentGenerator {
// Mozilla/5.0 (Linux; Android 10; N20Pro) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.50 Mobile Safari/537.36
// Mozilla/5.0 (Linux; Android 11; CPH1907) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.50 Mobile Safari/537.36
// Mozilla/5.0 (Linux; Android 6.0.1; SM-A300FU) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.50 Mobile Safari/537.36
/Mozilla\/5\.0 \(Linux; Android (9|10|10|11); __MOBILE_VENDOR__\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/__VER__ Mobile Safari\/537\.36/,
/Mozilla\/5\.0 \(Linux; Android (12|13|13|14); __MOBILE_VENDOR__\) AppleWebKit\/537\.36 \(KHTML, like Gecko\) Chrome\/__VER__ Mobile Safari\/537\.36/,
],
},
firefox: {
Expand All @@ -95,7 +95,7 @@ export default class Generator implements UseragentGenerator {
// Mozilla/5.0 (Android 9; Mobile; rv:95.0) Gecko/95.0 Firefox/95.0
// Mozilla/5.0 (Android 7.1.1; Mobile; rv:95.0) Gecko/95.0 Firefox/95.0
// Mozilla/5.0 (Android; Tablet; Concierge; rv:25.0) Gecko/25.0 Firefox/25.0
/Mozilla\/5\.0 \(Android( (9|10|10|11)(\.[0-4]||)|); (Tablet|Mobile); rv:__VER__\) Gecko\/__VER__ Firefox\/__VER__/,
/Mozilla\/5\.0 \(Android( (12|13|13|14)(\.[0-4]||)|); (Tablet|Mobile); rv:__VER__\) Gecko\/__VER__ Firefox\/__VER__/,
],
},
safari: {
Expand Down
19 changes: 10 additions & 9 deletions src/useragent/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ abstract class Version {
export const randomChromeVersion = new class extends Version {
// all versions: https://chromereleases.googleblog.com/search/label/Desktop%20Update
private variants = {
major: {min: 114, max: 116}, // periodically we should update those values
major: {min: 122, max: 124}, // periodically we should update those values
minor: {static: 0},
patch: {min: 5735, max: 5845},
patch: {min: 6261, max: 6356},
build: {min: 194, max: 226},
}

Expand All @@ -44,7 +44,7 @@ export const randomChromeVersion = new class extends Version {
export const randomFirefoxVersion = new class extends Version {
// all versions: https://www.mozilla.org/en-US/firefox/releases/
private variants = {
major: {min: 113, max: 115}, // periodically we should update those values
major: {min: 121, max: 123}, // periodically we should update those values
minor: {static: 0},
patch: {variants: ['esr']},
}
Expand All @@ -64,10 +64,10 @@ export const randomFirefoxVersion = new class extends Version {
export const randomOperaVersion = new class extends Version {
// all versions: https://en.wikipedia.org/wiki/Opera_version_history
private variants = {
major: {min: 98, max: 100}, // periodically we should update those values
major: {min: 102, max: 108}, // periodically we should update those values
minor: {static: 0},
patch: {min: 2889, max: 4815},
build: {min: 24, max: 198},
patch: {min: 4251, max: 5067},
build: {min: 16, max: 198},
}

version(): BrowserVersion {
Expand All @@ -87,6 +87,7 @@ export const randomOperaVersion = new class extends Version {

export const randomSafariVersion = new class extends Version {
// all versions: https://en.wikipedia.org/wiki/Safari_version_history
// release notes: https://developer.apple.com/documentation/safari-release-notes/
private variants = {
major: {min: 614, max: 632}, // periodically we should update those values
minor: {min: 1, max: 36},
Expand All @@ -110,10 +111,10 @@ export const randomSafariVersion = new class extends Version {
export const randomEdgeVersion = new class extends Version {
// all versions: https://docs.microsoft.com/en-us/deployedge/microsoft-edge-relnote-stable-channel
private variants = {
major: {min: 109, max: 114}, // periodically we should update those values
major: {min: 120, max: 122}, // periodically we should update those values
minor: {static: 0},
patch: {min: 1518, max: 1823},
build: {min: 33, max: 62},
patch: {min: 2210, max: 2365},
build: {min: 61, max: 92},
}

version(): BrowserVersion {
Expand Down

0 comments on commit b6700fb

Please sign in to comment.