From 8bd11f12a7ed5cc05f0ea143e1efc39437b0b4d4 Mon Sep 17 00:00:00 2001 From: doktornotor Date: Fri, 25 Sep 2015 18:16:56 +0200 Subject: squid3 - code style fixes, fix file perms, fix error language, improve descriptions --- config/squid3/34/squid.xml | 579 ++++++++++++++++++++++++++++----------------- 1 file changed, 366 insertions(+), 213 deletions(-) diff --git a/config/squid3/34/squid.xml b/config/squid3/34/squid.xml index 96f2610c..294494da 100644 --- a/config/squid3/34/squid.xml +++ b/config/squid3/34/squid.xml @@ -2,62 +2,58 @@ - - +. - All rights reserved. - */ -/* ========================================================================== */ + squid.xml + part of pfSense (https://www.pfSense.org/) + Copyright (C) 2012-2014 Marcello Coutinho + Copyright (C) 2015 ESF, LLC + All rights reserved. +*/ +/* ====================================================================================== */ /* - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + 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. - 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. - 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. - */ -/* ========================================================================== */ - ]]> - - Describe your package here - Describe your package requirements here - Currently there are no FAQ items provided. + 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. +*/ +/* ====================================================================================== */ + ]]> + squid - 0.2.8 - Proxy server: General settings + 0.3.5 + Proxy Server: General Settings /usr/local/pkg/squid.inc - Proxy server - Modify the proxy server's settings + Squid Proxy Server + Modify the proxy server settings
Services
/pkg_edit.php?xml=squid.xml&id=0
- Reverse Proxy - Modify the proxy reverse server's settings + Squid Reverse Proxy + Modify the reverse proxy server settings
Services
/pkg_edit.php?xml=squid_reverse_general.xml&id=0
@@ -65,19 +61,19 @@ squid squid.sh squid - Proxy server Service + Squid Proxy Server Service clamd clamav-clamd clamd - Clamav Antivirus + ClamAV Antivirus c-icap c-icap c-icap - Icap inteface for squid and clamav integration + ICAP Inteface for Squid and ClamAV integration @@ -114,7 +110,7 @@ /pkg.php?xml=squid_users.xml - Real time + Real Time /squid_monitor.php @@ -122,143 +118,136 @@ /pkg_edit.php?xml=squid_sync.xml - + - /usr/local/pkg/ - 0755 + /usr/local/pkg/ https://packages.pfsense.org/packages/config/squid3/34/squid.inc - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_general.xml - - - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_peer.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse.inc - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_uri.xml + /usr/local/www/shortcuts/ + https://packages.pfsense.org/packages/config/squid3/34/pkg_squid.inc + + - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_sync.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_antivirus.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_sync.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_auth.xml - /usr/local/pkg/ - 0755 + /usr/local/pkg/ https://packages.pfsense.org/packages/config/squid3/34/squid_cache.xml - /usr/local/pkg/ - 0755 + /usr/local/pkg/ https://packages.pfsense.org/packages/config/squid3/34/squid_nac.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_traffic.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_upstream.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_general.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_peer.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse.inc + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_redir.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_auth.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_sync.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_users.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_uri.xml - /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_antivirus.xml + /usr/local/pkg/ + https://packages.pfsense.org/packages/config/squid3/34/squid_sync.xml /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/sqpmon.sh + https://packages.pfsense.org/packages/config/squid3/34/squid_traffic.xml /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/swapstate_check.php + https://packages.pfsense.org/packages/config/squid3/34/squid_upstream.xml /usr/local/pkg/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_reverse_redir.xml + https://packages.pfsense.org/packages/config/squid3/34/squid_users.xml + + + + + /usr/local/www/ + https://packages.pfsense.org/packages/config/squid3/34/squid_clwarn.php - /usr/local/www/ - 0755 + /usr/local/www/ https://packages.pfsense.org/packages/config/squid3/34/squid_monitor.php - /usr/local/www/ - 0755 + /usr/local/www/ https://packages.pfsense.org/packages/config/squid3/34/squid_monitor_data.php + + - /usr/local/www/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_log_parser.php + /usr/local/bin/ + 0755 + https://packages.pfsense.org/packages/config/squid3/34/check_ip.php - /usr/local/www/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/squid_clwarn.php + /usr/local/pkg/ + 0755 + https://packages.pfsense.org/packages/config/squid3/34/sqpmon.sh - /usr/local/www/shortcuts/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/pkg_squid.inc + /usr/local/www/ + 0755 + https://packages.pfsense.org/packages/config/squid3/34/squid_log_parser.php - /usr/local/bin/ - 0755 - https://packages.pfsense.org/packages/config/squid3/34/check_ip.php + /usr/local/pkg/ + 0755 + https://packages.pfsense.org/packages/config/squid3/34/swapstate_check.php + + enabled Squid General Settings listtopic - Proxy interface(s) + Proxy Interface(s) active_interface - The interface(s) the proxy server will bind to. + + + Note: Use CTRL + click to select multiple interfaces. + ]]> + interfaces_selection lan - Proxy port + Proxy Port proxy_port This is the port the proxy server will listen on. input @@ -267,44 +256,71 @@ 3128 - ICP port + ICP Port icp_port - This is the port the Proxy Server will send and receive ICP queries to and from neighbor caches. Leave this blank if you don't want the proxy server to communicate with neighbor caches through ICP. + + + Leave this blank if you don't want the proxy server to communicate with neighbor caches through ICP. + ]]> + input 5 - Allow users on interface + Allow Users on Interface allow_interface - If this field is checked, the users connected to the interface selected in the 'Proxy interface' field will be allowed to use the proxy, i.e., there will be no need to add the interface's subnet to the list of allowed subnets. This is just a shortcut. + + + There will be no need to add the interface's subnet to the list of allowed subnets. + ]]> + checkbox - on - Patch captive portal + Patch Captive Portal patch_cp - - NOTE: You may need to reapply captive portal config after changing this option.]]> + + + Note: You may need to reapply Captive Portal settings after changing this option.
+ Warning: This alters /etc/inc/captiveportal.inc file! USE WITH CAUTION! (A backup is made available under /root directory.) + ]]> +
checkbox
- Resolv dns v4 first + Resolve DNS IPv4 First dns_v4_first - + + + checkbox Disable ICMP disable_pinger - + + + checkbox - Use alternate DNS-servers for the proxy-server + Use Alternate DNS Servers for the Proxy Server dns_nameservers - If you want to use other DNS-servers than the DNS-forwarder, enter the IPs here, separated by semi-colons (;). + + + Note: Separate entries by semi-colons (;) + ]]> + input 70 @@ -313,59 +329,88 @@ listtopic - Transparent HTTP proxy + Transparent HTTP Proxy transparent_proxy - - NOTE: Transparent mode will filter ssl(port 443) if enable men-in-the-middle options below.
- To filter both http and https protocol without intercepting ssl connections, enable WPAD/PAC options on your dns/dhcp.]]>
+ + + Note: Transparent mode will filter SSL (port 443) if you enable man-in-the-middle options below.
+ In order to proxy both HTTP and HTTPS protocols without intercepting SSL connections, configure WPAD/PAC options on your DNS/DHCP servers. + ]]> +
checkbox - transparent_active_interface,private_subnet_proxy_off,defined_ip_proxy_off,defined_ip_proxy_off_dest - + transparent_active_interface,private_subnet_proxy_off,defined_ip_proxy_off,defined_ip_proxy_off_dest
- Transparent Proxy interface(s) + Transparent Proxy Interface(s) transparent_active_interface - The interface(s) the proxy server will transparent intercept requests. + + + Note: Use CTRL + click to select multiple interfaces. + ]]> + interfaces_selection lan - Bypass proxy for Private Address destination + Bypass Proxy for Private Address Destination private_subnet_proxy_off - Do not forward traffic to Private Address Space (RFC 1918) <b>destination</b> through the proxy server but directly through the firewall. + + destinations through the proxy server but let is pass directly through the firewall. + ]]> + checkbox - Bypass proxy for these source IPs + Bypass Proxy for These Source IPs defined_ip_proxy_off - Do not forward traffic from these <b>source</b> IPs, CIDR nets, hostnames, or aliases through the proxy server but directly through the firewall. Separate by semi-colons (;). [Applies only to transparent mode] + + source IPs, CIDR nets, hostnames, or aliases through the proxy server but let it pass directly through the firewall. + (Applies only to transparent mode.)

