SquidSecurity2.5.10_4Alphapackageftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/www/squid-2.5.10_4.tbzpackageftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/www/squidGuard-1.2.0_1.tbzconfigfilehttp://www.pfsense.com/packages/config/squid_upstream.xmlconfigfilehttp://www.pfsense.com/packages/config/squid_cache.xmlconfigfilehttp://www.pfsense.com/packages/config/squid_nac.xmlconfigfilehttp://www.pfsense.com/packages/config/squid_traffic.xmlconfigfilehttp://www.pfsense.com/packages/config/squid_auth.xmlconfigfilehttp://www.pfsense.com/packages/config/squid_users.xmlinstalledpackages->package->$packagename->configuration->settingsGeneral Settings/pkg_edit.php?xml=squid1.xml&id=0Upstream Proxy/pkg_edit.php?xml=squid_upstream.xml&id=0Cache Mgmt/pkg_edit.php?xml=squid_cache.xml&id=0Network Access Control/pkg_edit.php?xml=squid_nac.xml&id=0Traffic Mgmt/pkg_edit.php?xml=squid_traffic.xml&id=0Authentication Settings/pkg_edit.php?xml=squid_auth.xml&id=0Users/pkg_edit.php?xml=squid_users.xml&id=0Listening Interfaceactive_interfaceThis defines the active listening interface to which the proxy server will listen for its requests.interfaces_selectionTransparent Proxytransparent_proxyIf transparent mode is enabled; all requests for destination port 80 will be forwarded to the proxy server without any additional configuration necessary.checkboxLog Enabledlog_enabledThis enables the Web Proxy logging feature. All clients requests will be written to a log file viewable under Services -> Proxy Log.checkboxLog Query Termslog_query_termsThis will log the complete URL rather than the part of the URL containing dynamic queries.checkboxLog User Agentslog_user_agentsThis will enable the useragent string to be written to a separate log. The results are not shown in the GUI and should only be used for debugging purposes.checkboxtrueProxy Portproxy_portThis is the port the Proxy Server will listen for client requests on. The default is 3128.4inputVisible Hostnamevisible_hostnameThis URL is displayed on the Proxy Server error messages.35inputCache Administrator E-Mailcache_admin_emailThis E-Mail address is displayed on the Proxy Server error messages.35inputError Messages Languageerror_languageSelect the language in which the Proxy Server shall display error messages to users.select
function write_squid_config() {
conf_mount_rw();
config_lock();
global $config;
$fout = fopen("/usr/local/etc/squid/squid.conf","w");
if ($active_interface != "") {
lan_iface = $active_interface['if'];
listen_ip = $lan_iface['ipaddr'];
iface_subnet_address = gen_subnet($lan_iface['ipaddr'], $lan_iface['subnet']);
iface_subnet_network = $lan_iface['subnet'];
}
fwrite($fout, "shutdown_lifetime 5 seconds\n");
fwrite($fout, "icp_port 3130\n");
fwrite($fout, "\n");
if ($http_port == "") $http_port="3128";
fwrite($fout, "http_port " . $listen_ip . " " . $proxy_port . "\n");
fwrite($fout, "\n");
fwrite($fout, "acl QUERY urlpath_regex cgi-bin \?\n");
fwrite($fout, "non_cache deny QUERY\n");
fwrite($fout, "cache_effective_user squid\n");
fwrite($fout, "cache_effective_group squid\n");
fwrite($fout, "pid_filename /var/run/squid.pid\n");
fclose($fout);
}
function sync_package_squid;
write_squid_config();
mwexec("/usr/local/sbin/squid -k reconfigure");
conf_mount_ro();
config_unlock();
}
sync_package_squid();
function sync_package_squid;
write_squid_config();
mwexec("/usr/local/sbin/squid -k reconfigure");
conf_mount_ro();
config_unlock();
}
sync_package_squid();