-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Access Denied.
-
-
-
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_ACL_TIME_QUOTA_EXCEEDED.html b/src/opnsense/data/proxy/template_error_pages/ERR_ACL_TIME_QUOTA_EXCEEDED.html
deleted file mode 100644
index b9cc38a12..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_ACL_TIME_QUOTA_EXCEEDED.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Time Quota Exceeded.
-
-
-
This proxy limits your time online with a quota. Your time budget is now empty but will be refilled when the configured time period starts again.
-
These limits have been established by the Internet Service Provider who operates this cache. Please contact them directly if you feel this is an error.
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Cache Manager Access Denied.
-
-
-
Sorry, you are not currently allowed to request %U from this cache manager until you have authenticated yourself.
-
-
Please contact the cache administrator if you have difficulties authenticating yourself or, if you are the administrator, read Squid documentation on cache manager interface and check cache log for more detailed error messages.
-
-
-
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_CANNOT_FORWARD.html b/src/opnsense/data/proxy/template_error_pages/ERR_CANNOT_FORWARD.html
deleted file mode 100644
index 620cdc8eb..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_CANNOT_FORWARD.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Unable to forward this request at this time.
-
-
-
This request could not be forwarded to the origin server or to any parent caches.
-
-
Some possible problems are:
-
-
An Internet connection needed to access this domains origin servers may be down.
-
All configured parent caches may be currently unreachable.
-
The administrator may not allow this cache to make direct connections to origin servers.
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_FORWARDING_DENIED.html b/src/opnsense/data/proxy/template_error_pages/ERR_FORWARDING_DENIED.html
deleted file mode 100644
index 1ee086629..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_FORWARDING_DENIED.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Forwarding Denied.
-
-
-
This cache will not forward your request because it is trying to enforce a sibling relationship. Perhaps the client at %i is a cache which has been misconfigured.
This might be caused by an FTP URL with an absolute path (which does not comply with RFC 1738). If this is the cause, then the file can be found at %B.
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_ONLY_IF_CACHED_MISS.html b/src/opnsense/data/proxy/template_error_pages/ERR_ONLY_IF_CACHED_MISS.html
deleted file mode 100644
index f91c79e9f..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_ONLY_IF_CACHED_MISS.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Valid document was not found in the cache and only-if-cached directive was specified.
-
-
-
You have issued a request with a only-if-cached cache control directive. The document was not found in the cache, or it required revalidation prohibited by the only-if-cached directive.
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_SECURE_CONNECT_FAIL.html b/src/opnsense/data/proxy/template_error_pages/ERR_SECURE_CONNECT_FAIL.html
deleted file mode 100644
index 0046c8e1c..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_SECURE_CONNECT_FAIL.html
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
Failed to establish a secure connection to %I
-
-
-
-
The system returned:
-
-
%E (TLS code: %x)
-
%D
-
-
-
-
This proxy and the remote host failed to negotiate a mutually acceptable security settings for handling your request. It is possible that the remote host does not support secure connections, or the proxy is not satisfied with the host security credentials.
-
-
-
-
diff --git a/src/opnsense/data/proxy/template_error_pages/ERR_TOO_BIG.html b/src/opnsense/data/proxy/template_error_pages/ERR_TOO_BIG.html
deleted file mode 100644
index b12de395b..000000000
--- a/src/opnsense/data/proxy/template_error_pages/ERR_TOO_BIG.html
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-ERROR: The requested URL could not be retrieved
-
-
-
-
-
-
-
-
ERROR
-
The requested URL could not be retrieved
-
-
-
-
-
The following error was encountered while trying to retrieve the URL: %U
-
-
-
The request or reply is too large.
-
-
-
If you are making a POST or PUT request, then the item you are trying to upload is too large.
-
If you are making a GET request, then the item you are trying to download is too large.
-
These limits have been established by the Internet Service Provider who operates this cache. Please contact them directly if you feel this is an error.
-
- {{ lang._('Add an item to the table to fetch a remote acl for blacklisting.%s
- You can enable or disable the blacklist list.%s
- The active blacklists will be merged with the settings under %sForward Proxy -> Access Control List%s.') |
- format(' ',' ','','') }}
-
-
-
-
-
-
-
- {{ lang._('After changing categories, please remember to download the ACL again to apply your new settings') }}
-
-
-
-
-
{{ lang._('Enabled') }}
-
{{ lang._('Filename') }}
-
{{ lang._('URL') }}
-
{{ lang._('Description') }}
-
{{ lang._('Edit | Delete') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{{ lang._('Action')}}
-
-
-
-
-
-
-
-
-
- {{ lang._('Reset all generated content (cached files and certificates included) and restart the proxy.') }}
-
-
-
-
-
-
-
-
-
-
-{{ partial("layout_partials/base_dialog",['fields':formDialogEditBlacklist,'id':'DialogEditBlacklist','label':lang._('Edit blacklist')])}}
-{{ partial("layout_partials/base_dialog",['fields':formDialogEditPACProxy,'id':'DialogEditPACProxy','label':lang._('Edit Proxy')])}}
-{{ partial("layout_partials/base_dialog",['fields':formDialogEditPACMatch,'id':'DialogEditPACMatch','label':lang._('Edit Match')])}}
-{{ partial("layout_partials/base_dialog",['fields':formDialogEditPACRule,'id':'DialogEditPACRule','label':lang._('Edit Rule')])}}
diff --git a/src/opnsense/scripts/proxy/deploy_error_pages.py b/src/opnsense/scripts/proxy/deploy_error_pages.py
deleted file mode 100755
index f6e63c8aa..000000000
--- a/src/opnsense/scripts/proxy/deploy_error_pages.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/local/bin/python3
-
-"""
- Copyright (c) 2020 Ad Schellevis
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-"""
-import ujson
-import os
-import re
-from lib import ProxyTemplates
-target_directory = "/usr/local/etc/squid/errors/local"
-
-if __name__ == '__main__':
- proxy_templates = ProxyTemplates()
-
- # install error_pages into target_directory
- if not os.path.isdir(target_directory):
- os.mkdir(target_directory)
- for filename, data in proxy_templates.templates(proxy_templates.overlay_enabled()):
- match = proxy_templates.css_section(data)
- if match:
- inline_css = list()
- for dep_filename in proxy_templates.css_dependencies(filename, proxy_templates.overlay_enabled()):
- css_content = proxy_templates.get_file(dep_filename, proxy_templates.overlay_enabled())
- if css_content:
- inline_css.append(b'' % css_content)
- data = b"%s%s%s" % (data[0:match.start()], b"\n".join(inline_css), data[match.end():])
- with open("%s/%s" % (target_directory, os.path.splitext(filename)[0]), "wb") as target_fh:
- target_fh.write(data)
- print(ujson.dumps({
- 'overlay_status': proxy_templates.get_overlay_status()
- }))
diff --git a/src/opnsense/scripts/proxy/download_error_pages.py b/src/opnsense/scripts/proxy/download_error_pages.py
deleted file mode 100755
index 4c786a8dd..000000000
--- a/src/opnsense/scripts/proxy/download_error_pages.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/local/bin/python3
-
-"""
- Copyright (c) 2020 Ad Schellevis
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-"""
-import base64
-import ujson
-import os
-import re
-import zipfile
-from io import BytesIO
-from lib import ProxyTemplates
-
-if __name__ == '__main__':
- root_dir = "/proxy_template"
- proxy_templates = ProxyTemplates()
- output_data = BytesIO()
- processed = list()
- with zipfile.ZipFile(output_data, mode='w', compression=zipfile.ZIP_DEFLATED) as zf:
- for filename, data in proxy_templates.templates(True):
- zf.writestr("%s/%s" % (root_dir, filename), data)
- for dep_filename in proxy_templates.css_dependencies(filename, True):
- if dep_filename not in processed:
- zf.writestr("%s/%s" % (root_dir, dep_filename), proxy_templates.get_file(dep_filename, True))
- processed.append(dep_filename)
-
- response = dict()
- response['payload'] = base64.b64encode(output_data.getvalue()).decode()
- response['size'] = len(response['payload'])
- print(ujson.dumps(response))
diff --git a/src/opnsense/scripts/proxy/fetchACLs.py b/src/opnsense/scripts/proxy/fetchACLs.py
deleted file mode 100755
index af5923997..000000000
--- a/src/opnsense/scripts/proxy/fetchACLs.py
+++ /dev/null
@@ -1,381 +0,0 @@
-#!/usr/local/bin/python3
-
-"""
- Copyright (c) 2016-2019 Ad Schellevis
- Copyright (c) 2015 Jos Schellevis
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-"""
-
-import tempfile
-import os
-import sys
-import json
-import glob
-import os.path
-import tarfile
-import gzip
-import zipfile
-import syslog
-import urllib3
-from configparser import ConfigParser
-from urllib.request import urlopen
-from urllib.error import URLError
-from urllib.error import HTTPError
-import requests
-urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
-
-acl_config_fn = '/usr/local/etc/squid/externalACLs.conf'
-acl_target_dir = '/usr/local/etc/squid/acl'
-acl_max_timeout = 30
-
-
-class Downloader(object):
- """ Download helper
- """
-
- def __init__(self, url,username, password, timeout, ssl_no_verify=False):
- """ init new
- :param url: source url
- :param timeout: timeout in seconds
- """
- self._url = url.strip()
- self._timeout = timeout
- self._source_handle = None
- self._username = username
- self._password = password
- self._ssl_no_verify = ssl_no_verify
-
- def fetch(self):
- """ fetch (raw) source data into tempfile using self._source_handle
- """
- self._source_handle = None
- if self._url.lower().startswith('http://') or self._url.lower().startswith('https://'):
- # HTTP(S) download
- req_opts = dict()
- req_opts['url'] = self._url
- req_opts['stream'] = True
- req_opts['timeout'] = self._timeout
- if self._ssl_no_verify:
- req_opts['verify'] = False
- if self._username is not None:
- req_opts['auth'] = (self._username, self._password)
- req = requests.get(**req_opts)
- if req.status_code == 200:
- req.raw.decode_content = True
- self._source_handle = tempfile.NamedTemporaryFile('wb+', 10240)
- while True:
- data = req.raw.read(10240)
- if not data:
- break
- else:
- self._source_handle.write(data)
- self._source_handle.seek(0)
- else:
- syslog.syslog(syslog.LOG_ERR, 'proxy acl: error downloading %s (http code: %s)' % (self._url,
- req.status_code))
- elif self._url.lower().startswith('ftp://'):
- # FTP download
- try:
- f = urlopen(self._url, timeout=self._timeout)
- self._source_handle = tempfile.NamedTemporaryFile('wb+', 10240)
- while True:
- data = f.read(10240)
- if not data:
- break
- else:
- self._source_handle.write(data)
- self._source_handle.seek(0)
- f.close()
- except (URLError, HTTPError, IOError) as e:
- syslog.syslog(syslog.LOG_ERR, 'proxy acl: error downloading %s' % self._url)
- else:
- syslog.syslog(syslog.LOG_ERR, 'proxy acl: unsupported protocol for %s' % self._url)
-
- def get_files(self):
- """ process downloaded data, handle compression
- :return: iterator filename, file handle
- """
- if self._source_handle is not None:
- # handle compressed data
- if (len(self._url) > 8 and self._url[-7:] == '.tar.gz') \
- or (len(self._url) > 4 and self._url[-4:] == '.tgz'):
- # source is in tar.gz format, extract all into a single string
- try:
- tf = tarfile.open(fileobj=self._source_handle)
- for tf_file in tf.getmembers():
- if tf_file.isfile():
- yield tf_file.name, tf.extractfile(tf_file)
- except IOError as e:
- syslog.syslog(syslog.LOG_ERR, 'proxy acl: error downloading %s (%s)' % (self._url, e))
- elif len(self._url) > 4 and self._url[-3:] == '.gz':
- # source is in .gz format unpack
- try:
- gf = gzip.GzipFile(mode='r', fileobj=self._source_handle)
- yield os.path.basename(self._url), gf
- except IOError as e:
- syslog.syslog(syslog.LOG_ERR, 'proxy acl: error downloading %s (%s)' % (self._url, e))
- elif len(self._url) > 5 and self._url[-4:] == '.zip':
- # source is in .zip format, extract all into a single string
- with zipfile.ZipFile(self._source_handle,
- mode='r',
- compression=zipfile.ZIP_DEFLATED) as zf:
- for item in zf.infolist():
- if item.file_size > 0:
- yield item.filename, zf.open(item)
- else:
- yield os.path.basename(self._url), self._source_handle
-
- def download(self):
- """ download / unpack ACL
- :return: iterator filename, type, content
- """
- self.fetch()
- for filename, filehandle in self.get_files():
- basefilename = os.path.basename(filename).lower()
- file_ext = filename.split('.')[-1].lower()
- while True:
- line = filehandle.readline().decode(encoding='utf-8', errors='ignore')
- if not line:
- break
- yield filename, basefilename, file_ext, line
-
-
-class DomainSorter(object):
- """ Helper class for building sorted squid domain acl list.
- Use as file type object, close flushes the actual (sorted) data to disc
- """
-
- def __init__(self, filename=None):
- """ new sorted output file, uses an acl record in reverse order as sort key
- :param filename: target filename
- :param mode: file open mode
- """
- self._num_targets = 20
- self._separator = '|'
- self._buckets = dict()
- self._sort_map = dict()
- # setup target
- self._target_filename = filename
- # setup temp files
- self.generate_targets()
-
- def generate_targets(self):
- """ generate ordered targets
- """
- sets = 255
- for i in range(sets):
- target = chr(i + 1)
- setid = int(i / (sets / self._num_targets))
- if setid not in self._buckets:
- self._buckets[setid] = tempfile.NamedTemporaryFile('wb+', 10240)
- self._sort_map[target] = self._buckets[setid]
-
- def write(self, data):
- """ save content, send reverse sorted to buffers
- :param data: line to write
- """
- line = data.strip().lower()
- if len(line) > 0:
- # Calculate sort key, which is the reversed url with dots (.) replaced by spaces.
- # We need to replace dots (.) here to avoid having a wrong sorting order when dashes
- # or similar characters are used inside the url.
- # (The process writing out the domains checks for domain overlaps)
- sort_key = line[::-1].replace('.', ' ')
- self.add(sort_key, line)
-
- def add(self, key, value):
- """ spool data to temp
- :param key: key to use
- :param value: value to store
- """
- target = key[0]
- if target in self._sort_map:
- for part in (key, self._separator, value, '\n'):
- self._sort_map[target].write(part.encode('utf-8'))
- else:
- # not supposed to happen, every key should have a calculated target pool
- pass
-
- def reader(self):
- """ read reverse
- """
- for target in sorted(self._buckets):
- self._buckets[target].seek(0)
- set_content = dict()
- while True:
- line = self._buckets[target].readline().decode()
- if not line:
- break
- else:
- set_content[line.split('|')[0]] = '|'.join(line.split('|')[1:])
- for itemkey in sorted(set_content, reverse=True):
- yield set_content[itemkey]
-
- @staticmethod
- def is_domain(tag):
- """ check if tag is probably a domain name
- :param tag: tag to inspect
- :return: boolean
- """
- has_chars = False
- for tag_item in tag:
- if not tag_item.isdigit() and tag_item not in ('.', ',', '|', '/', '\n'):
- has_chars = True
- elif tag_item in (':', '|', '/'):
- return False
- if has_chars:
- return True
- else:
- return False
-
- def close(self):
- """ close and dump content
- """
- if self._target_filename is not None:
- # flush to file on close
- with open(self._target_filename, 'wb', buffering=10240) as f_out:
- prev_line = None
- for line in self.reader():
- line = line.lstrip('.')
- if prev_line == line:
- # duplicate, skip
- continue
- if self.is_domain(line):
- # prefix domain, if this domain is different then the previous one
- if prev_line is None or '.%s' % line not in prev_line:
- f_out.write(b'.')
- f_out.write(line.encode())
- prev_line = line
-
-
-def filename_in_ignorelist(bfilename, filename_ext):
- """ ignore certain files from processing.
- :param bfilename: basefilename to inspect
- :param filename_ext: extension of the filename
- """
- if filename_ext in ['pdf', 'txt', 'doc']:
- return True
- elif bfilename in ('readme', 'license', 'usage', 'categories'):
- return True
- return False
-
-
-def main():
- # parse OPNsense external ACLs config
- if os.path.exists(acl_config_fn):
- # create acl directory (if new)
- if not os.path.exists(acl_target_dir):
- os.mkdir(acl_target_dir)
- else:
- # remove index files
- for filename in glob.glob('%s/*.index' % acl_target_dir):
- os.remove(filename)
- # read config and download per section
- cnf = ConfigParser()
- cnf.read(acl_config_fn)
- for section in cnf.sections():
- target_filename = acl_target_dir + '/' + section
- if cnf.has_option(section, 'url'):
- # collect filters to apply
- acl_filters = list()
- if cnf.has_option(section, 'filter'):
- for acl_filter in cnf.get(section, 'filter').strip().split(','):
- if len(acl_filter.strip()) > 0:
- acl_filters.append(acl_filter)
-
- # define target(s)
- targets = {'domain': {'filename': target_filename, 'handle': None, 'class': DomainSorter}}
-
- # only generate files if enabled, otherwise dump empty files
- if cnf.has_option(section, 'enabled') and cnf.get(section, 'enabled') == '1':
- download_url = cnf.get(section, 'url')
- if cnf.has_option(section, 'username'):
- download_username = cnf.get(section, 'username')
- download_password = cnf.get(section, 'password')
- else:
- download_username = None
- download_password = None
- if cnf.has_option(section, 'sslNoVerify') and cnf.get(section, 'sslNoVerify') == '1':
- sslNoVerify = True
- else:
- sslNoVerify = False
- acl = Downloader(download_url, download_username, download_password, acl_max_timeout, sslNoVerify)
- all_filenames = list()
- for filename, basefilename, file_ext, line in acl.download():
- if filename_in_ignorelist(basefilename, file_ext):
- # ignore documents, licenses and readme's
- continue
-
- # detect output type
- if '/' in line or '|' in line:
- filetype = 'url'
- elif line.startswith('#'):
- filetype = 'comment'
- else:
- filetype = 'domain'
-
- if filename not in all_filenames:
- all_filenames.append(filename)
-
- if len(acl_filters) > 0:
- acl_found = False
- for acl_filter in acl_filters:
- if acl_filter in filename:
- acl_found = True
- break
- if not acl_found:
- # skip this acl entry
- continue
-
- if filetype in targets and targets[filetype]['handle'] is None:
- targets[filetype]['handle'] = targets[filetype]['class'](targets[filetype]['filename'])
- if filetype in targets:
- targets[filetype]['handle'].write(line)
- targets[filetype]['handle'].write('\n')
- # save index to disc
- with open('%s.index' % target_filename, 'w', buffering=10240) as idx_out:
- index_data = dict()
- for filename in all_filenames:
- if len(filename.split('/')) > 2:
- index_key = '/'.join(filename.split('/')[1:-1])
- if index_key not in index_data:
- index_data[index_key] = index_key
- idx_out.write(json.dumps(index_data))
-
- # cleanup
- for filetype in targets:
- if targets[filetype]['handle'] is not None:
- targets[filetype]['handle'].close()
- elif cnf.has_option(section, 'enabled') and cnf.get(section, 'enabled') != '1':
- if os.path.isfile(targets[filetype]['filename']):
- # disabled, remove previous data
- os.remove(targets[filetype]['filename'])
- elif not os.path.isfile(targets[filetype]['filename']):
- # no data fetched and no file available, create new empty file
- with open(targets[filetype]['filename'], 'w') as target_out:
- target_out.write("")
-
-
-# execute downloader
-main()
diff --git a/src/opnsense/scripts/proxy/generate_cert.php b/src/opnsense/scripts/proxy/generate_cert.php
deleted file mode 100755
index b2df4aabf..000000000
--- a/src/opnsense/scripts/proxy/generate_cert.php
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/local/bin/php
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-"""
-import ujson
-import os
-import base64
-import binascii
-import re
-import zipfile
-import glob
-from io import BytesIO
-
-class ProxyTemplates:
- error_config = "/usr/local/etc/squid/error_directory.in"
-
- def __init__(self):
- self._all_src_files = dict()
- self._all_ovl_files = dict()
- self._overlay_status = None
- self._install_overlay = False
- self._overlay_data = None
- self._load_config()
- self.load()
-
- def _load_config(self):
- """ initialize configuration
- """
- if os.path.isfile(self.error_config):
- error_cfg = ujson.loads(open(self.error_config, 'rb').read())
- self._install_overlay = 'install' not in error_cfg or error_cfg['install'] != 'opnsense'
- self._overlay_data = error_cfg['content'] if 'content' in error_cfg else None
-
- def load(self):
- """ load (custom) error pages in memory
- """
- self._overlay_status = None
- self._all_src_files = dict()
- self._all_ovl_files = dict()
- # base (OPNsense) template
- for filename in glob.glob("/usr/local/opnsense/data/proxy/template_error_pages/*"):
- bfilename = os.path.basename(filename)
- with open(filename, "rb") as f_in:
- self._all_src_files[bfilename] = f_in.read()
-
- # when a (valid) overlay is provided, read it's contents
- if self._overlay_data and self._install_overlay:
- try:
- input_data = BytesIO(base64.b64decode(self._overlay_data))
- root_dir = ""
- with zipfile.ZipFile(input_data, mode='r', compression=zipfile.ZIP_DEFLATED) as zf_in:
- for zf_info in zf_in.infolist():
- if not root_dir and zf_info.filename.endswith('/'):
- root_dir = zf_info.filename
- else:
- self._all_ovl_files[zf_info.filename.replace(root_dir, "")] = zf_in.read(zf_info.filename)
- except binascii.Error:
- self._overlay_status = 'Not a base64 encoded file'
- except zipfile.BadZipFile:
- self._overlay_status = 'Illegal zip file'
- except IOError:
- self._overlay_status = 'Error reading file'
-
- def templates(self, overlay=False):
- """ return template html files
- :param overlay: consider custom theme files when applicable
- :rtype: [string, bytes]
- """
- for filename in self._all_src_files:
- if filename.endswith('.html'):
- if overlay and filename in self._all_ovl_files:
- yield filename, self._all_ovl_files[filename]
- else:
- yield filename, self._all_src_files[filename]
-
- def get_file(self, filename, overlay=False):
- """ return file content
- :param filename: source filename
- :param overlay: consider custom theme files when applicable
- :return: string
- """
- if filename in self._all_src_files:
- if overlay and filename in self._all_ovl_files:
- return self._all_ovl_files[filename]
- else:
- return self._all_src_files[filename]
-
- @staticmethod
- def css_section(data):
- """ extract css definition block from provided data
- :param data: html data
- :return: MatchObject
- """
- return re.search(b'()', data, re.DOTALL)
-
- def css_dependencies(self, filename, overlay=False):
- """ extract css dependencies from provided filename
- :param filename: source filename
- :param overlay: consider custom theme files when applicable
- :rtype: list
- """
- data = self.get_file(filename, overlay)
- if filename.endswith('.html') and data:
- match = self.css_section(data)
- if match:
- for href in re.findall(b"(href[\s]*=[\s]*[\"|'])(.*?)([\"|'])" ,match.group(0)):
- yield href[1].decode()
-
- def overlay_enabled(self):
- """ when deploying files, should we consider an overlay
- :return: bool
- """
- return self._install_overlay
-
- def get_overlay_status(self):
- """ return validity of the installed overlay
- :return: string
- """
- return self._overlay_status
diff --git a/src/opnsense/scripts/proxy/setup.sh b/src/opnsense/scripts/proxy/setup.sh
deleted file mode 100755
index 795ebdd0d..000000000
--- a/src/opnsense/scripts/proxy/setup.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-
-SQUID_DIRS="/var/log/squid /var/run/squid /var/squid /var/squid/cache /var/squid/ssl /var/squid/logs /usr/local/etc/squid/errors/local"
-
-for SQUID_DIR in ${SQUID_DIRS}; do
- mkdir -p ${SQUID_DIR}
- chown -R squid:squid ${SQUID_DIR}
- chmod -R 750 ${SQUID_DIR}
-done
-/usr/sbin/pw groupmod proxy -m squid
-/usr/local/sbin/squid -z -N > /dev/null 2>&1
-
-# remove ssl certificate store in case the user changed the CA
-if [ -f /usr/local/etc/squid/ca.pem.id ]; then
- current_cert=`cat /usr/local/etc/squid/ca.pem.id`
- if [ -d /var/squid/ssl_crtd ]; then
- if [ -f /var/squid/ssl_crtd.id ]; then
- running_cert=`cat /var/squid/ssl_crtd.id`
- else
- running_cert=""
- fi
- if [ "$current_cert" != "$running_cert" ]; then
- rm -rf /var/squid/ssl_crtd
- fi
- fi
-fi
-
-# create ssl certificate store, in case sslbump is enabled we need this
-if [ ! -d /var/squid/ssl_crtd ]; then
- /usr/local/libexec/squid/security_file_certgen -c -s /var/squid/ssl_crtd -M 10 > /dev/null 2>&1
- chown -R squid:squid /var/squid/ssl_crtd
- chmod -R 750 /var/squid/ssl_crtd
- if [ -f /usr/local/etc/squid/ca.pem.id ]; then
- cat /usr/local/etc/squid/ca.pem.id > /var/squid/ssl_crtd.id
- fi
-fi
-
-# generate SSL bump certificate
-/usr/local/opnsense/scripts/proxy/generate_cert.php > /dev/null 2>&1
-
-# install theme files
-/usr/local/opnsense/scripts/proxy/deploy_error_pages.py > /dev/null 2>&1
diff --git a/src/opnsense/scripts/syslog/logformats/squid.py b/src/opnsense/scripts/syslog/logformats/squid.py
deleted file mode 100755
index e5dca0c66..000000000
--- a/src/opnsense/scripts/syslog/logformats/squid.py
+++ /dev/null
@@ -1,107 +0,0 @@
-"""
- Copyright (c) 2020 Ad Schellevis
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-"""
-import re
-import datetime
-from . import NewBaseLogFormat
-squid_ext_timeformat = r'.*(\[\d{1,2}/[A-Za-z]{3}/\d{4}:\d{1,2}:\d{1,2}:\d{1,2} \+\d{4}\]).*'
-squid_timeformat = r'^(\d{4}/\d{1,2}/\d{1,2} \d{1,2}:\d{1,2}:\d{1,2}).*'
-
-
-class SquidLogFormat(NewBaseLogFormat):
- def __init__(self, filename):
- super().__init__(filename)
- self._priority = 100
-
- def match(self, line):
- return self._filename.find('squid') > -1 and re.match(squid_timeformat, line) is not None
-
- @property
- def timestamp(self):
- tmp = re.match(squid_timeformat, self._line)
- grp = tmp.group(1)
- return datetime.datetime.strptime(grp, "%Y/%m/%d %H:%M:%S").isoformat()
-
- @property
- def process_name(self):
- return "squid"
-
- @property
- def line(self):
- return self._line[19:].strip()
-
-
-class SquidExtLogFormat(NewBaseLogFormat):
- def __init__(self, filename):
- super().__init__(filename)
- self._priority = 120
-
- def match(self, line):
- return self._filename.find('squid') > -1 and re.match(squid_ext_timeformat, line) is not None
-
- @property
- def timestamp(self):
- tmp = re.match(squid_ext_timeformat, self._line)
- grp = tmp.group(1)
- return datetime.datetime.strptime(grp[1:].split()[0], "%d/%b/%Y:%H:%M:%S").isoformat()
-
- @property
- def process_name(self):
- return "squid"
-
- @property
- def line(self):
- tmp = re.match(squid_ext_timeformat, self._line)
- grp = tmp.group(1)
- return self._line.replace(grp, '')
-
-
-class SquidJsonLogFormat(NewBaseLogFormat):
- def __init__(self, filename):
- super().__init__(filename)
- self._priority = 140
- local_now = datetime.datetime.now()
- utc_now = datetime.datetime.utcnow()
- self._localtimezone = datetime.timezone(local_now - utc_now)
-
- def match(self, line):
- return self._filename.find('squid') > -1 and line.find('"@timestamp"') > -1
-
- @property
- def timestamp(self, line):
- tmp = line[line.find('"@timestamp"')+13:].split(',')[0].strip().strip('"')
- try:
- return datetime.datetime.strptime(tmp, "%Y-%m-%dT%H:%M:%S%z")\
- .astimezone(self._localtimezone).isoformat().split('.')[0].split('+')[0]
- except ValueError:
- return None
-
- @property
- def process_name(self):
- return "squid"
-
- @property
- def line(self):
- return self._line
diff --git a/src/opnsense/service/conf/actions.d/actions_proxy.conf b/src/opnsense/service/conf/actions.d/actions_proxy.conf
deleted file mode 100644
index 6082fc81d..000000000
--- a/src/opnsense/service/conf/actions.d/actions_proxy.conf
+++ /dev/null
@@ -1,82 +0,0 @@
-[start]
-command:
- /usr/local/sbin/pluginctl -c webproxy start;
- /usr/local/etc/rc.d/squid start 2>&1 && echo "__ok__"; exit 0
-parameters:
-type:script_output
-message:starting proxy
-
-[stop]
-command:
- /usr/local/etc/rc.d/squid stop;
- /usr/bin/killall squid;
- /usr/local/sbin/pluginctl -c webproxy stop;
- exit 0
-parameters:
-type:script
-message:stopping proxy
-
-[restart]
-command:
- /usr/local/sbin/pluginctl -c webproxy restart;
- /usr/local/etc/rc.d/squid restart 2>&1 && echo "__ok__"; exit 0
-parameters:
-type:script_output
-message:restarting proxy
-description:Restart Web Proxy service
-
-[reset]
-command:
- /usr/bin/killall -9 squid;
- rm /var/run/squid/squid.pid;
- rm -rf /var/squid/*;
- /usr/local/sbin/pluginctl -c webproxy start;
- /usr/local/etc/rc.d/squid start
-parameters:
-type:script
-message:reset and restart proxy
-
-[reload]
-command:
- /usr/local/sbin/pluginctl -c webproxy reload;
- /usr/local/opnsense/scripts/proxy/deploy_error_pages.py;
- /usr/local/etc/rc.d/squid reload
-parameters:
-type:script
-message:reload proxy
-
-[status]
-command:/usr/local/etc/rc.d/squid status;exit 0
-parameters:
-type:script_output
-message:request proxy status
-
-[fetchacls]
-command:
- /usr/local/bin/flock -n -E 0 -o /tmp/fetchACLs.lock /usr/local/opnsense/scripts/proxy/fetchACLs.py && (
- /usr/local/sbin/pluginctl -c webproxy reload;
- /usr/local/etc/rc.d/squid reload
- )
-parameters:
-type:script
-message:download and reload proxy ACLs from remote locations
-description:Download and reload external proxy ACLs
-
-[downloadacls]
-command:/usr/local/bin/flock -n -E 0 -o /tmp/fetchACLs.lock /usr/local/opnsense/scripts/proxy/fetchACLs.py
-parameters:
-type:script
-message:download proxy ACLs from remote locations
-description:Download external proxy ACLs
-
-[deploy_error_pages]
-command:/usr/local/opnsense/scripts/proxy/deploy_error_pages.py
-parameters:
-type:script_output
-message:deploy error pages
-
-[download_error_pages]
-command:/usr/local/opnsense/scripts/proxy/download_error_pages.py
-parameters:
-type:script_output
-message:download error pages
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/+TARGETS b/src/opnsense/service/templates/OPNsense/Proxy/+TARGETS
deleted file mode 100644
index 113237f50..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/+TARGETS
+++ /dev/null
@@ -1,15 +0,0 @@
-auth.conf:/usr/local/etc/squid/auth/dummy.conf
-ca.pem.id:/usr/local/etc/squid/ca.pem.id
-cache.active:/var/squid/cache/active
-error_directory_in:/usr/local/etc/squid/error_directory.in
-externalACLs.conf:/usr/local/etc/squid/externalACLs.conf
-newsyslog.conf:/etc/newsyslog.conf.d/squid
-nobumpsites.acl:/usr/local/etc/squid/nobumpsites.acl
-parentproxy.conf:/usr/local/etc/squid/pre-auth/parentproxy.conf
-post-auth.conf:/usr/local/etc/squid/post-auth/dummy.conf
-pre-auth.conf:/usr/local/etc/squid/pre-auth/dummy.conf
-rc.conf.d:/etc/rc.conf.d/squid/squid
-snmp.conf:/usr/local/etc/squid/pre-auth/40-snmp.conf
-squid.conf:/usr/local/etc/squid/squid.conf
-squid.pam:/etc/pam.d/squid
-wpad.dat:/usr/local/www/wpad.dat
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/auth.conf b/src/opnsense/service/templates/OPNsense/Proxy/auth.conf
deleted file mode 100644
index d0ef53e5e..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/auth.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# AUTOGENERATED FILE. DO NOT EDIT.
-# DO NOT REMOVE THIS FILE!
-# This directory is for auth config files
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/ca.pem.id b/src/opnsense/service/templates/OPNsense/Proxy/ca.pem.id
deleted file mode 100644
index e907aec5e..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/ca.pem.id
+++ /dev/null
@@ -1,3 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.forward.sslcertificate') %}
-{{ OPNsense.proxy.forward.sslcertificate }}
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/cache.active b/src/opnsense/service/templates/OPNsense/Proxy/cache.active
deleted file mode 100644
index e8eac9df1..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/cache.active
+++ /dev/null
@@ -1,5 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.general.cache.local') %}
-{% if OPNsense.proxy.general.cache.local.enabled == '1' %}
-yes
-{% endif %}
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/error_directory_in b/src/opnsense/service/templates/OPNsense/Proxy/error_directory_in
deleted file mode 100644
index f9d52ca00..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/error_directory_in
+++ /dev/null
@@ -1,7 +0,0 @@
-{#
- base64 encoded zip archive containing template overrides
-#}
-{
- "install": "{{ OPNsense.proxy.general.error_pages|default('opnsense') }}",
- "content": "{% if not helpers.empty('OPNsense.proxy.error_pages.template') %}{{ OPNsense.proxy.error_pages.template }}{% endif %}"
-}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/externalACLs.conf b/src/opnsense/service/templates/OPNsense/Proxy/externalACLs.conf
deleted file mode 100644
index 5db85f532..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/externalACLs.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Automatic generated configuration for fetching remote ACLs.
-# Do not edit this file manually.
-{% if helpers.exists('OPNsense.proxy.forward.acl.remoteACLs.blacklists') %}
-{% for blacklist in helpers.toList('OPNsense.proxy.forward.acl.remoteACLs.blacklists.blacklist') %}
-[{{blacklist.filename}}]
-url:{{blacklist.url}}
-enabled:{{blacklist.enabled}}
-filter:{{blacklist.filter|default('')}}
-{% if blacklist.username|default('') != '' %}
-username={{blacklist.username}}
-password={{blacklist.password|default('')}}
-{% endif %}
-sslNoVerify={{blacklist.sslNoVerify|default('0')}}
-{% endfor %}
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/newsyslog.conf b/src/opnsense/service/templates/OPNsense/Proxy/newsyslog.conf
deleted file mode 100644
index db392ab30..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/newsyslog.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
-{% if helpers.exists('OPNsense.proxy.general.enabled') and OPNsense.proxy.general.enabled|default("0") == "1" %}
-/var/log/squid/access.log squid:squid 644 14 * @T00 ZB /var/run/squid/squid.pid 30
-/var/log/squid/cache.log squid:squid 644 2 * @T00 ZB /var/run/squid/squid.pid 30
-/var/log/squid/store.log squid:squid 644 2 * @T00 ZB /var/run/squid/squid.pid 30
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/nobumpsites.acl b/src/opnsense/service/templates/OPNsense/Proxy/nobumpsites.acl
deleted file mode 100644
index 0bf00cd38..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/nobumpsites.acl
+++ /dev/null
@@ -1,5 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.forward.sslnobumpsites') and OPNsense.proxy.forward.sslnobumpsites != '' %}
-{% for line in OPNsense.proxy.forward.sslnobumpsites.split(',') %}
-{{ line }}
-{% endfor %}
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/parentproxy.conf b/src/opnsense/service/templates/OPNsense/Proxy/parentproxy.conf
deleted file mode 100644
index 1dafefa75..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/parentproxy.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.enabled') and OPNsense.proxy.general.parentproxy.enabled == '1' %}
-cache_peer {{ OPNsense.proxy.general.parentproxy.host }} parent {{ OPNsense.proxy.general.parentproxy.port }} 0 no-query default {% if helpers.exists('OPNsense.proxy.general.parentproxy.enableauth') and OPNsense.proxy.general.parentproxy.enableauth == '1' %} login={{ OPNsense.proxy.general.parentproxy.user }}:{{ OPNsense.proxy.general.parentproxy.password }}{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localdomains') and OPNsense.proxy.general.parentproxy.localdomains != '' %}
-acl ExcludePPDomains dstdomain {{ OPNsense.proxy.general.parentproxy.localdomains.replace(',', ' ') }}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localips') and OPNsense.proxy.general.parentproxy.localips != '' %}
-acl ExcludePPIPs dst {{ OPNsense.proxy.general.parentproxy.localips.replace(',', ' ') }}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localdomains') and OPNsense.proxy.general.parentproxy.localdomains != '' %}
-cache_peer_access {{ OPNsense.proxy.general.parentproxy.host }} deny ExcludePPDomains
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localips') and OPNsense.proxy.general.parentproxy.localips != '' %}
-cache_peer_access {{ OPNsense.proxy.general.parentproxy.host }} deny ExcludePPIPs
-{% endif %}
-cache_peer_access {{ OPNsense.proxy.general.parentproxy.host }} allow all
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localdomains') and OPNsense.proxy.general.parentproxy.localdomains != '' %}
-never_direct deny ExcludePPDomains
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.parentproxy.localips') and OPNsense.proxy.general.parentproxy.localips != '' %}
-never_direct deny ExcludePPIPs
-{% endif %}
-never_direct allow all
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/post-auth.conf b/src/opnsense/service/templates/OPNsense/Proxy/post-auth.conf
deleted file mode 100644
index 5b91051e9..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/post-auth.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# AUTOGENERATED FILE. DO NOT EDIT.
-# DO NOT REMOVE THIS FILE!
-# This directory is for post-auth config files
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/pre-auth.conf b/src/opnsense/service/templates/OPNsense/Proxy/pre-auth.conf
deleted file mode 100644
index 6a0794e4f..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/pre-auth.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-# AUTOGENERATED FILE. DO NOT EDIT.
-# DO NOT REMOVE THIS FILE!
-# This directory is for pre-auth config files
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/rc.conf.d b/src/opnsense/service/templates/OPNsense/Proxy/rc.conf.d
deleted file mode 100644
index 2a1dc037f..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/rc.conf.d
+++ /dev/null
@@ -1,6 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.general.enabled') and OPNsense.proxy.general.enabled|default("0") == "1" %}
-squid_setup="/usr/local/opnsense/scripts/proxy/setup.sh"
-squid_enable="YES"
-{% else %}
-squid_enable="NO"
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/snmp.conf b/src/opnsense/service/templates/OPNsense/Proxy/snmp.conf
deleted file mode 100644
index 610e23ca3..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/snmp.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-{% if helpers.exists('OPNsense.proxy.forward.snmp_enable') and OPNsense.proxy.forward.snmp_enable == '1' %}
-snmp_port {{ OPNsense.proxy.forward.snmp_port }}
-acl snmppublic snmp_community {{ OPNsense.proxy.forward.snmp_password }}
-snmp_access allow snmppublic
-{% endif %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.acl.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.acl.conf
deleted file mode 100644
index b9e1f8787..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/squid.acl.conf
+++ /dev/null
@@ -1,248 +0,0 @@
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}
-
-# ALLOW UNRESTRICTED
-# ACL list (Allow) unrestricted
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow unrestricted
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow unrestricted
-{% endif %}
-{% endif %}
-http_access allow unrestricted
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
-
-# ACL list (Allow) whitelist
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow whiteList
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow whiteList
-{% endif %}
-{% endif %}
-http_access allow whiteList
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
-
-#
-# ACL list (Deny) blacklist
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny blackList
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny blackList
-{% endif %}
-{% endif %}
-http_access deny blackList
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.remoteACLs.blacklists') %}
-{% for blacklist in helpers.toList('OPNsense.proxy.forward.acl.remoteACLs.blacklists.blacklist') if blacklist.enabled=='1' %}
-# ACL list (Deny) remoteblacklist_{{blacklist.filename}}
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny remoteblacklist_{{blacklist.filename}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny remoteblacklist_{{blacklist.filename}}
-{% endif %}
-{% endif %}
-http_access deny remoteblacklist_{{blacklist.filename}}
-{% endfor %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
-
-# ACL list (Deny) blockuseragent
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny blockuseragents
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny blockuseragents
-{% endif %}
-{% endif %}
-http_access deny blockuseragents
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.mimeType') %}
-
-# ACL list (Deny) blockmimetypes
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny blockmimetypes {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny blockmimetypes {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny blockmimetypes_requests {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny blockmimetypes_requests {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-{% endif %}
-
-{% endif %}
-http_reply_access deny blockmimetypes {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-
-http_access deny blockmimetypes_requests {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted {% endif %}
-
-{% endif %}
-
-# Google Suite Filter
-{% if not helpers.empty('OPNsense.proxy.forward.acl.googleapps') %}
-request_header_add X-GoogApps-Allowed-Domains {{OPNsense.proxy.forward.acl.googleapps}}
-{% endif %}
-
-# YouTube Filter
-{% if helpers.exists('OPNsense.proxy.forward.acl.youtube') and OPNsense.proxy.forward.acl.youtube|default('') != '' %}
-request_header_add YouTube-Restrict {{OPNsense.proxy.forward.acl.youtube}}
-{% endif %}
-
-# Deny requests to certain unsafe ports
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny !Safe_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny !Safe_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-{% endif %}
-{% endif %}
-
-http_access deny !Safe_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-
-# Deny CONNECT to other than secure SSL ports
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny CONNECT !SSL_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny CONNECT !SSL_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-{% endif %}
-{% endif %}
-
-http_access deny CONNECT !SSL_ports {% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}!unrestricted{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny bannedHosts
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny bannedHosts
-{% endif %}
-{% endif %}
-http_access deny bannedHosts
-{% endif %}
-
-# Only allow cachemgr access from localhost
-http_access allow localhost manager
-http_access deny manager
-
-# We strongly recommend the following be uncommented to protect innocent
-# web applications running on the proxy server who think the only
-# one who can access services on "localhost" is a local user
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny to_localhost
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny to_localhost
-{% endif %}
-{% endif %}
-http_access deny to_localhost
-
-{% if helpers.exists('OPNsense.proxy.forward.icap.exclude') %}
-# ACL - Whitelist - User defined (whiteList)
-{% for element in OPNsense.proxy.forward.icap.exclude.split(",") %}
-{% if '^' in element or '\\' in element or '$' in element or '[' in element %}
-acl exclude_icap url_regex {{element|encode_idna}}
-{% else %}
-acl exclude_icap url_regex {{element|encode_idna|replace(".","\.")}}
-{% endif %}
-{% endfor %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny exclude_icap
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny exclude_icap
-{% endif %}
-{% endif %}
-
-# Auth plugins
-include /usr/local/etc/squid/auth/*.conf
-
-#
-# Access Permission configuration:
-#
-# Deny request from unauthorized clients
-{% if helpers.exists('OPNsense.proxy.forward.authentication.method') and OPNsense.proxy.forward.authentication.method != '' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow local_auth
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow local_auth
-{% endif %}
-{% endif %}
-http_access allow local_auth
-{% endif %}
-
-#
-# ACL - localnet - default these include ranges from selected interfaces (Allow local subnets)
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow localnet
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow localnet
-{% endif %}
-{% endif %}
-http_access allow localnet
-
-# ACL - localhost
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow localhost
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow localhost
-{% endif %}
-{% endif %}
-http_access allow localhost
-{% if helpers.exists('OPNsense.proxy.forward.acl.allowedSubnets') %}
-
-# ACL list (Allow) subnets
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod allow subnets
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod allow subnets
-{% endif %}
-{% endif %}
-http_access allow subnets
-{% endif %}
-
-# Deny all other access to this proxy
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-adaptation_access response_mod deny all
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-adaptation_access request_mod deny all
-{% endif %}
-{% endif %}
-http_access deny all
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf
deleted file mode 100644
index 4b334cd3f..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf
+++ /dev/null
@@ -1,487 +0,0 @@
-#
-# Automatic generated configuration for Squid.
-# Do not edit this file manually.
-#
-
-{# wrap listener configuration for reuse #}
-{% macro listener_config(network, port='3129', tags='', protocol='') -%}
-{% if protocol == 'ssl' %}
-{% set listener_type = 'https_port' %}
-{% else %}
-{% set listener_type = 'http_port' %}
-{% endif %}
-{% set sslparams = '' %}
-{% if helpers.exists('OPNsense.proxy.forward.sslbump') and OPNsense.proxy.forward.sslbump == '1' %}
-{% set sslparams = 'ssl-bump cert=/var/squid/ssl/ca.pem dynamic_cert_mem_cache_size=10MB generate-host-certificates=on' %}
-{% endif %}
-{{listener_type}} {{network}}:{{port}} {{tags}} {{sslparams}}
-{%- endmacro %}
-
-{% if helpers.exists('OPNsense.proxy.forward.transparentMode') and OPNsense.proxy.forward.transparentMode == '1' %}
-# Setup transparent mode listeners on loopback interfaces
-{{ listener_config('127.0.0.1', OPNsense.proxy.forward.port, 'intercept') }}
-{{ listener_config('[::1]', OPNsense.proxy.forward.port, 'intercept') }}
-{% if helpers.exists('OPNsense.proxy.forward.sslbump') and OPNsense.proxy.forward.sslbump == '1' %}
-{{ listener_config('127.0.0.1', OPNsense.proxy.forward.sslbumpport, 'intercept', 'ssl') }}
-{{ listener_config('[::1]', OPNsense.proxy.forward.sslbumpport, 'intercept', 'ssl') }}
-{% endif %}
-{% endif %}
-
-# Setup regular listeners configuration
-{% if helpers.exists('OPNsense.proxy.forward.interfaces') %}
-{% for interface in OPNsense.proxy.forward.interfaces.split(",") %}
-{% for intf_key,intf_item in interfaces.items() %}
-{% if intf_key == interface and intf_item.ipaddr and intf_item.ipaddr != 'dhcp' %}
-{{ listener_config(intf_item.ipaddr, OPNsense.proxy.forward.port) }}
-{% endif %}
-{% if intf_key == interface and intf_item.ipaddrv6 and intf_item.ipaddrv6.find(':') > -1 %}
-{{ listener_config('['+intf_item.ipaddrv6+']', OPNsense.proxy.forward.port) }}
-{% endif %}
-{% endfor %}
-{# virtual ip's #}
-{% if helpers.exists('virtualip') %}
-{% for intf_item in helpers.toList('virtualip.vip') %}
-{% if intf_item.interface == interface and intf_item.mode in ['carp', 'ipalias'] %}
-{% if intf_item.subnet.find(':') > -1 %}
-{{ listener_config('['+intf_item.subnet+']', OPNsense.proxy.forward.port) }}
-{% else %}
-{{ listener_config(intf_item.subnet, OPNsense.proxy.forward.port) }}
-{% endif %}
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endfor %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.forward.sslbump') and OPNsense.proxy.forward.sslbump == '1' %}
-# setup ssl re-cert
-sslcrtd_program /usr/local/libexec/squid/security_file_certgen -s /var/squid/ssl_crtd -M {{ OPNsense.proxy.forward.ssl_crtd_storage_max_size|default('4') }}MB
-sslcrtd_children {{ OPNsense.proxy.forward.sslcrtd_children|default('5') }}
-
-tls_outgoing_options options=NO_TLSv1 cipher=HIGH:MEDIUM:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS
-
-# setup ssl bump acl's
-acl bump_step1 at_step SslBump1
-acl bump_step2 at_step SslBump2
-acl bump_step3 at_step SslBump3
-acl bump_nobumpsites ssl::server_name "/usr/local/etc/squid/nobumpsites.acl"
-
-# configure bump
-{% if helpers.exists('OPNsense.proxy.forward.sslurlonly') and OPNsense.proxy.forward.sslurlonly == '1' %}
-ssl_bump peek bump_step1 all
-ssl_bump splice all
-ssl_bump peek bump_step2 all
-ssl_bump splice bump_step3 all
-ssl_bump bump
-
-{% else %}
-ssl_bump peek bump_step1 all
-ssl_bump peek bump_step2 bump_nobumpsites
-ssl_bump splice bump_step3 bump_nobumpsites
-ssl_bump stare bump_step2
-ssl_bump bump bump_step3
-{% endif %}
-
-sslproxy_cert_error deny all
-{% endif %}
-
-acl ftp proto FTP
-http_access allow ftp
-
-{% if helpers.exists('OPNsense.proxy.forward.ftpTransparentMode') and OPNsense.proxy.forward.ftpTransparentMode == '1' %}
-# transparent mode, listen on localhost
-ftp_port 127.0.0.1:{{ OPNsense.proxy.forward.ftpPort }} intercept
-ftp_port [::1]:{{ OPNsense.proxy.forward.ftpPort }} intercept
-{% endif %}
-
-# Setup ftp proxy
-{% if helpers.exists('OPNsense.proxy.forward.ftpInterfaces') %}
-{% for interface in OPNsense.proxy.forward.ftpInterfaces.split(",") %}
-{% for intf_key,intf_item in interfaces.items() %}
-{% if intf_key == interface and intf_item.ipaddr and intf_item.ipaddr != 'dhcp' %}
-ftp_port {{intf_item.ipaddr}}:{{ OPNsense.proxy.forward.ftpPort }} accel ftp-track-dirs protocol=HTTP
-{% endif %}
-{% endfor %}
-{# virtual ip's #}
-{% if helpers.exists('virtualip') %}
-{% for intf_key,intf_item in virtualip.items() %}
-{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %}
-ftp_port {{intf_item.subnet}}:{{ OPNsense.proxy.forward.ftpPort }} accel ftp-track-dirs protocol=HTTP
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endfor %}
-{% endif %}
-
-# Rules allowing access from your local networks.
-# Generated list of (internal) IP networks from where browsing
-# should be allowed. (Allow interface subnets).
-{% if helpers.exists('OPNsense.proxy.forward.interfaces') %}
-{% if helpers.exists('OPNsense.proxy.forward.addACLforInterfaceSubnets') %}
-{% if OPNsense.proxy.forward.addACLforInterfaceSubnets == '1' %}
-{% for interface in OPNsense.proxy.forward.interfaces.split(",") %}
-{% for intf_key,intf_item in interfaces.items() %}
-{% if intf_key == interface and intf_item.ipaddr and intf_item.ipaddr != 'dhcp' %}
-acl localnet src {{ helpers.getIPNetwork(intf_item.ipaddr+'/'+intf_item.subnet)[0].format() }}/{{intf_item.subnet}} # Possible internal network (interfaces v4)
-{% endif %}
-{% if intf_key == interface and intf_item.ipaddrv6 and intf_item.ipaddrv6.find(':') > -1 %}
-acl localnet src {{helpers.getIPNetwork(intf_item.ipaddrv6+'/'+intf_item.subnetv6)[0].format()}}/{{intf_item.subnetv6}} # Possible internal network (interfaces v6)
-{% endif %}
-{% endfor %}
-{% if helpers.exists('virtualip.vip') %}
-{% for intf_item in helpers.toList('virtualip.vip') %}
-{% if intf_item.interface == interface and intf_item.mode == 'ipalias' %}
-acl localnet src {{intf_item.subnet}}/{{intf_item.subnet_bits}} # Possible internal network (aliases)
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endif %}
-{% endif %}
-# Default allow for local-link and private networks
-acl localnet src fc00::/7 # RFC 4193 local private network range
-acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
-
-# ACL - Allow localhost for PURGE cache if enabled
-{% if helpers.exists('OPNsense.proxy.general.cache.local') and OPNsense.proxy.general.cache.local.enabled == '1' %}
-acl PURGE method PURGE
-http_access allow localhost PURGE
-http_access deny PURGE
-{% endif %}
-
-# ACL lists
-{% if helpers.exists('OPNsense.proxy.forward.acl.allowedSubnets') %}
-
-# ACL - Allow Subnets - User defined (subnets)
-{% for network in OPNsense.proxy.forward.acl.allowedSubnets.split(",") %}
-acl subnets src {{network}}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.acl.unrestricted') %}
-
-# ACL - Unrestricted IPs - User defined (unrestricted)
-{% for ip in OPNsense.proxy.forward.acl.unrestricted.split(",") %}
-acl unrestricted src {{ip}}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.acl.bannedHosts') %}
-
-# ACL - Banned Hosts - User defined (bannedHosts)
-{% for ip in OPNsense.proxy.forward.acl.bannedHosts.split(",") %}
-acl bannedHosts src {{ip}}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.acl.whiteList') %}
-# ACL - Whitelist - User defined (whiteList)
-{% for element in OPNsense.proxy.forward.acl.whiteList.split(",") %}
-{% if '^' in element or '\\' in element or '$' in element or '[' in element %}
-acl whiteList url_regex {{element|encode_idna}}
-{% else %}
-acl whiteList url_regex {{element|encode_idna|replace(".","\.")}}
-{% endif %}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.acl.blackList') %}
-
-# ACL - Blacklist - User defined (blackList)
-{% for element in OPNsense.proxy.forward.acl.blackList.split(",") %}
-{% if '^' in element or '\\' in element or '$' in element or '[' in element %}
-acl blackList url_regex {{element|encode_idna}}
-{% else %}
-acl blackList url_regex {{element|encode_idna|replace(".","\.")}}
-{% endif %}
-{% endfor %}
-{% endif %}
-
-# ACL - Remote fetched Blacklist (remoteblacklist)
-{% if helpers.exists('OPNsense.proxy.forward.acl.remoteACLs.blacklists') %}
-{% for blacklist in helpers.toList('OPNsense.proxy.forward.acl.remoteACLs.blacklists.blacklist') %}
-{% if blacklist.enabled=='1' %}
-acl remoteblacklist_{{blacklist.filename}} dstdomain "/usr/local/etc/squid/acl/{{blacklist.filename}}"
-{% endif %}
-{% endfor %}
-{% endif %}
-
-# ACL - Block browser/user-agent - User defined (browser)
-{% if helpers.exists('OPNsense.proxy.forward.acl.browser') %}
-{% for element in OPNsense.proxy.forward.acl.browser.split(",") %}
-acl blockuseragents browser {{element}}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.acl.mimeType') %}
-
-# ACL - Block MIME types - User defined (mimetype)
-{% for element in OPNsense.proxy.forward.acl.mimeType.split(",") %}
-acl blockmimetypes rep_mime_type {{element}}
-acl blockmimetypes_requests req_mime_type {{element}}
-{% endfor %}
-{% endif %}
-
-# ACL - SSL ports, default are configured in config.xml
-# Configured SSL ports (if defaults are not listed, then they have been removed from the configuration!):
-{% if helpers.exists('OPNsense.proxy.forward.acl.sslPorts') %}
-{% for element in OPNsense.proxy.forward.acl.sslPorts.split(",") %}
-acl SSL_ports port {{element.split(":")[0]}} # {{element.split(":")[1]|default('unknown')}}
-{% endfor %}
-{% endif %}
-
-# Default Safe ports are now defined in config.xml
-# Configured Safe ports (if defaults are not listed, then they have been removed from the configuration!):
-{% if helpers.exists('OPNsense.proxy.forward.acl.safePorts') %}
-# ACL - Safe_ports
-{% for element in OPNsense.proxy.forward.acl.safePorts.split(",") %}
-acl Safe_ports port {{element.split(":")[0]}} # {{element.split(":")[1]|default('unknown')}}
-{% endfor %}
-{% endif %}
-acl CONNECT method CONNECT
-
-# ICAP SETTINGS
-{% if helpers.exists('OPNsense.proxy.forward.icap.enable') and OPNsense.proxy.forward.icap.enable == '1' %}
-# enable icap
-icap_enable on
-{% if helpers.exists('OPNsense.proxy.forward.icap.OptionsTTL') %}
-icap_default_options_ttl {{OPNsense.proxy.forward.icap.OptionsTTL}}
-{% endif %}
-
-# send user information to the icap server
-{% if helpers.exists('OPNsense.proxy.forward.icap.SendClientIP') and OPNsense.proxy.forward.icap.SendClientIP == '1' %}
-adaptation_send_client_ip on
-{% else %}
-adaptation_send_client_ip off
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.SendUsername') and OPNsense.proxy.forward.icap.SendUsername == '1' %}
-adaptation_send_username on
-{% else %}
-adaptation_send_username off
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.EncodeUsername') and OPNsense.proxy.forward.icap.EncodeUsername == '1' %}
-icap_client_username_encode on
-{% else %}
-icap_client_username_encode off
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.UsernameHeader') and OPNsense.proxy.forward.icap.UsernameHeader != '' %}
-icap_client_username_header {{OPNsense.proxy.forward.icap.UsernameHeader}}
-{% endif %}
-
-# preview
-{% if helpers.exists('OPNsense.proxy.forward.icap.EnablePreview') and OPNsense.proxy.forward.icap.EnablePreview == '1' %}
-icap_preview_enable on
-{% else %}
-icap_preview_enable off
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.PreviewSize') %}
-icap_preview_size {{OPNsense.proxy.forward.icap.PreviewSize}}
-{% endif %}
-
-# add the servers
-{% if helpers.exists('OPNsense.proxy.forward.icap.ResponseURL') %}
-icap_service response_mod respmod_precache {{OPNsense.proxy.forward.icap.ResponseURL}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.icap.RequestURL') %}
-icap_service request_mod reqmod_precache {{OPNsense.proxy.forward.icap.RequestURL}}
-{% endif %}
-
-{% else %}
-# disable icap
-icap_enable off
-{% endif %}
-
-# Pre-auth plugins
-include /usr/local/etc/squid/pre-auth/*.conf
-
-# Authentication Settings
-{% if helpers.exists('OPNsense.proxy.forward.authentication.method') and OPNsense.proxy.forward.authentication.method != '' %}
-{% include ['OPNsense/Proxy/squid.user.alt_auth.conf', 'OPNsense/Proxy/squid.user.local_auth.conf'] %}
-{% endif %}
-
-{% include "OPNsense/Proxy/squid.acl.conf" ignore missing with context %}
-
-# Post-auth plugins
-include /usr/local/etc/squid/post-auth/*.conf
-
-# Caching settings
-{% if helpers.exists('OPNsense.proxy.general.cache.local') %}
-{% if OPNsense.proxy.general.cache.local.cache_mem|default('256')|int == 0 and OPNsense.proxy.general.cache.local.enabled == '0' %}
-cache deny all
-cache_mem 0
-{% else %}
-cache_mem {{ OPNsense.proxy.general.cache.local.cache_mem|default('256') }} MB
-{% if OPNsense.proxy.general.cache.local.maximum_object_size|default('') != '' %}
-maximum_object_size {{OPNsense.proxy.general.cache.local.maximum_object_size}} MB
-{% if OPNsense.proxy.general.cache.local.maximum_object_size|int > 4 %}
-cache_replacement_policy heap LFUDA
-{% endif %}
-{% endif %}
-{% if OPNsense.proxy.general.cache.local.maximum_object_size_in_memory|default('') != '' %}
-maximum_object_size_in_memory {{OPNsense.proxy.general.cache.local.maximum_object_size_in_memory}} KB
-{% endif %}
-{% if OPNsense.proxy.general.cache.local.memory_cache_mode|default('always') != 'always' %}
-memory_cache_mode {{OPNsense.proxy.general.cache.local.memory_cache_mode}}
-{% endif %}
-{% if OPNsense.proxy.general.cache.local.enabled == '1' %}
-cache_dir ufs {{OPNsense.proxy.general.cache.local.directory}} {{OPNsense.proxy.general.cache.local.size}} {{OPNsense.proxy.general.cache.local.l1}} {{OPNsense.proxy.general.cache.local.l2}}
-{% endif %}
-{% endif %}
-{% endif %}
-
-# Leave coredumps in the first cache dir
-coredump_dir /var/squid/cache
-
-#
-# Add any of your own refresh_pattern entries above these.
-#
-
-{% if helpers.exists('OPNsense.proxy.general.cache.local.cache_linux_packages') and OPNsense.proxy.general.cache.local.cache_linux_packages == '1' %}
-# Linux package cache:
-refresh_pattern pkg\.tar\.zst$ 0 20% 4320 refresh-ims
-refresh_pattern d?rpm$ 0 20% 4320 refresh-ims
-refresh_pattern deb$ 0 20% 4320 refresh-ims
-refresh_pattern udeb$ 0 20% 4320 refresh-ims
-refresh_pattern Packages\.bz2$ 0 20% 4320 refresh-ims
-refresh_pattern Sources\.bz2$ 0 20% 4320 refresh-ims
-refresh_pattern Release\.gpg$ 0 20% 4320 refresh-ims
-refresh_pattern Release$ 0 20% 4320 refresh-ims
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.cache.local.cache_windows_updates') and OPNsense.proxy.general.cache.local.cache_windows_updates == '1' %}
-# http://wiki.squid-cache.org/SquidFaq/WindowsUpdate
-refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip|esd) 4320 80% 129600 reload-into-ims
-refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip|esd) 4320 80% 129600 reload-into-ims
-refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|[ap]sf|wm[v|a]|dat|zip|esd) 4320 80% 129600 reload-into-ims
-{% endif %}
-
-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
-
-# Squid Options
-{% if helpers.empty('OPNsense.proxy.general.enablePinger') %}
-pinger_enable off
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.logging.enable.accessLog') %}
-{% if OPNsense.proxy.general.logging.enable.accessLog == '0' %}
-# Disable access logging
-access_log none
-{% else %}
-{% if OPNsense.proxy.general.logging.ignoreLogACL|default('') != '' %}
-# ignore source hosts from access.log
-acl accesslog_ignore src {{ OPNsense.proxy.general.logging.ignoreLogACL.replace(',', ' ') }}
-{% endif %}
-{% if OPNsense.proxy.general.logging.target|default('') == 'syslog' %}
-access_log syslog:local4.info {% if not helpers.empty('OPNsense.proxy.general.logging.ignoreLogACL') %}!accesslog_ignore {% endif %}
-{% elif OPNsense.proxy.general.logging.target|default('') == 'file_extendend' %}
-logformat opnsense %>a %[ui %>eui %[un [%tl] "%rm %ru HTTP/%rv" %>Hs %h" "%{User-Agent}>h" %Ss:%Sh
-access_log stdio:/var/log/squid/access.log opnsense {% if not helpers.empty('OPNsense.proxy.general.logging.ignoreLogACL') %}!accesslog_ignore {% endif %}
-{% elif OPNsense.proxy.general.logging.target|default('') in ('file_json', 'syslog_json') %}
-logformat opnsense {% raw %} {"@timestamp":"%{%Y-%m-%dT%H:%M:%S%z}tg","ecs":{"version":"1.0.0"},"event":{"id":"%{X-Request-Event-Id}>ha","dataset":"squid.access","duration":"%tr"},"http":{"version":"%rv","request":{"method":"%rm","referrer":"%{Referer}>h"},"response":{"bytes": %Hs}}},"host":{"hostname":"%>A"},"service":{"name":"proxy","type":"squid"},"source":{"ip":"%>a"},"url":{"original":"%ru"},"user":{"name":"%un"},"user_agent":{"original":"%{User-Agent}>h"},"labels":{"request_status":"%Ss","hierarchy_status":"%Sh"},"message":"%rm %ru HTTP/%rv"} {% endraw %}
-
-{% if OPNsense.proxy.general.logging.target == 'file_json'%}
-access_log stdio:/var/log/squid/access.log opnsense {% if not helpers.empty('OPNsense.proxy.general.logging.ignoreLogACL') %}!accesslog_ignore {% endif %}
-{% else %}
-access_log syslog:local4.info opnsense {% if not helpers.empty('OPNsense.proxy.general.logging.ignoreLogACL') %}!accesslog_ignore {% endif %}
-{% endif %}
-{% else %}
-access_log stdio:/var/log/squid/access.log squid {% if not helpers.empty('OPNsense.proxy.general.logging.ignoreLogACL') %}!accesslog_ignore {% endif %}
-{% endif %}
-{% endif %}
-{% endif %}
-
-{% if helpers.exists('OPNsense.proxy.general.logging.enable.storeLog') %}
-{% if OPNsense.proxy.general.logging.enable.storeLog == '0' %}
-# Disable cache store log
-cache_store_log none
-{% else %}
-cache_store_log stdio:/var/log/squid/store.log
-{% endif %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.alternateDNSservers' ) %}
-{% for dns in OPNsense.proxy.general.alternateDNSservers.split(",") %}
-dns_nameservers {{dns}}
-{% endfor %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.useViaHeader') %}
-{% if OPNsense.proxy.general.useViaHeader == '0' %}
-# Disable via Header
-via off
-{% endif %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.suppressVersion') %}
-{% if OPNsense.proxy.general.suppressVersion == '1' %}
-# Suppress http version string (default=off)
-httpd_suppress_version_string on
-{% endif %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.icpPort') %}
-{% if OPNsense.proxy.general.icpPort != '' %}
-icp_port {{OPNsense.proxy.general.icpPort}}
-{% endif %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.uriWhitespaceHandling') %}
-# URI handling with Whitespaces (default=strip)
-uri_whitespace {{OPNsense.proxy.general.uriWhitespaceHandling}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.forwardedForHandling') %}
-# X-Forwarded header handling (default=on)
-forwarded_for {{OPNsense.proxy.general.forwardedForHandling}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.traffic.enabled') and OPNsense.proxy.general.traffic.enabled == '1' %}
-{% if helpers.exists('OPNsense.proxy.general.traffic.maxDownloadSize') %}
-# Define max download size
-reply_body_max_size {{OPNsense.proxy.general.traffic.maxDownloadSize}} KB
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.traffic.maxUploadSize') %}
-# Define max upload size
-request_body_max_size {{OPNsense.proxy.general.traffic.maxUploadSize}} KB
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.traffic.perHostTrotteling') %}
-delay_pools 1
-delay_class 1 3
-delay_access 1 allow all
-{% if helpers.exists('OPNsense.proxy.general.traffic.OverallBandwidthTrotteling') %}
-# Define PerHost and Overall Bandwidth Trotteling
-delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}} -1/-1 {{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}
-{% else %}
-# Define PerHost Trotteling
-delay_parameters -1/-1 {{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.perHostTrotteling|int // 8 * 1000}}
-{% endif %}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.traffic.OverallBandwidthTrotteling') and not helpers.exists('OPNsense.proxy.general.traffic.perHostTrotteling') %}
-# Define Overall Bandwidth Trotteling
-delay_pools 1
-delay_class 1 1
-delay_access 1 allow all
-delay_parameters 1 {{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}/{{OPNsense.proxy.general.traffic.OverallBandwidthTrotteling|int // 8 * 1000}}
-{% endif %}
-{% endif %}
-# Disable squid logfile rotate to use system defaults
-logfile_rotate 0
-{% if helpers.exists('OPNsense.proxy.general.VisibleHostname') %}
-# Define visible hostname
-visible_hostname {{OPNsense.proxy.general.VisibleHostname}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.general.VisibleEmail') %}
-# Define visible email
-cache_mgr {{OPNsense.proxy.general.VisibleEmail}}
-{% endif %}
-{% if not helpers.empty('OPNsense.proxy.general.connecttimeout') %}
-# Set connection timeout
-connect_timeout {{OPNsense.proxy.general.connecttimeout}} seconds
-{% endif %}
-
-# Set error directory language
-{% set lang = namespace(dirs = [], done = false) %}
-{% if not helpers.empty('OPNsense.proxy.general.error_pages') %}
-{% do lang.dirs.append('/usr/local/etc/squid/errors/local') %}
-{% elif helpers.exists('system.language') and system.language != "" %}
-{% set langdir = system.language|lower|replace('_', '-') %}
-{% do lang.dirs.append('/usr/local/share/squid-langpack/' + langdir) %}
-{% do lang.dirs.append('/usr/local/share/squid-langpack/' + langdir[:2]) %}
-{% endif %}
-{% do lang.dirs.append('/usr/local/share/squid-langpack/en') %}
-{% for langdir in lang.dirs %}
-{% if not lang.done and helpers.file_exists(langdir) %}
-{% set lang.done = true %}
-error_directory {{ langdir }}
-{% endif %}
-{% endfor %}
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.pam b/src/opnsense/service/templates/OPNsense/Proxy/squid.pam
deleted file mode 100644
index eee0a9056..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/squid.pam
+++ /dev/null
@@ -1,5 +0,0 @@
-# auth
-auth sufficient pam_opnsense.so
-
-# account
-account sufficient pam_opnsense.so
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.user.local_auth.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.user.local_auth.conf
deleted file mode 100644
index 7cd8e8c5a..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/squid.user.local_auth.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-# Configure Local User Authentication helper
-auth_param basic program /usr/local/libexec/squid/basic_pam_auth -o
-{% if helpers.exists('OPNsense.proxy.forward.authentication.realm') %}
-auth_param basic realm {{OPNsense.proxy.forward.authentication.realm}}
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.authentication.credentialsttl') %}
-auth_param basic credentialsttl {{OPNsense.proxy.forward.authentication.credentialsttl}} hours
-{% endif %}
-{% if helpers.exists('OPNsense.proxy.forward.authentication.children') %}
-auth_param basic children {{OPNsense.proxy.forward.authentication.children}}
-{% endif %}
-# ACL - Local Authorized Users - local_auth
-acl local_auth proxy_auth REQUIRED
diff --git a/src/opnsense/service/templates/OPNsense/Proxy/wpad.dat b/src/opnsense/service/templates/OPNsense/Proxy/wpad.dat
deleted file mode 100644
index cd4aeaabc..000000000
--- a/src/opnsense/service/templates/OPNsense/Proxy/wpad.dat
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- PAC file created via OPNsense
- To use this file you have to enter its URL into your browsers network settings.
-*/
-function FindProxyForURL(url, host) {
-{% if helpers.exists('OPNsense.proxy.pac.rule') %}
-{# define only if needed as because of performance issues #}
-{% set data = {'dl' : '', 'dstip' : '', 'is_resolvable' : '' } %}
-{% set dstip = '' %}
-{% set is_resolvable = '' %}
-{% for match in helpers.toList('OPNsense.proxy.pac.match') %}
-{% if match.match_type == 'dns_domain_levels' %}
-{% do data.update({ 'dl': 'var dl = dnsDomainLevels(host);'}) %}
-{% endif %}
-{% if match.match_type == 'dns_domain_levels' or match.match_type == 'destination_in_net' %}
-{% do data.update({ 'dstip': 'var dstip = dnsResolve(host);'}) %}
-{% endif %}
-{% if match.match_type == 'is_resolvable' %}
-{% do data.update({ 'is_resolvable': 'var is_resolvable = isResolvable(host);'}) %}
-{% endif %}
-{% endfor %}
-{{ data.values()|join("\n") }}
-
-{% if helpers.exists('OPNsense.proxy.pac.rule') %}
-{% for rule in helpers.toList('OPNsense.proxy.pac.rule') %}
-{% if not rule.enabled == '1' %}
-{% continue %}
-{% endif %}
-{% set expression = [] %}
-{# Join type is used to join the checks of the if statement #}
-{% set join_type = ' && ' %}
-{% if rule.join_type == 'or' %}
-{% set join_type = ' || ' %}
-{% endif %}
-{% for match_uuid in rule.matches.split(',') %}
-{% set match = helpers.getUUID(match_uuid) %}
-{# be sure it has not been deleted yet #}
-{% if match != None %}
-{% set match_script = '(' %}
-{% if match.negate == '1' %}
-{% set match_script = match_script + '!' %}
-{% endif %}
-{% if match.match_type == 'url_matches' %}
-{% set match_script = match_script + 'shExpMatch(url, "' + match.url + '")' %}
-{% endif %}
-{% if match.match_type == 'hostname_matches' %}
-{% set match_script = match_script + 'shExpMatch(host, "' + match.hostname + '")' %}
-{% endif %}
-{% if match.match_type == 'dns_domain_is' %}
-{% set match_script = match_script + 'dnsDomainIs(host, "' + match.hostname + '")' %}
-{% endif %}
-{% if match.match_type == 'destination_in_net' %}
-{% set tmp_net = helpers.getIPNetwork(match.network) %}
-{% set match_script = match_script + 'isInNet(dstip, "' + tmp_net.network.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
-{% endif %}
-{% if match.match_type == 'my_ip_in_net' %}
-{% set tmp_net = helpers.getIPNetwork(match.network) %}
-{% set match_script = match_script + 'isInNet(myIpAddress(), "' + tmp_net.network.__str__() + '", "' + tmp_net.netmask.__str__() + '")' %}
-{% endif %}
-{% if match.match_type == 'plain_hostname' %}
-{% set match_script = match_script + 'isPlainHostName(host)' %}
-{% endif %}
-{% if match.match_type == 'is_resolvable' %}
-{% set match_script = match_script + 'is_resolvable' %}
-{% endif %}
-{% if match.match_type == 'dns_domain_levels' %}
-{% set match_script = match_script + '(' + match.domain_level_from + ' <= dl) && (' + match.domain_level_to + ' >= dl)' %}
-{% endif %}
-{% if match.match_type == 'weekday_range' %}
-{% set match_script = match_script + 'weekdayRange("' + match.weekday_from + '", "' + match.weekday_to + '")' %}
-{% endif %}
-{% if match.match_type == 'date_range' %}
-{% set match_script = match_script + 'dateRange("' + match.date_from + '", "' + match.date_to + '")' %}
-{% endif %}
-{% if match.match_type == 'time_range' %}
-{% set match_script = match_script + 'timeRange(' + match.time_from + ', ' + match.time_to + ')' %}
-{% endif %}
-{% set match_script = match_script + ')' %}
-{% do expression.append(match_script) %}
-{% endif %}
-{% endfor %}
-if ({% if rule.match_type == 'unless' %}!{% endif %}({{ expression|join(join_type) }})) {
-{% set proxylist = [] %}
-{% for proxy_uuid in rule.proxies.split(',') %}
-{% set proxy = helpers.getUUID(proxy_uuid) %}
-{% if proxy != None %}
-{% if proxy.proxy_type == 'DIRECT' %}
-{% do proxylist.append("DIRECT") %}
-{% else %}
-{% do proxylist.append(proxy.proxy_type + ' ' + proxy.url) %}
-{% endif %}
-{% endif %}
-{% endfor %}
-return "{{ proxylist|join(';') }}";
-}
-{% endfor %}
-{% else %}
-/* no rules active or defined*/
-{% endif %}
-
-{% endif %}
- // If no rule exists - use a direct connection
- return "DIRECT";
-}
diff --git a/src/opnsense/service/templates/OPNsense/Syslog/local/squid_access.conf b/src/opnsense/service/templates/OPNsense/Syslog/local/squid_access.conf
deleted file mode 100644
index 0f742e2a1..000000000
--- a/src/opnsense/service/templates/OPNsense/Syslog/local/squid_access.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-###################################################################
-# Local syslog-ng configuration filter definition [squid_access].
-###################################################################
-filter f_local_squid_access {
- program("(squid-1)");
-};