+ Note: Separate entries by semi-colons (;) + ]]> +
input - 70 + 70
- Bypass proxy for these destination IPs + Bypass Proxy for These Destination IPs defined_ip_proxy_off_dest - Do not proxy traffic going to these <b>destination</b> IPs, CIDR nets, hostnames, or aliases, but let it pass directly through the firewall. Separate by semi-colons (;). [Applies only to transparent mode] + + destination IPs, CIDR nets, hostnames, or aliases, but let it pass directly through the firewall.
+ (Applies only to transparent mode.)

+ Note: Separate entries by semi-colons (;) + ]]> +
input - 70 + 70
- SSL man in the middle Filtering + SSL Man In the Middle Filtering listtopic HTTPS/SSL interception ssl_proxy - + Enable SSL filtering. checkbox - ssl_active_interface,dcert,sslcrtd_children,ssl_proxy_port,interception_checks + ssl_active_interface,dca,sslcrtd_children,ssl_proxy_port,interception_checks - SSL Intercept interface(s) + SSL Intercept Interface(s) ssl_active_interface - The interface(s) the proxy server will intercept ssl requests. + + + Note: Use CTRL + click to select multiple interfaces. + ]]> + interfaces_selection lan @@ -374,7 +419,7 @@ SSL Proxy port ssl_proxy_port - This is the port the proxy server will listen on to intercept ssl while using transparent proxy. + This is the port the proxy server will listen on to intercept SSL while using transparent proxy. input 5 3129 @@ -382,44 +427,62 @@ CA dca - - To create a CA on pfsense, go to system -> Cert Manager
- Install the CA crt as an trusted ca on each computer you want to filter ssl to avoid ssl error on each connection.]]>
- select_source + + + To create a CA on pfSense, go to System -> Cert Manager.
+ Install the CA certificate as a Trusted Root CA on each computer you want to filter SSL on to avoid SSL error on each connection. + ]]> +
+ select_source descr refid
- sslcrtd children + SSL Certificate Deamon Children sslcrtd_children - - if Squid is used in busy environments this may need to be increased, as well as the number of 'sslcrtd_children']]> + + + Default: 5 + ]]> + input 2 5 - Remote Cert checks + Remote Cert Checks interception_checks - Defaul is to do not select any of these options.]]> - select - - + + + Note: Use CTRL + click to select multiple options.
+ ]]> +
+ select + + - - - 3 +
+ + 3
- Certificate adapt + Certificate Adapt interception_adapt - Hint: Set subject CN
wiki doc with reference]]>
+ + + Hint: Set the subject CN - see fake certificate properties documentation for details. + ]]> + select - - - + + + 3 @@ -429,38 +492,49 @@ listtopic
- Enabled logging + Enable Logging log_enabled - This will enable the access log. Don't switch this on if you don't have much disk space left. + + Warning:
Do not switch this on if you don't have much disk space left. + ]]> + checkbox - log_query_terms,log_user_agents + log_dir,log_rotate
- Log store directory + Log Store Directory log_dir - The directory where the log will be stored (note: do not end with a / mark) + + + Default: /var/squid/logs
+ Note: Do NOT include the trailing / when setting a custom location. + ]]> +
input 60 /var/squid/logs
- Log rotate + Rotate Logs log_rotate Defines how many days of logfiles will be kept. Rotation is disabled if left empty. input 5 - Visible hostname + Visible Hostname visible_hostname - This is the URL to be displayed in proxy server error messages. + This is the hostname to be displayed in proxy server error messages. input 60 localhost - Administrator email + Administrator's Email admin_email This is the email address displayed in error messages to the users. input @@ -468,16 +542,71 @@ admin@localhost - Language + Error Language error_language Select the language in which the proxy server will display error messages to users. select en + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - X-Forward Mode + X-Forwarded Header Mode xforward_mode - <p><b> on:</b> Squid will append your client's IP address in the HTTP requests it forwards. (Default)<p> By default it looks like: X-Forwarded-For: 192.1.2.3 <p> <b> off:</b> It will appear as: X-Forwarded-For: unknown<p> <b> transparent:</b> Squid will not alter the X-Forwarded-For header in any way.<p> <b> delete:</b> Squid will delete the entire X-Forwarded-For header.<p> <b> truncate:</b> Squid will remove all existing X-Forwarded-For entries, and place the client IP as the sole entry. + + on:
Squid will append your client's IP address in the HTTP requests it forwards. The header looks like: X-Forwarded-For: 192.1.2.3.
+ off: Squid will NOT append your client's IP address in the HTTP requests it forwards. The header looks like: X-Forwarded-For: unknown
+ transparent: Squid will not alter the X-Forwarded-For header in any way.
+ delete: Squid will delete the entire X-Forwarded-For header.
+ truncate: Squid will remove all existing X-Forwarded-For header entries and place the client's IP address as the only header entry.

