proxy_centos/bin/add_ip_to_squid_conf.sh

13 lines
256 B
Bash
Executable file

#!/usr/bin/env bash
# this script will add a new ip address to squid config.
IP="$1"
PORT="$2"
cat << EOF
http_port $IP:$PORT name=$PORT
acl tasty$PORT myportname $PORT src 0.0.0.0/0
http_access allow tasty$PORT
tcp_outgoing_address $IP tasty:$PORT
EOF