Implement squid "workers". (#4393)

This commit is contained in:
Andy Binder 2024-12-19 08:53:05 +01:00 committed by GitHub
parent fc5629d810
commit fee8f412d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 0 deletions

View file

@ -339,6 +339,13 @@
<allownew>true</allownew>
<help>Create a list of sites which may not be inspected, for example bank sites. Prefix the domain with a . to accept all subdomains (e.g. .google.com).</help>
</field>
<field>
<id>proxy.forward.workers</id>
<label>Number of squid workers</label>
<type>text</type>
<help>Start N main Squid process daemons (i.e., SMP mode). Requires Restart. Default: 1</help>
<advanced>true</advanced>
</field>
<field>
<id>proxy.forward.ssl_crtd_storage_max_size</id>
<label>SSL cache size</label>

View file

@ -282,6 +282,12 @@
<Mask>/^([a-zA-Z0-9\.:\[\]\s\-]*?,)*([a-zA-Z0-9\.:\[\]\s\-]*)$/</Mask>
<ValidationMessage>Please enter ip addresses or domain names here</ValidationMessage>
</sslnobumpsites>
<workers type="IntegerField">
<Default>1</Default>
<MinimumValue>1</MinimumValue>
<MaximumValue>100</MaximumValue>
<ValidationMessage>worker number needs to be an integer value between 1 and 100</ValidationMessage>
</workers>
<ssl_crtd_storage_max_size type="IntegerField">
<Required>Y</Required>
<Default>4</Default>

View file

@ -53,6 +53,10 @@
{% endfor %}
{% endif %}
{% if not helpers.empty('OPNsense.proxy.forward.workers') %}
workers {{ OPNsense.proxy.forward.workers }}
{% 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