+ Default: on + ]]> + select on @@ -489,26 +618,39 @@
- Disable VIA + Disable VIA Header disable_via If not set, Squid will include a Via header in requests and replies as required by RFC2616. checkbox - Log denied pages by squidguard + Log Pages Denied by SquidGuard log_sqd - - Note: This option only will work if you include this code on your sgerror.php file to force client browser send a second request to squid with denied string on url.

- $sge_prefix=(preg_match("/\?/",$cl['u'])?"&":"?");
- $str[] = '< iframe > src="'.$cl['u'].$sge_prefix.'sgr=ACCESSDENIED" width="1" height="1" > < /iframe >';

- removing extra space on iframe html code.]]>
+ + + Note: This option will only work if you include the code below in your sgerror.php file.
+ This forces the client browser to send a second request to Squid with the denied string in URL.

+ $sge_prefix = (preg_match("/\?/", $cl['u']) ? "&" : "?");
+ $str[] = '< iframe > src="'. $cl['u'] . $sge_prefix . 'sgr=ACCESSDENIED" width="1" height="1" > < /iframe >';

+ Hint: You MUST remove extra spaces in the above iframe HTML tags. + ]]> +
checkbox
- What to do with requests that have whitespace characters in the URI + URI Whitespace Characters Handling uri_whitespace - <b> strip:</b> The whitespace characters are stripped out of the URL. This is the behavior recommended by RFC2396. <p> <b> deny:</b> The request is denied. The user receives an "Invalid Request" message.<p> <b> allow:</b> The request is allowed and the URI is not changed. The whitespace characters remain in the URI.<p> <b> encode:</b> The request is allowed and the whitespace characters are encoded according to RFC1738.<p> <b> chop:</b> The request is allowed and the URI is chopped at the first whitespace. - select + + strip: The whitespace characters are stripped out of the URI. This is the behavior recommended by RFC2396. + deny: The request is denied. The user receives an "Invalid Request" message. + allow: The request is allowed and the URI is not changed. The whitespace characters remain in the URI. + encode: The request is allowed and the whitespace characters are encoded according to RFC1738. + chop: The request is allowed and the URI is chopped at the first whitespace. + ]]> + + select strip @@ -521,45 +663,53 @@ Suppress Squid Version disable_squidversion - If set, suppress Squid version string info in HTTP headers and HTML error pages. + Suppresses Squid version string info in HTTP headers and HTML error pages if enabled. checkbox - Custom Settings - listtopic - - Integrations custom_options - + + + textarea 78 5 + - - Custom ACLS (Before_Auth) + + Custom ACLS (Before Auth) custom_options_squid3 - - They need to be squid.conf native options, otherwise squid will NOT work.]]> + + + Warning: These need to be squid.conf native options, otherwise Squid will NOT work. + ]]> + textarea base64 78 10 + - - Custom ACLS (After_Auth) + + Custom ACLS (After Auth) custom_options2_squid3 - - They need to be squid.conf native options, otherwise squid will NOT work.]]> + + + Warning: These need to be squid.conf native options, otherwise Squid will NOT work. + ]]> + textarea base64 78 10 +
- - squid_before_form_general($pkg); - squid_resync(); @@ -568,18 +718,21 @@ squid_resync(); - unlink_if_exists("/usr/local/etc/rc.d/squid"); + + squid_generate_rules
-- cgit v1.2.3