Improve OS detection: Windows Server series

This commit is contained in:
Faisal Salman 2025-06-21 21:37:07 +07:00
parent a9378427ed
commit 86b3cd37e2
2 changed files with 19 additions and 1 deletions

View File

@ -950,7 +950,7 @@
], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [ ], [[NAME, /N/, 'R'], [VERSION, strMapper, windowsVersionMap]], [
/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone /(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i, // Windows IoT/Mobile/Phone
// Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11 // Windows NT/3.1/95/98/ME/2000/XP/Vista/7/8/8.1/10/11
/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|vista|xp)/i /(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i
], [NAME, VERSION], [ ], [NAME, VERSION], [
/windows nt ?([\d\.\)]*)(?!.+xbox)/i, /windows nt ?([\d\.\)]*)(?!.+xbox)/i,
/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i /\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i

View File

@ -242,6 +242,15 @@
"version" : "7" "version" : "7"
} }
}, },
{
"desc" : "Windows 7",
"ua" : "Mozilla/5.0 (Windows 7 Enterprise; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6099.71 Safari/537.36",
"expect" :
{
"name" : "Windows",
"version" : "7"
}
},
{ {
"desc" : "Windows 7", "desc" : "Windows 7",
"ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)", "ua" : "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)",
@ -278,6 +287,15 @@
"version" : "10" "version" : "10"
} }
}, },
{
"desc" : "Windows Server 2012 R2",
"ua" : "Mozilla/5.0 (Windows Server 2012 R2 Standard; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.5975.80 Safari/537.36",
"expect" :
{
"name" : "Windows",
"version" : "Server 2012 R2"
}
},
{ {
"desc" : "WeChat Desktop for Windows Built-in Browser", "desc" : "WeChat Desktop for Windows Built-in Browser",
"ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400", "ua" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 MicroMessenger/6.5.2.501 NetType/WIFI WindowsWechat QBCore/3.43.901.400 QQBrowser/9.0.2524.400",