Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(internet): update to simplified modern user-agent list #3324

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

matthewmayer
Copy link
Contributor

@matthewmayer matthewmayer commented Dec 5, 2024

fix #3323

Here are a bunch of sample user agents generated from the patterns:

 faker.helpers.multiple(()=>faker.internet.userAgent(), {count:100})
[
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/105.0',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/546.81.24 (KHTML, like Gecko) Chrome/67.7.9.0 Safari/588.54.5',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/587.4.28 (KHTML, like Gecko) Chrome/63.1.0.8 Safari/545.95.38',
  'Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/111.0',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/583.52.23 (KHTML, like Gecko) Version/16.1 Safari/594.9.77',
  'Mozilla/5.0 (Linux; Android 6; SM-G998B) AppleWebKit/577.2 (KHTML, like Gecko) Chrome/107.6.2.9 Mobile Safari/569.59',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Windows NT 6.0; Win64; x64) AppleWebKit/603.53 (KHTML, like Gecko) Chrome/111.3.5.7 Safari/593.82 Edg/125.8.4.4',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/552.96.97 (KHTML, like Gecko) Chrome/82.2.6.5 Safari/588.16.31',
  'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.1; Trident/5.0)',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/543.63.47 (KHTML, like Gecko) Version/10_3 Mobile/15E148 Safari/564.50',
  'FakerBot/3.4.0',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/562.81.49 (KHTML, like Gecko) Version/16.1 Safari/565.42.32',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/601.57.71 (KHTML, like Gecko) Chrome/95.6.5.5 Safari/554.24.55',
  'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.2; Trident/5.0)',
  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 10.0; Trident/4.0)',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:120.0) Gecko/20100101 Firefox/120.0',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Firefox/121.0',
  'Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/96.0',
  'FakerBot/0.4.2',
  'Mozilla/5.0 (Linux; Android 13; SM-G998B) AppleWebKit/537.65 (KHTML, like Gecko) Chrome/89.3.6.2 Mobile Safari/560.65',
  'Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:75.0) Gecko/20100101 Firefox/78.0',
  'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.1; Trident/7.0)',
  'FakerBot/2.3.9',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/572.5.43 (KHTML, like Gecko) Chrome/88.9.6.9 Safari/541.31.28',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'FakerBot/9.1.6',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.29.64 (KHTML, like Gecko) Version/16.1 Safari/566.74.28',
  'FakerBot/8.9.2',
  'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/597.19 (KHTML, like Gecko) Chrome/130.6.5.2 Safari/558.5 Edg/112.4.1.6',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/553.24.90 (KHTML, like Gecko) Version/16.1 Safari/572.35.11',
  'Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/597.16 (KHTML, like Gecko) Chrome/58.6.9.7 Safari/551.49 Edg/125.0.0.2',
  'Mozilla/5.0 (Windows NT 6.0; Win64; x64) AppleWebKit/596.63 (KHTML, like Gecko) Chrome/57.7.3.1 Safari/536.53 Edg/125.8.6.6',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/562.75.35 (KHTML, like Gecko) Version/16.1 Safari/561.59.5',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/123.0',
  'Mozilla/5.0 (Linux; Android 10; SM-T800) AppleWebKit/552.62 (KHTML, like Gecko) Chrome/67.3.4.3 Mobile Safari/588.64',
  'Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 10.0; Trident/5.0)',
  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; Trident/5.0)',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 16_4 like Mac OS X) AppleWebKit/601.59.74 (KHTML, like Gecko) Version/14_1 Mobile/15E148 Safari/605.64',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/553.80.34 (KHTML, like Gecko) Version/12_3 Mobile/15E148 Safari/592.61',
  'FakerBot/5.6.3',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/573.75.95 (KHTML, like Gecko) Chrome/84.6.5.1 Safari/538.74.91',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/101.0',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'FakerBot/2.2.8',
  'Mozilla/5.0 (Linux; Android 12; SM-G998N) AppleWebKit/579.27 (KHTML, like Gecko) Chrome/89.6.2.5 Mobile Safari/605.97',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/577.63.44 (KHTML, like Gecko) Chrome/98.8.5.4 Safari/588.69.12',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/562.98.37 (KHTML, like Gecko) Version/13_0 Mobile/15E148 Safari/590.30',
  'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/541.3 (KHTML, like Gecko) Chrome/126.3.8.3 Safari/536.1 Edg/120.5.2.7',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/557.26.67 (KHTML, like Gecko) Version/14_0 Mobile/15E148 Safari/541.35',
  'Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/92.0',
  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 10.0; Trident/5.0)',
  'FakerBot/5.7.9',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:122.0) Gecko/20100101 Firefox/85.0',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 18_3 like Mac OS X) AppleWebKit/581.38.78 (KHTML, like Gecko) Version/14_0 Mobile/15E148 Safari/545.45',
  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 6.1; Trident/6.0)',
  'Mozilla/5.0 (X11; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/85.0',
  'Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/111.0',
  'Mozilla/5.0 (Linux; Android 6; SM-T800) AppleWebKit/586.72 (KHTML, like Gecko) Chrome/74.6.5.9 Mobile Safari/594.93',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Windows NT 5.2; Win64; x64) AppleWebKit/594.39 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/604.52 Edg/111.4.3.6',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/584.80.39 (KHTML, like Gecko) Version/16.1 Safari/603.90.8',
  'Mozilla/5.0 (Linux; Android 6; SM-G998U) AppleWebKit/551.88 (KHTML, like Gecko) Chrome/67.1.0.9 Mobile Safari/604.47',
  'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.2; Trident/7.0)',
  'Mozilla/5.0 (Linux; Android 10; SM-T800) AppleWebKit/548.19 (KHTML, like Gecko) Chrome/78.6.4.6 Mobile Safari/541.91',
  'Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/112.0',
  'FakerBot/1.4.8',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/587.88.78 (KHTML, like Gecko) Version/11_2 Mobile/15E148 Safari/539.78',
  'Mozilla/5.0 (X11; Linux x86_64; rv:116.0) Gecko/20100101 Firefox/108.0',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/591.63.8 (KHTML, like Gecko) Chrome/122.5.1.7 Safari/595.27.26',
  'Mozilla/5.0 (Linux; Android 7; SM-G998U) AppleWebKit/599.86 (KHTML, like Gecko) Chrome/104.5.6.7 Mobile Safari/566.6',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 5.2; Trident/4.0)',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/559.23.50 (KHTML, like Gecko) Version/16.1 Safari/596.17.37',
  'Googlebot/2.1 (+http://www.google.com/bot.html)',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/576.72.68 (KHTML, like Gecko) Chrome/93.8.7.5 Safari/546.16.35',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/126.0',
  'FakerBot/6.9.4',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/570.91.62 (KHTML, like Gecko) Chrome/63.2.4.6 Safari/569.53.52',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/93.0',
  'Mozilla/5.0 (Linux; Android 11; SM-G998P) AppleWebKit/566.36 (KHTML, like Gecko) Chrome/61.4.5.9 Mobile Safari/547.98',
  'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 5.1; Trident/5.0)',
  'Mozilla/5.0 (Linux; Android 8; SM-G998U) AppleWebKit/584.7 (KHTML, like Gecko) Chrome/122.5.9.8 Mobile Safari/604.3',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/604.4.75 (KHTML, like Gecko) Version/16.1 Safari/555.13.95',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 10_0 like Mac OS X) AppleWebKit/551.39.86 (KHTML, like Gecko) Version/18_2 Mobile/15E148 Safari/573.78',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 17_1 like Mac OS X) AppleWebKit/591.90.96 (KHTML, like Gecko) Version/15_1 Mobile/15E148 Safari/563.72',
  'FakerBot/0.8.6',
  'FakerBot/5.4.0',
  'Mozilla/5.0 (iPhone; CPU iPhone OS 13_4 like Mac OS X) AppleWebKit/573.76.8 (KHTML, like Gecko) Version/18_2 Mobile/15E148 Safari/575.17',
  'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/547.9.59 (KHTML, like Gecko) Version/16.1 Safari/567.67.60',
  'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/568.61 (KHTML, like Gecko) Chrome/58.4.7.8 Safari/574.1 Edg/128.1.3.3',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/582.53.59 (KHTML, like Gecko) Chrome/67.1.9.6 Safari/575.45.66',
  'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_15_7) AppleWebKit/577.1.74 (KHTML, like Gecko) Chrome/94.9.9.0 Safari/572.45.78',
  'FakerBot/0.4.1'
]

