User tinyproxy
Group tinyproxy

{% for address in tinyproxy_listen_addresses %}
Listen {{ address }}
{% endfor %}

Port {{ tinyproxy_port }}

Timeout 600

ErrorFile 400 "/usr/share/tinyproxy/400.html"
ErrorFile 403 "/usr/share/tinyproxy/403.html"
ErrorFile 404 "/usr/share/tinyproxy/404.html"
ErrorFile 503 "/usr/share/tinyproxy/503.html"

DefaultErrorFile "/usr/share/tinyproxy/default.html"
StatFile "/usr/share/tinyproxy/stats.html"
PidFile "/var/run/tinyproxy/tinyproxy.pid"

Logfile "/var/log/tinyproxy/tinyproxy.log"
LogLevel {{ tinyproxy_log_level }}

MaxClients {{ tinyproxy_maxclients }}
MinSpareServers {{ tinyproxy_minspare_servers }}
MaxSpareServers {{ tinyproxy_maxspare_servers }}
StartServers {{ tinyproxy_startservers }}

MaxRequestsPerChild {{ tinyproxy_maxrequest }}

Allow 127.0.0.1
{% for subnet in tinyproxy_allowed_subnets %}
Allow {{ subnet }}
{% endfor %}

{% for subnet in tinyproxy_denied_subnets %}
Deny {{ subnet }}
{% endfor %}

{% if tinyproxy_filter %}
Filter "{{ tinyproxy_filtering.filter }}"
FilterURLs {{ tinyproxy_filtering.urls }}
FilterExtended {{ tinyproxy_filtering.extended }}
FilterCaseSensitive {{ tinyproxy_filtering.case_sensitive }}
FilterDefaultDeny {{ tinyproxy_filtering.default_deny }}
{% endif %}


{% for proxy in tinyproxy_upstream_proxies %}
Upstream http {{ proxy.address }}:{{ proxy.port }} {% if proxy.url is defined %} "{{ proxy.url }}" {% endif %}
{% endfor %}


{% for no_upstream in tinyproxy_no_upstream_for %}
Upstream none "{{ no_upstream }}"
{% endfor %}

ViaProxyName "{{ tinyproxy_via_proxy_name }}"

{% for port in tinyproxy_connect_ports | default([]) %}
ConnectPort {{ port }}
{% endfor %}

Syslog On
LogLevel Connect
