Squid: forward to another proxy (with authentication details for the parent proxy)

I figured from squid tutorials that the simplest configuration to do this is:

http_access allow all
http_port 3128

coredump_dir /var/spool/squid3
refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

cache_peer 10.1.2.3 parent 80 0 no-query default login=my_username:my_password
never_direct allow all

These lines should get you a working proxy server on your local machine that forwards all requests to another proxy server (change ip addresses accordingly). However, please note that in the above script, I have disabled any access control/filters, so potentially, anybody can connect and use your proxy. You need to add additional code to restrict entry to only some devices.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)