[Privoxy-users] Question: forward username/password through to socks5 proxy

Fabian Keil fk at fabiankeil.de
Wed Aug 24 12:27:39 CEST 2022


lowness_perfect.0m at icloud.com wrote on 2022-08-11 at 18:38:30:

> I’m trying to utilize privoxy and tor together, using tor's stream
> isolation to get a new circuit per session by passing different
> credentials per session. I have the recommended config in there:
> 
> forward-socks5t   /               127.0.0.1:9050 .
> 
> And I'm trying to call through privoxy with:
> 
> curl -s -x http://$USER:$PASS@localhost:8118 https://check.torproject.org
> 
> But it looks like the username and password aren't forwarded along to
> tor. Is this possible?

That's currently not supported and I also don't consider passing
HTTP passwords to the socks proxy a good idea.

> I can't put the username/password it the privoxy config because it
> changes dynamically per session/app/etc.

What I do to use different Tor circuits for different applications
is to have Tor listen on multiple ports and let Privoxy chose the
forwarding settings based on the User-Agent or other headers.

Example sections from one of my action files:

{+client-header-tagger{user-agent}\
 +client-header-tagger{client-ip-address}\
 +client-header-tagger{http-method} \
 +client-header-tagger{range-requests} \
 +client-header-tagger{referer}\
 +client-header-tagger{content-type}\
}
/

{+forward-override{forward-socks5t 127.0.1.2:9048 .}}
TAG:^User-Agent: Liferea

Of course using multiple Tor listening ports is no longer
necessary nowadays as one can also change the Tor sessions
by specifying socks user names and passwords.

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/20220824/b5a14725/attachment.bin>


More information about the Privoxy-users mailing list