[Privoxy-users] user-agent based forwarding action
Fabian Keil
fk at fabiankeil.de
Sat Jun 24 13:57:29 UTC 2017
Beeblebrox <zaphod at berentweb.com> wrote:
> Hi Nick, thanks for the reply.
>
> > you are trying to hide the UA, but then tag against it? How do things go if you comment out the above line?
>
> The problem/solution is that user.action is parsed on first come basis apparently. So switching the order solved it:
>
> # THIS FIRST: Tag & forwarding based on user-agent
> {+forward-override{forward-socks5 192.168.0.102:2222 .} \
> +client-header-filter{hide-tor-exit-notation} }
> TAG:^User-Agent: Explorer SunOS
>
> # THEN THIS: Spoof accept-language and user agent
> {+hide-accept-language{en-ca} \
> +hide-user-agent{Mozilla/5.0 (X11; U; Linux; i686; en-ca; rv:1.7)
> KHTML (like Gecko)} } /
>
> GIVES:
> Header: Tagger 'user-agent' added tag 'User-Agent: Explorer SunOS'. Action bits updated accordingly.
> Header: Modified: User-Agent: Mozilla/5.0 (X11; U; Linux; i686; en-ca; rv:1.7) KHTML (like Gecko)
You seem to have removed the trailing slash from the TAG pattern
to allow it to match.
TAG sections are always evaluated after sections with URL patterns
so the section order only matters for sections of the same type.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.privoxy.org/pipermail/privoxy-users/attachments/20170624/0a03f533/attachment.bin>
More information about the Privoxy-users
mailing list