LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   spoofing the user agent string through squid (https://www.linuxquestions.org/questions/slackware-14/spoofing-the-user-agent-string-through-squid-912303/)

nass 11-07-2011 05:14 AM

spoofing the user agent string through squid
 
Hello everyone,
there are a few sites that STILL defy freedom and only allow some of all (!) of their functionality to Internet Explorer.
for me these sites are:

-my ISP-provided modem (!!!!!)
-my ebank account (crap!)

I could use the 'user agent' plugin for firefox in all my computers,
OR i could tamper with my slackware router :) and alter squid.conf.

I googled but it didn't help much. Do you have some good link for a tutorial? Has anyone done it?

thank you for your help
nass

bathory 11-07-2011 07:53 AM

Well, this depends on squid version.
For 2.5-3.1 you can use just header_replace:
Code:

header_replace  User-Agent  Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)
For recent 3.1+ you should change the above, to:
Code:

request_header_access User-Agent deny all
request_header_replace User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)

Regards

nass 11-07-2011 07:59 AM

thank you for your reply,
i'm running squid version from slackbuilds for slack13.37 (so it's 3.1.12).
may I also ask if I can find the standard user agent strings somewhere?

and also, ideally, i'd like to only spoof the user agent string in these specific websites. not everywhere..
is there a conditional request_header_access clause?

nass 11-07-2011 08:03 AM

scratch the Q about ACL's its doable, from the standard clause , i'm reading the squid reference here

bathory 11-07-2011 08:23 AM

Quote:

may I also ask if I can find the standard user agent strings somewhere?
Have a look here


All times are GMT -5. The time now is 09:52 PM.