timsueberkrueb / webber

Making webapps superfluous since 2019
https://open-store.io/app/webber.timsueberkrueb
Other
14 stars 9 forks source link

Feature Request: Set custom useragent #32

Closed theARE closed 3 years ago

theARE commented 4 years ago

Some sites regretfully limit their functionality not by what the browser is capable of, but rather by what the browser identifies itself as. They have a hard coded list of browser / OS combinations they support and will refuse connections from anything else.

Morph is perfectly capable of rendering these sites, it's just that they've taken arbitrary decisions on what is supported and isn't.

To get around such troublesome restrictions it would be great if Webber could provide the option of overriding the browser useragent that is presented to the site so that it could be set to a something more mainstream like Chrome on Android, Safari on iOS etc.

This could take the form of a Custom UserAgent free text field or could have pre-populated presets as some of the desktop browser user agent spoofing addons do (or a combination thereof).

I note that the Skype webapp in the Open Store (https://open-store.io/app/skype.rubencarneiro) has a change note of "# 1.3 Update user agent string with the latest Chrome." which would indicate that it is indeed possible to manipulate the user agent string.

Having such a feature baked in would greatly increase the number of functional webapps that can be generated by Webber.

timsueberkrueb commented 4 years ago

Yes, this is supported by the webapp container. Actually, Webber already sets a custom user agent if one selects the Enable desktop mode option under Customize > Visuals & Behavior.

At the moment, the user agent is:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/999.9.9999.999 Safari/537.36 

I would be happy for any suggestions for good user agents (both for mobile and desktop) to include which don't require me to continuously update them. I assume nearly all sites only complain about browsers they consider too old rather than too new, so can we just use ridiculously high version numbers?

theARE commented 4 years ago

If there was a list of UAs available somewhere online that could be automatically pulled in when a new build of Webber is created would that be an option?

There's a bunch of user agent switcher extensions for desktop browsers amd they'd face the same update challange. Perhaps there's a common source from which they pull? Will have a dig around, see if I can find something

timsueberkrueb commented 4 years ago

Yeah, if the source is reliable, that would certainly be worth a look.

theARE commented 4 years ago

Presumably you wouldn't want a huge long list though

You'd probably want the useragents of a couple of current flagship Android phones, possibly an iPhone or two and maybe a few desktop browser options?

timsueberkrueb commented 3 years ago

https://user-agents.net looks like a potential source, they even support some API requests. However, Webber won't be able to automatically update the user agent. Browser versions get old quickly and some websites might eventually stop supporting the chosen User Agent.

theARE commented 3 years ago

I would say that that's fine as long as the user understands that they might have to regenerate their app periodically

It's not like it's a difficult process to regenerate an app should a website stop supporting a particular useragent

Having a functional app in the interim outweighs the negative in my opinion

On Saturday, 3 October 2020, Tim notifications@github.com wrote:

https://user-agents.net looks like a potential source, they even support some API requests. However, Webber won't be able to automatically update the user agent. Browser versions get old quickly and some websites might eventually stop supporting the chosen User Agent.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/timsueberkrueb/webber/issues/32#issuecomment-703088447, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADDE5B7H7AL52Z4SCAL5TDSI4C5TANCNFSM4OANWCBQ .

gbdomubpkm commented 3 years ago

Hi. Do you have a working test click with this feature ?

gbdomubpkm commented 2 years ago

Ok. I saw your RC click and did a try with a https://ipleak.net/ webapp and Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0 user agent 🙂