## Bu dosya ansible tarafindan yonetilmektedir!
## Burada yapilan degisikliklerin uzerine yazilir!!
{{ ansible_managed }}

# Network definitions
#acl localnet src 192.168.0.0/16 # RFC1918 possible internal network

# Ldap Authentication
{% if squid['ldap']['enabled'] == "yes" %} 
auth_param basic program /usr/lib/squid3/basic_ldap_auth -R -b "{{ squid['ldap']['domain'] }}" -D "{{ squid['ldap']['workgroup'] }}\\{{ squid['ldap']['user'] }}" -w "{{ squid['ldap']['password'] }}" -f "{{ squid['ldap']['option'] }}" -h {{ squid['ldap']['host'] }}
auth_param basic children 5
auth_param basic realm Web-Proxy
auth_param basic credentialsttl 8 hours
acl ldap-auth proxy_auth REQUIRED
{% endif %}

# Port definitions
acl Safe_ports port 80      # http
acl Safe_ports port 443     # https

# Blocks file upload
acl blockfile req_mime_type -i ^.*multipart/form-data.*
http_access deny blockfile

{% if squid['ldap']['enabled'] == "yes" %} 
http_access allow ldap-auth
{% endif %}
http_access deny all
http_port {{ squid['http_port'] }}

# Cache Section
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 .               0       20%     4320
cache_dir ufs /var/spool/squid3 100 16 256
