From 08d73b3af6569a0013f0e836a7b18c79b4a55b3b Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sat, 26 Feb 2005 23:02:20 +0000 Subject: Revert to 1.5 which actually works. --- packages/squid.xml | 108 ++++++++++------------------------------------------- 1 file changed, 20 insertions(+), 88 deletions(-) (limited to 'packages/squid.xml') diff --git a/packages/squid.xml b/packages/squid.xml index f2eccb40..e7cc3688 100644 --- a/packages/squid.xml +++ b/packages/squid.xml @@ -1,69 +1,14 @@ - ['installedpackages']['squid']['config'] - pkg_edit.php?xml=squid.xml&id=0&savemsg=Settings%20saved. - squid - 2.5.7_5 - - Squid - Squid-Cache Proxy -
Services
- pkg_edit.php?xml=squid.xml&id=0 -
- - - hostname - visable_hostname - note: if left empty your default hostname will be used. - input - - - http_port - http_port - note: default proxy port is 3128. - input - - - httpd_accel_with_proxy - httpd_accel_with_proxy - enabled by default - select - - - - - - - cache size [MB] - cache_mem - hint: fill 1/3 of the cache memory size you want squid to use. - input - - - admin email - cache_mgr - - input - - - blocked words - rowhelper - - - badURL - url that contain any of the words will be blocked. - input - - - - - - - - function sync_package() { - conf_mount_rw(); - config_lock(); - system("/bin/mkdir /usr/local/etc/squid 2>/dev/null"); + squid + + + ['installedpackages']['squid']['config'] + + + echo "<pre>"; + system("/bin/mkdir /usr/local/etc/squid"); $lancfg = $config['interfaces']['lan']; $lanif = $lancfg['if']; $lanip = $lancfg['ipaddr']; @@ -72,11 +17,6 @@ $netmask = ""; $fout = fopen("/usr/local/etc/squid/squid.conf","w"); fwrite($fout, "# cat squid.conf\n"); - fwrite($fout, "visable_hostname " . $_POST['hostname'] . "\n"); - fwrite($fout, "http_port " . $_POST['http_port'] . "\n"); - fwrite($fout, "httpd_accel_with_proxy " . $_POST['httpd_accel_with_proxy'] . "\n"); - fwrite($fout, "cache_mem " . $_POST['cache_mem'] . "\n"); - fwrite($fout, "cache_mgr " . $_POST['cache_mgr'] . "\n"); fwrite($fout, "http_port 3128\n"); fwrite($fout, "icp_port 0\n"); fwrite($fout, "acl localnet src " . $lansa . "/" . $lansn . "\n"); @@ -89,36 +29,28 @@ fwrite($fout, "http_access deny !Safe_ports\n"); fwrite($fout, "http_access deny CONNECT\n"); fwrite($fout, "http_access deny all\n"); + fwrite($fout, "visible_hostname pfSense\n"); fwrite($fout, "httpd_accel_host virtual\n"); fwrite($fout, "httpd_accel_port 80\n"); fwrite($fout, "httpd_accel_with_proxy on\n"); fwrite($fout, "httpd_accel_uses_host_header on\n"); - /* fwrite($fout, "badURL " . $_POST['badURL'] . "\n"); */ fclose($fout); $fout = fopen("/usr/local/etc/rc.d/squid.sh","w"); fwrite($fout, "#!/bin/sh\n"); fwrite($fout, "/usr/local/sbin/squid\n\n"); fclose($fout); - conf_mount_ro(); - config_unlock(); system("chmod a+x /usr/local/etc/rc.d/squid.sh"); system("/usr/local/sbin/squid -z"); system("/usr/local/sbin/squid"); filter_configure(); - } - - - sync_package(); - - - sync_package(); - - /usr/local/sbin/squid - - exec("mv /var/db/pkg/squid* /tmp/ 2>/dev/null"); - filter_configure(); - - - - squid + + /usr/local/sbin/squid + + exec("mv /var/db/pkg/squid* /tmp/"); + filter_configure(); + exec("mv /tmp/squid* /var/db/pkg/"); + + + + squid
-- cgit v1.2.3