yellows8 / browserhax_site

Source for the 3DS browserhax site.
9 stars 1 forks source link

Browserhax won't load when 'Use mobile versions' is selected #1

Closed thejsa closed 8 years ago

thejsa commented 8 years ago

So, I just opened up Browserhax and noticed it doesn't want to load if the New 3DS has its pretend-to-be-an-iPhone mode enabled.

I looked through the code in this repo and I noticed you only look at the User-Agent header. The New 3DS actually sends its normal user agent as the X-Device-User-Agent header! (accessible in PHP with $_SERVER['HTTP_X_DEVICE_USER_AGENT'])

Hope this helps.

yellows8 commented 8 years ago

"The New 3DS actually sends its normal user agent as the X-Device-User-Agent header!" Oh never knew that, thanks.

https://github.com/yellows8/3ds_browserhax_common#supported-titles-and-versions "... Due to this, when accessing hax with this, the New3DS system web-browser must be set to use the normal user-agent, not the mobile user-agent(the mobile user-agent is the same for all versions)."

thejsa commented 8 years ago

You're welcome. :-)

Yes, I noticed that, hence this post :P

I implemented the X-Device-User-Agent functionality of my fork of this (will upload to GitHub soon) JailbreakMii (3dshaxx.nonm.co.uk) :-)

thejsa commented 8 years ago

Argh, can't type today. *functionality /into/ my fork of this

thejsa commented 8 years ago

By the way, this might help:

$ua = $_SERVER['HTTP_X_DEVICE_USER_AGENT'] ?: $_SERVER['HTTP_USER_AGENT'];
yellows8 commented 8 years ago

Thanks. I implemented this locally, but it's not actually useful for New3DS atm since this extra header doesn't get sent during the actual video HTTP download. :|

EDIT: Due to video-dl mentioned above I have reverted all UA changes for this locally.