intoli / user-agents

A JavaScript library for generating random user agents with data that's updated daily.
Other
981 stars 51 forks source link

Does the library give "sec-ch-ua*" headers? #38

Open iPherian opened 3 years ago

iPherian commented 3 years ago

My chrome (windows desktop) sends these headers related to user-agent / device identification:

sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36

Obviously this pkg provides User-Agent, but does it give things like sec-ch-ua*? It'd be pretty cool if it did, closer to a real world browser that way.

iPherian commented 3 years ago

Admittedly, it may be harder than it seemed at first glance, found a commit that says Chrome partially randomizes the sec-ch-ua header:

https://github.com/chromium/chromium/commit/19ad8d3cab21013ce2d40cf2ec84267bb04b08ec

brunonevesy commented 5 months ago

My chrome (windows desktop) sends these headers related to user-agent / device identification:

sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36

Obviously this pkg provides User-Agent, but does it give things like sec-ch-ua*? It'd be pretty cool if it did, closer to a real world browser that way.

This is really important