Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1588 Add header for specific parent proxy

3.0.19
pending
Fabian Keil
5
2013-08-14
2013-08-14
Anonymous
No

Hi all

I am trying to configure Privoxy to suit my case. I work in a compay where we access to Internet through a corporate proxy with basic authentication. But Dropbox is blocked, so I have installed Tor to use the corporate proxy, and now Dropbox is working using the Tor proxy.

Now I have configured Privoxy to redirect dropbox urls with the tor proxy, and the rest of urls with the corporate proxy (i don't want to redirect all urls with Tor because it is so slowly...). If I configure Privoxy in my browser, to access also the Dropbox web, the browser asks me for username and password. The problem is that I think the authorization header goes also when I access to Dropbox with the privoxy proxy.... So risky. Most of all, I have defined some exceptions so corporate servers are redirected with privoxy, so i don't have to configure the exceptions in all servers and in the console.

So, my question, is there any way to make privoxy add automatically the "add-header Proxy-Authorization" only to the request gone to the corporate server, and not to privoxy neither local servers?

This is my configuration (config file, the rest of the files are the defaults):

===============================

user-manual /usr/share/doc/privoxy/user-manual
confdir /etc/privoxy
logdir /var/log/privoxy
actionsfile match-all.action # Actions that are applied to all sites and maybe overruled later on.
actionsfile default.action # Main actions file
actionsfile user.action # User customizations
filterfile default.filter
filterfile user.filter # User customizations
logfile logfile

debug 8192 # Errors *we recommended enabling this*

listen-address localhost:8118

permit-access localhost/32

toggle 0
enable-remote-toggle 0
enable-remote-http-toggle 0
enable-edit-actions 0
enforce-blocks 0
buffer-limit 4096

#####################################################

# El resto
forward / proxy.internaldomain.es:8080

# Sacyl
forward .internaldomain1.es .
forward .internaldomain2.es .
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
forward 172.*.*.*/ .
forward localhost/ .
forward .localdomain/ .
forward .local/ .

# Dropbox
forward-socks5 .onion localhost:9050 .
forward-socks5 .dropbox.com localhost:9050 .

#####################################################

forwarded-connect-retries 0
accept-intercepted-requests 0
allow-cgi-request-crunching 0
keep-alive-timeout 5

===============================

Using Ubuntu 12.04 x64. Regards and thanks in advance.

Discussion

  • Fabian Keil
    Fabian Keil
    2013-08-14

    Like any other action, the add-header{} action is enabled through URL or TAG patterns.

    By choosing the right pattern(s), you can thus enable it only for the requests that are also passed to a proxy, or explicitly disable it for the requests that aren't.

    You could additionally use a client-header filter to remove authentication headers from the clients for URLs were they aren't appropriate.

    The details are in the manual: http://www.privoxy.org/user-manual/actions-file.html

    Let us know if you have additional questions or if it isn't working as expected.

     
  • Fabian Keil
    Fabian Keil
    2013-08-14

    • assigned_to: nobody --> fabiankeil
    • status: open --> pending