@matthewmayer matthewmayer requested a review from a team as a code owner December 5, 2024 10:01
Copy link

netlify bot commented Dec 5, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 3fa543d
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/6759eabad133ae0008f5afa0
😎 Deploy Preview https://deploy-preview-3324.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.97%. Comparing base (5ec4a6c) to head (3fa543d).
Report is 2 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff            @@
##             next    #3324    +/-   ##
========================================
  Coverage   99.97%   99.97%            
========================================
  Files        2807     2807            
  Lines      217087   216843   -244     
  Branches      969      937    -32     
========================================
- Hits       217029   216792   -237     
+ Misses         58       51     -7     
Files with missing lines Coverage Δ
src/definitions/internet.ts 100.00% <ø> (ø)
src/locales/base/internet/index.ts 100.00% <100.00%> (ø)
src/locales/base/internet/user_agent_pattern.ts 100.00% <100.00%> (ø)
src/modules/internet/index.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

src/definitions/internet.ts Outdated Show resolved Hide resolved
@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent m: internet Something is referring to the internet module labels Dec 5, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Dec 5, 2024
Copy link
Member

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt have time to check all patterns yet.

@ST-DDT ST-DDT requested review from a team December 5, 2024 14:21
@ST-DDT ST-DDT added this pull request to the merge queue Dec 13, 2024
Merged via the queue into faker-js:next with commit 3c7abb5 Dec 13, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: feature Request for new feature m: internet Something is referring to the internet module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use simplified modern user-agents
3 participants