ProxyScript

by williamwangmi
356 deployments · 351 still active · last rev. 1 day ago

N/A

Compatible with: Debian 8
						#!/bin/bash
#
# Debian
#

apt-get -y update

apt-get install -y ntpdate
apt-get install -y squid3 apache2-utils

cp /etc/squid3/squid.conf /etc/squid3/squid.conf.bak

cat << EOF > /etc/squid3/squid.conf
http_port 8080

auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/.passwd
auth_param basic children 5
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl auth proxy_auth REQUIRED
acl localhost src 216.165.243.241

http_access allow auth
http_access allow localhost
http_access deny all

cache deny all

forwarded_for delete
request_header_access Via deny all
EOF

htpasswd -b -c /etc/squid3/.passwd sesame proxy

/etc/init.d/squid3 restart