zztzed
unread,Apr 27, 2012, 2:38:53 PM4/27/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Tasker
I know this isn't the "feature requests" group, but I've seen a few
other feature requests here, so here goes.
It would be nice if Tasker had the ability to change the User-Agent
header it uses on HTTP Get/Post actions, OR if it included some
keyword(s) in the User-Agent header to indicate that it's running on
an Android device.
My university's wireless network uses an obnoxious network access
control system that blocks all traffic and forcibly redirects HTTP
requests to its captive portal until it sees that either:
(a) you're using a mobile device (based on your user-agent when you
make an HTTP request); or
(b) you've authenticated and installed their "policy key".
I'd like to be able to set up a task to *invisibly* load a page for me
when I connect to my university's wireless so that the NAC will
already have authorized my device. However, when using an HTTP Get
action from within Tasker, the NAC instead returns a page saying it
doesn't recognize my browser, since the User-Agent header is just
"Tasker/versionnumber".
Since my device is rooted and I have stericson's BusyBox build
installed, I've worked around it by using the wget built into that
version of BusyBox and having *that* attempt to fetch a file from my
webserver with a spoofed User-Agent (even just the word "iPhone"
worked), *then* having Tasker make an HTTP GET request for that same
file to make sure the contents are correct and retrying the entire
task until it is (when the NAC recognizes that you are using a mobile
device, it redirects you to the university's homepage). However, I
feel this is somewhat inelegant and the dependency on root and an
external utility is undesirable in any case. (I suppose I could use
the "Browse URL" action instead of calling BusyBox via "Run Shell",
thereby eliminating the dependency on root and an external utility,
but that fails the "invisible" criterion since Browse URL opens the
default browser.)
I understand that User-Agent spoofing could potentially be used for
nefarious purposes (or at least, that that's likely to be an
objection), but even if the User-Agent Tasker uses were simply changed
to something like "Tasker/12.34u5 (Android 4.5.6)" rather than having
the ability to change it entirely, that would make it immensely more
useful for me.