Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,806,147 Members 48,673 Now Online
XDA Developers Android and Mobile Development Forum

[APP][ADD-ON] Firefox Mobile Add-On to change the X-Forwarded-For Header

Tip us?
(Last edited by michaelmotes; 17th October 2012 at 11:10 PM.)
michaelmotes's Avatar
Senior Member - OP
Thanks Meter 66
Posts: 119
Join Date: Feb 2012
Arrow [APP][ADD-ON] Firefox Mobile Add-On to change the X-Forwarded-For Header

The add-on will allow a user to set the X-Forwarded-For header using Firefox Mobile.

Download Here
or Here

I got tired of looking for a way to do this, so I did it my self and thought I would share.

Tested with Firefox Mobile 16.0.1.
Minimum version: 15.0
Maximum version: 16.*

With this add on for firefox, a mobile user can access content from a website that restricts users to a certain region.

For instance, my mobile phone connects to gateways in Oklahoma or Texas, it switches between the two, to connect to the internet. But, I live in Arkansas. So when using watchESPN website to stream football games, if the game is blacked out in the the state of my gateway, then watchESPN will block me from watching the game, even if it isn't blocked in Arkansas.

However, if you set the X-Forwarded-For header to an IP from a state that isn't blacked-out then watchESPN works. To find an IP just google "(state) ip address" and some example IPs or IP ranges should appear.

This is based on code by Jakob Landbo, his X-Forwarded-For add-on for Firefox Desktop, which is based on this MDN article. To recompile it for Firefox Mobile, I had to change the entire way the preferences (IP setting) worked, import component utility services explicitly, and build it against the latest Add-On SDK with the "--force-mobile" and "--mobile-app firefox" commands. Rewriting the preferences code to work with Firefox Mobile was the brunt of what I did.
The Following 19 Users Say Thank You to michaelmotes For This Useful Post: [ Click to Expand ]
Senior Member
Thanks Meter 294
Posts: 1,285
Join Date: Mar 2012
How can we install it ?
Press Thanks if I was helpful

[List][Guide] Official Samsung JellyBean Leak guides, Roms and Kernels

[Tutorial][Guide]Tips & Tweaks which Don't require Root

Push Samsung to release Exynos Source Code!

If you get your dropbox from here we both will win extra 500mb of storage. To utilize it please do Install the dropbox client on your device.

Got a dropbox? How about a lifetime free VPS (Private Server)!
rock4hell's Avatar
Senior Member
Thanks Meter 20
Posts: 114
Join Date: Oct 2012
Location: Ahmedabad
nice +1
karmakula's Avatar
Thanks Meter 5
Posts: 69
Join Date: Jan 2011
Good add on but how do we install it or use it???
malavan's Avatar
Senior Member
Thanks Meter 511
Posts: 2,341
Join Date: Jan 2009
Location: stockholm
Originally Posted by karmakula View Post
Good add on but how do we install it or use it???

(Last edited by hedphones; 31st October 2012 at 07:23 PM.) Reason: Tested
Junior Member
Thanks Meter 3
Posts: 20
Join Date: Sep 2012
Can this be used to watch hulu or something from Canada?

EDIT: YES IT CAN!!! Thanks Dev!
Junior Member
Thanks Meter 1
Posts: 11
Join Date: Apr 2008
Originally Posted by hedphones View Post
Can this be used to watch hulu or something from Canada?

EDIT: YES IT CAN!!! Thanks Dev!
Errr, no. It can be used to browse the site, but doesn't seem to work with streaming. I tried a few IP Addresses from Dallas and Houston, all of which gave me a geographical error when I tried to stream on Hulu.
qreffie's Avatar
Senior Member
Thanks Meter 28
Posts: 470
Join Date: Sep 2010
Location: Seattle
Can this be used to watch/listen to BBC radio/TV shows and various other world streaming services? I've been wanting to get BBC Radio 1 and 1Xtra streaming to my phone for a while now as well as use some other UK based Television shows that don't allow US customers to stream.
Current Phone:
Nexus 4 (Stock, Rooted)

Previous Phones:
Galaxy Nexus GSM - Stock 4.2 (from bixie), Nexus S (Stock 4.1.2), Samsung Vibrant (rooted, unlocked, hardware lock fixed, FFC mod Currently on an extended loan to a friend), G1 (Rooted running CM6, Amon_RA Recovery)

Future Phone:
The next Nexus (Hopefully made by Sony or ***Nokia***)
michaelmotes's Avatar
Senior Member - OP
Thanks Meter 66
Posts: 119
Join Date: Feb 2012
To install it just visit the download link from Firefox mobile and Firefox will install it. Then, go to the add on menu to change the IP that it sends.

This just adds an X-Forwarded-For header to all requests, so any page that looks for that header to determine where you are will be fooled. I know watchESPN works this way. The others, hulu, bbc, etc., I don't know. But, many streaming sites accept the header as valid because most public proxies that people use to try to avoid the geographical restrictions add the header, and so, streaming sites use it as an proxy by-pass counter-measure. This add-on allows you to exploit that counter-measure.
(Last edited by digitalH; 1st November 2012 at 03:55 AM.)
Senior Member
Thanks Meter 5
Posts: 119
Join Date: Jun 2011

Does it work like a VPN ? like if i'm in China i can go on blocked website ?

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Submitting a Patch to Gerrit – Featuring XplodWild – XDA Developer TV

Not every developer specializes in every area of … more

Learn How to Make a Live Wallpaper all by Yourself

Stillimages can bebeautiful, but some of you prefer to see animations on your screens. … more

Google Play Services Updated to Version 6.1

In addition to Android operating system proper, Google is focusing hard on giving the developers … more

CyanogenMod 11 M10 Available for Supported Devices

Summer vacation isover for most students out there, and it’s the time to get back to … more