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] Support Custom User Agent for browser apps #3191

Merged
merged 6 commits into from
Nov 4, 2023
Merged

Conversation

flavioislima
Copy link
Member

@flavioislima flavioislima commented Nov 3, 2023

Implements #2757
Also added a Full-Screen option

userAgent1

Screenshot_20231103_125404

image

Fullscreen setting:
image

Custom UA used for youtube tv: Mozilla/5.0 (PS4; Leanback Shell) Gecko/20100101 Firefox/65.0 LeanbackShell/01.00.01.75 Sony PS4/ (PS4, , no, CH)


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@flavioislima flavioislima linked an issue Nov 3, 2023 that may be closed by this pull request
@flavioislima flavioislima added the pr:ready-for-review Feature-complete, ready for the grind! :P label Nov 3, 2023
@Doc-4
Copy link

Doc-4 commented Nov 3, 2023

Very cool! Thanks for the implementation, looking forward to testing it. Does this also implement spoofing UA client hints? If it doesn't, some sites might see through it.

@flavioislima
Copy link
Member Author

Very cool! Thanks for the implementation, looking forward to testing it. Does this also implement spoofing UA client hints? If it doesn't, some sites might see through it.

it does something similar to the other PR that was linked but I did not tested it. Feel free to test it with the appimage before I merge it and release it.

@Doc-4
Copy link

Doc-4 commented Nov 3, 2023

Tested with no override, chrome for windows and edge for windows. It may not necessarily be directly related, but this
doesn't do anything to fix accessing sites such as GeForce Now. They don't work at all from the beginning to make the site believe it's stock chrome or edge, UA override or no.
IMG_20231103_133748

@flavioislima
Copy link
Member Author

Tested with no override, chrome for windows and edge for windows. It may not necessarily be directly related, but this doesn't do anything to fix accessing sites such as GeForce Now. They don't work at all from the beginning to make the site believe it's stock chrome or edge, UA override or no. IMG_20231103_133748

maybe we need to run Heroic with this argument?
'--spoof-windows'

Looking at the original code for gfn it seems like it. I will try as well.

But, this won't be a blocker to this PR and we can investigate and improve this further on.

@flavioislima
Copy link
Member Author

Can you try this user agent?
Mozilla/5.0 (Macintosh; Intel Mac OS X 14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

@flavioislima
Copy link
Member Author

It works for me but it does not show Genshin Impact.
image

So maybe this spoof windows flag is not working or genshin Impact was removed from it.
I have no idea.

@Doc-4
Copy link

Doc-4 commented Nov 3, 2023

It works for me but it does not show Genshin Impact. image

So maybe this spoof windows flag is not working or genshin Impact was removed from it. I have no idea.

The aforementioned issue in GFN was followed up by spoof windows no longer being maintained due to it breaking due to something changed on the website and the developer not wanting to continue maintaining the function. It's up to someone else to figure out exactly how to fix it, some people more technically knowledgeable about electron were discussing potential solutions in the rest of that issue, but since the developer isn't going to implement them, if we want that functionality it would have to be someone else.

@flavioislima
Copy link
Member Author

@Doc-4 I am not an electron expert as well unfortunatelly 🤷🏽
Well, at least it is working, I cannot guarantee that every website and game will work though.

@Doc-4
Copy link

Doc-4 commented Nov 3, 2023

@Doc-4 I am not an electron expert as well unfortunatelly 🤷🏽 Well, at least it is working, I cannot guarantee that every website and game will work though.

Of course, that's understandable. It's still my hope that at some point a solid sandbox solution for web apps will exist, and if that was heroic, that'd be pretty cool. Genshin's a good example of something where this is the best solution, as other solutions to incompatibility on linux require self hosting cloud gaming or unofficial, unauthorized launchers.
This is the easiest gap to bridge, IMO. And if it's made well for one web app, it'll work for just about any web app that tries to serve an inferior experience to linux.

@flavioislima flavioislima merged commit 97585d8 into main Nov 4, 2023
13 checks passed
@flavioislima flavioislima deleted the feat/browser_ua branch November 4, 2023 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow settings Custom User Agent for Web Sideloads
2 participants