Re: Switch forward rules on-the-fly?

Fabian Keil <[email protected]>
Newsgroups gmane.comp.web.privoxy.user
Message-ID <[email protected]>
Az <[email protected]> wrote:

> On Sunday 7 October 2018 08:49,
> Az <[email protected]> put forth the proposition:
> > On Sunday 7 October 2018 07:59,
> > Az <[email protected]> put forth the proposition:  
> > > On Sunday 7 October 2018 06:25,
> > > Az <[email protected]> put forth the proposition:  

> > > > I use a text browser with Tor quite a lot and often come up against
> > > > captchas. When this happens I usually go through a different proxy,
> > > > but then I lose the privoxy protection. It's either that or boot X11
> > > > and a GUI browser, find the site again and complete the captcha.
> > > >
> > > > Is there a way of switching from one proxy to another somehow via my
> > > > browser that doesn't involve turning off privoxy or adding a rule for
> > > > each site that this happens with? With my regular sites I do add
> > > > rules to go direct or via a plain http proxy, but I don't want to do
> > > > it for every random site that uses cloudflare etc., which seem to be
> > > > on the increase now.
> > > >
> > > > I'm kind of thinking something I could add to the URL to let privoxy
> > > > know that I need to use a different forward rule. I looked at tags,
> > > > but I'm not sure I really understand if they could work for what I
> > > > want.  
> > >
> > > Well I almost had something working. I added /1234567890 on to the
> > > end of a URL and set up a simple redirect like s@/1234567890$@@. It
> > > worked OK for http, but of course not for https.
> > >
> > > Then I tried adding a subdomain 'forward-socks5.' to the start, but
> > > it fails with this error:
> > >
> > > Error: pcrs command "s@forward-socks5.@@" changed
> > > "forward-socks5.duckduckgo.com:443" to "duckduckgo.com:443" (1 hit), but the
> > > result doesn't look like a valid URL and will be ignored.
> > >
> > > Why is this URL seen as an error?
> > >
> > > The actual URL I entered in the browser was
> > >
> > > https://forward-socks5.duckduckgo.com/lite/  
> >
> > Sorry to keep answering my own questions :)
> >
> > I found add the https:// seems to work so far.  
> 
> OK. Redirect obviously isn't going to work, because the browser will
> get passed to Tor again after the redirect. What I need is to
> *rewrite* the URL without the browser knowing.
> 
> So far the only thing I can see that may work is to add a TAG: on the
> user agent, and have a script to change the user agent in my browser.
> The problem is making sure that it gets changed back, or that the
> rule has a timer. Adding weird user agents isn't a great idea though.
> 
> Dunno. Maybe there's a better way.

A better way is to use a client-specific tag that sets the
forward-override action:
https://www.privoxy.org/user-manual/config.html#CLIENT-SPECIFIC-TAG
https://www.privoxy.org/user-manual/actions-file.html#FORWARD-OVERRIDE

While this will affect all requests (from the IP address)
you can set a small timeout that is sufficient to load
the capture-using website.

Fabian

_______________________________________________
Privoxy-users mailing list
[email protected]
https://lists.privoxy.org/mailman/listinfo/privoxy-users
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEETzbBfzgWkTZUoehQaRgikYuiNxwFAlu+BN4ACgkQaRgikYui
NxwfFQ//cbsF4EVmHed0C+j2mW2wMk0g1n28ozApLB90mjQsV0w1D3v0aoIdH1Mp
JcBehz8H3PrUKFImL8u/82xnSp353qdo7EFl/yhvLbdjs3IB17q24Zze4azh0p5C
e+GVFY7RXj6pDcSPylP2fVJmHpM+dx6xmt+/1Ul8qLnaEFNY2KhwqsmgCBNTvsxv
R+7UqkKb5eergnJr3+ikUjXlERtBel8QHCQVb+qOPdSeS3Xrt9M+RoMPGD0rz2NN
ejNsWxv+OGMjMr8KCJHxoRX2RmkHam9rCZcHvY4GQ++IoHjlYaEIwFAU/BDIOaId
iUIW2vfUSLePmNqFWokx6fIj1O/tHEfgzlRNBZdQfcYBsSEqyHnbtzZMhH3ZhsYM
11L5cGEFu5bWG0MmklhYHvJiy2MOPeeTZGYi/4evJEXVL3t+pFRY4p5ifkm+D5qC
6+Wm7ayN6kyBQnilLw++rG/daQ/a4TVlv/PTgIwwYTMk3LpBZPyPyeK+ZBxcjZVZ
a2ePZmDdnwH38m7mDKoWGOwLi1XwWbr74T5PJT/PnDfZqXdLPsqIwSYhWT8llzKm
waf51sooAFv934PgCPW8fyI0bjpqDVqA4Ae4XYCMgEGzWwgX8CcMWFqpf9Pp+8Bt
PrG/dpmWtiDeAGAl4Pal68XNGda4pprfm+OBv8KwwWpqe8simxA=
=L0T7
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.