Skip to content
Snippets Groups Projects
Commit 972bbf69 authored by Remy Mudingay's avatar Remy Mudingay :speech_balloon:
Browse files

simplified upstream server declaration and ability to disable filters

parent 8868bbac
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,19 @@ tinyproxy_listen_address: [default: 0.0.0.0]
tinyproxy_port: [default: 8888]
#Define a list of urls (http) and domains (https) that clients can access (whitelist)
tinyproxy_urls:
tinyproxy_urls: []
#Enable upstream proxy
tinyproxy_upstream: false
#Provide list of upstream proxies
tinyproxy_upstream_proxies: []
- address:
port:
url:
#Enable or disable URL Filtering rules
tinyproxy_filter: true
#Setup Tinyproxy filtering rules
tinyproxy_filtering:
......@@ -60,15 +72,6 @@ tinyproxy_filtering:
default_deny: On
case_sensitive: Off
#List of upstream proxies to use
tinyproxy_upstream_proxies: [default: []]
#Address of upstream proxy in form host:port
tinyproxy_upstream_proxies.{n}.address: [required]:
#Optional URLs for which we want to use upstream proxy for.
tinyproxy_upstream_proxies.{n}.url: [optional]:
```
Example playbook
......
......@@ -15,12 +15,19 @@ tinyproxy_listen_addresses:
- 0.0.0.0
tinyproxy_port: 8888
tinyproxy_upstream_proxies: []
tinyproxy_connect_ports: []
tinyproxy_urls: []
tinyproxy_upstream: false
tinyproxy_upstream_proxies:
- address: proxy.com
port: 8080
url: local.domain
tinyproxy_filter: true
tinyproxy_filtering:
filter: "/etc/tinyproxy/filter"
urls: "On"
......
......@@ -37,7 +37,7 @@ Allow {{ subnet }}
Deny {{ subnet }}
{% endfor %}
{% if tinyproxy_filtering is defined %}
{% if tinyproxy_filter %}
Filter "{{ tinyproxy_filtering.filter }}"
FilterURLs {{ tinyproxy_filtering.urls }}
FilterExtended {{ tinyproxy_filtering.extended }}
......@@ -45,12 +45,10 @@ FilterCaseSensitive {{ tinyproxy_filtering.case_sensitive }}
FilterDefaultDeny {{ tinyproxy_filtering.default_deny }}
{% endif %}
{% if tinyproxy_upstream_proxies is defined %}
{% for proxy in tinyproxy_upstream_proxies %}
Upstream {{ proxy.address }} {% if proxy.url is defined %} {{ proxy.url }} {% endif %}
{% endfor %}
{% if tinyproxy_upstream %}
{% for proxy in tinyproxy_upstream_proxies %}
Upstream {{ proxy.address }}:{{ proxy.port }} {% if proxy.url is defined %} "{{ proxy.url }}" {% endif %}
{% endfor %}
{% endif %}
ViaProxyName "tinyproxy"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment