aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/squid_cache.xml151
-rw-r--r--packages/squid_nac.xml121
-rw-r--r--packages/squid_ng.xml305
-rw-r--r--packages/squid_upstream.xml105
4 files changed, 682 insertions, 0 deletions
diff --git a/packages/squid_cache.xml b/packages/squid_cache.xml
new file mode 100644
index 00000000..0fd39977
--- /dev/null
+++ b/packages/squid_cache.xml
@@ -0,0 +1,151 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<packagegui>
+ <info>
+ <name>Squid Cache Management</name>
+ </info>
+
+ <files></files>
+ <menus></menus>
+
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+
+ <tabs>
+ <tab>
+ <text>General Settings</text>
+ <url>/pkg_edit.php?xml=squid1.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Upstream Proxy</text>
+ <url>/pkg_edit.php?xml=squid_upstream.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Cache Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_cache.xml&amp;id=0</url>
+ <active/>
+ </tab>
+
+ <tab>
+ <text>Network Access Control</text>
+ <url>/pkg_edit.php?xml=squid_nac.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Traffic Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_traffic.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Authentication Settings</text>
+ <url>/pkg_edit.php?xml=squid_auth.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Users</text>
+ <url>/pkg_edit.php?xml=squid_users.xml&amp;id=0</url>
+ </tab>
+ </tabs>
+
+ <fields>
+ <field>
+ <fielddescr>Memory Cache Size (MB)</fielddescr>
+ <fieldname>memory_cache_size</fieldname>
+ <description>This is the amount of physical RAM to be used for negative cache and in-transit objects. This value should not exceed more than 50% of installed RAM. The minimum value is 1MB; the default is 2MB</description>
+ <size>4</size>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Hard Disk Cache Size (MB)</fielddescr>
+ <fieldname>harddisk_cache_size</fieldname>
+ <description>This is the amount of disk space (MB) to use for cached objects. The default is 50MB.</description>
+ <size>4</size>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Minimum Object Size (KB)</fielddescr>
+ <fieldname>minimum_object_size</fieldname>
+ <description>Objects smaller than the size specified will not be saved on disk. This value is specified in kilobytes and the default is 0, meaning there is no minimum.</description>
+ <size>4</size>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Maximum Object Size (KB)</fielddescr>
+ <fieldname>maximum_object_size</fieldname>
+ <description>Objects larger than the size specified will not be saved on disk. This value is specified in kilobytes and the default is 4MB. If you wish to increase speed more than you want to save bandwidth, this should be set to a low value.</description>
+ <size>4</size>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Number of Level-1 Subdirectories</fielddescr>
+ <fieldname>level_subdirs</fieldname>
+ <description>The default for this value is 16. Each level-1 directory contains 256 subdirectories, so a value of 256 level-1 directories will use a total of 65536 directories for the hard disk cache. This will significantly slow down the startup process of the proxy service, but can speed up the caching under certain conditions.</description>
+ <type>select</type>
+ <options>
+ <option><name>16</name><value>16</value></option>
+ <option><name>32</name><value>32</value></option>
+ <option><name>64</name><value>64</value></option>
+ <option><name>128</name><value>128</value></option>
+ <option><name>256</name><value>256</value></option>
+ </options>
+ </field>
+
+ <field>
+ <fielddescr>Memory Replacement Policy</fielddescr>
+ <fieldname>memory_replacement</fieldname>
+ <description>The memory replacement policy determines which objects are purged from memory when space is needed. The default policy for memory replacement is GSDF. &lt;p&gt; &lt;b&gt; LRU: Last Recently Used Policy &lt;/b&gt; - The LRU policies keep recently referenced objects. i.e., it replaces the object that has not been accessed for the longest time. &lt;p&gt; &lt;b&gt; Heap GSDF: Greedy-Dual Size Frequency &lt;/b&gt; - The Heap GSDF policy optimizes object-hit rate by keeping smaller, popular objects in cache. It achieves a lower byte hit rate than LFUDA though, since it evicts larger (possibly popular) objects. &lt;p&gt; &lt;b&gt; Heap LFUDA: Least Frequently Used with Dynamic Aging &lt;/b&gt; - The Heap LFUDA policy keeps popular objects in cache regardless of their size and thus optimizes byte hit rate at the expense of hit rate since one large, popular object will prevent many smaller, slightly less popular objects from being cached. &lt;p&gt; &lt;b&gt; Heap LRU: Last Recently Used &lt;/b&gt; - Works like LRU, but uses a heap instead. &lt;p&gt; Note: If using the LFUDA replacement policy, the value of Maximum Object Size should be increased above its default of 4096 KB to maximuze the potential byte hit rate improvement of LFUDA.</description>
+ <type>select</type>
+ <options>
+ <option><name>LRU</name><value>lru</value></option>
+ <option><name>Heap LFUDA</name><value>heap_lfuda</value></option>
+ <option><name>Heap GDSF</name><value>heap_gdsf</value></option>
+ <option><name>Heap LRU</name><value>heap_lru</value></option>
+ </options>
+ </field>
+
+ <field>
+ <fielddescr>Cache Replacement Policy</fielddescr>
+ <fieldname>cache_replacement</fieldname>
+ <description>The cache replacement policy decides which objects will remain in cache and which objects are replaced to create space for the new objects. The default policy for cache replacement is LFUDA.</description>
+ <type>select</type>
+ <options>
+ <option><name>LRU</name><value>lru</value></option>
+ <option><name>Heap LFUDA</name><value>heap_lfuda</value></option>
+ <option><name>Heap GDSF</name><value>heap_gdsf</value></option>
+ <option><name>Heap LRU</name><value>heap_lru</value></option>
+ </options>
+ </field>
+
+ <field>
+ <fielddescr>Do not cache these domains</fielddescr>
+ <fieldname>no_cache_domains</fieldname>
+ <type>rowhelper</type>
+ <rowhelper>
+ <rowhelperfield>
+ <fielddescr>Domain</fielddescr>
+ <fieldname>domain</fieldname>
+ <description>If required, the specified domains will never be cached.</description>
+ <type>input</type>
+ <size>40</size>
+ </rowhelperfield>
+ </rowhelper>
+ </field>
+
+ <field>
+ <fielddescr>Enable Offline Mode</fielddescr>
+ <fieldname>enable_offline</fieldname>
+ <description></description>
+ <type>checkbox</type>
+ </field>
+
+ </fields>
+</packagegui> \ No newline at end of file
diff --git a/packages/squid_nac.xml b/packages/squid_nac.xml
new file mode 100644
index 00000000..39ab565a
--- /dev/null
+++ b/packages/squid_nac.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<packagegui>
+ <info>
+ <name>Squid Cache Management</name>
+ </info>
+
+ <files></files>
+ <menus></menus>
+
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+
+ <tabs>
+ <tab>
+ <text>General Settings</text>
+ <url>/pkg_edit.php?xml=squid1.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Upstream Proxy</text>
+ <url>/pkg_edit.php?xml=squid_upstream.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Cache Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_cache.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Network Access Control</text>
+ <url>/pkg_edit.php?xml=squid_nac.xml&amp;id=0</url>
+ <active/>
+ </tab>
+
+ <tab>
+ <text>Traffic Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_traffic.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Authentication Settings</text>
+ <url>/pkg_edit.php?xml=squid_auth.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Users</text>
+ <url>/pkg_edit.php?xml=squid_users.xml&amp;id=0</url>
+ </tab>
+ </tabs>
+
+ <fields>
+ <field>
+ <fielddescr>Allowed Subnets</fielddescr>
+ <fieldname>allowed_subnets</fieldname>
+ <type>rowhelper</type>
+ <rowhelper>
+ <rowhelperfield>
+ <fielddescr>Network Address</fielddescr>
+ <fieldname>allowed_network_address</fieldname>
+ <type>input</type>
+ <size>32</size>
+ <validation>number</validation>
+ </rowhelperfield>
+
+ <rowhelperfield>
+ <fielddescr>Subnet Mask</fielddescr>
+ <fieldname>allowed_subnet_mask</fieldname>
+ <type>select</type>
+ <options>
+ <option><name>1</name><value>1</value></option>
+ <option><name>2</name><value>2</value></option>
+ <option><name>3</name><value>3</value></option>
+ <option><name>4</name><value>4</value></option>
+ <option><name>5</name><value>4</value></option>
+ <option><name>6</name><value>4</value></option>
+ <option><name>7</name><value>4</value></option>
+ <option><name>8</name><value>4</value></option>
+ <option><name>9</name><value>4</value></option>
+ <option><name>10</name><value>4</value></option>
+ <option><name>11</name><value>4</value></option>
+ <option><name>12</name><value>4</value></option>
+ <option><name>13</name><value>4</value></option>
+ <option><name>14</name><value>4</value></option>
+ <option><name>15</name><value>4</value></option>
+ <option><name>16</name><value>4</value></option>
+ <option><name>17</name><value>4</value></option>
+ <option><name>18</name><value>4</value></option>
+ <option><name>19</name><value>4</value></option>
+ <option><name>20</name><value>4</value></option>
+ <option><name>21</name><value>4</value></option>
+ <option><name>22</name><value>4</value></option>
+ <option><name>23</name><value>4</value></option>
+ <option><name>24</name><value>4</value></option>
+ <option><name>25</name><value>4</value></option>
+ <option><name>26</name><value>4</value></option>
+ <option><name>27</name><value>4</value></option>
+ <option><name>28</name><value>4</value></option>
+ <option><name>29</name><value>4</value></option>
+ <option><name>30</name><value>4</value></option>
+ <option><name>31</name><value>4</value></option>
+ <option><name>32</name><value>4</value></option>
+ </options>
+ </rowhelperfield>
+ </rowhelper>
+ </field>
+
+ <field>
+ <fielddescr>Unrestricted IP Addresses</fielddescr>
+ <fieldname>unrestricted_ip_address</fieldname>
+ <type>rowhelper</type>
+ <rowhelper>
+ <rowhelperfield>
+ <fielddescr>IP Address</fielddescr>
+ <fieldname>unrestricted_ip_address</fieldname>
+ <type>input</type>
+ </rowhelperfield>
+ </rowhelper>
+ </field>
+
+ </fields>
+</packagegui> \ No newline at end of file
diff --git a/packages/squid_ng.xml b/packages/squid_ng.xml
new file mode 100644
index 00000000..f2ae25ac
--- /dev/null
+++ b/packages/squid_ng.xml
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<packagegui>
+ <info>
+ <name>Squid</name>
+ <category>Security</category>
+ <version>2.5.10_4</version>
+ <status>Alpha</status>
+ </info>
+
+ <files>
+ <file>
+ <type>package</type>
+ <location>ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/www/squid-2.5.10_4.tbz</location>
+ </file>
+ <file>
+ <type>package</type>
+ <location>ftp://ftp.freebsd.org/pub/FreeBSD/ports/packages/www/squidGuard-1.2.0_1.tbz</location>
+ </file>
+
+ <!-- retrieves the configuration file for upstream proxy settings -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_upstream.xml</location>
+ </file>
+
+ <!-- retrieves the configuration file for cache management -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_cache.xml</location>
+ </file>
+
+ <!-- retrieves the configuration file for network access control -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_nac.xml</location>
+ </file>
+
+ <!-- retrieves the configuration file for traffic management -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_traffic.xml</location>
+ </file>
+
+ <!-- retrieves the configuration file for authentication settings -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_auth.xml</location>
+ </file>
+
+ <!-- retrieves the configuration file for user definitions -->
+ <file>
+ <type>configfile</type>
+ <location>http://www.pfsense.com/packages/config/squid_users.xml</location>
+ </file>
+
+ </files>
+
+ <menus>
+ <menu>
+ <name>Squid Advanced Proxy</name>
+ <tooltiptext>Modify settings for Squid Advanced Proxy</tooltiptext>
+ <section>Services</section>
+ </menu>
+ </menus>
+
+ <!-- This defines the location where the config is stored within pfSense's
+ xml based global store -->
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+
+ <tabs>
+ <tab>
+ <text>General Settings</text>
+ <url>/pkg_edit.php?xml=squid1.xml&amp;id=0</url>
+ <active/>
+ </tab>
+
+ <tab>
+ <text>Upstream Proxy</text>
+ <url>/pkg_edit.php?xml=squid_upstream.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Cache Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_cache.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Network Access Control</text>
+ <url>/pkg_edit.php?xml=squid_nac.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Traffic Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_traffic.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Authentication Settings</text>
+ <url>/pkg_edit.php?xml=squid_auth.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Users</text>
+ <url>/pkg_edit.php?xml=squid_users.xml&amp;id=0</url>
+ </tab>
+ </tabs>
+
+ <fields>
+ <field>
+ <fielddescr>Listening Interface</fielddescr>
+ <fieldname>active_interface</fieldname>
+ <description>This defines the active listening interface to which the proxy server will listen for its requests.</description>
+ <type>interfaces_selection</type>
+ </field>
+
+ <field>
+ <fielddescr>Transparent Proxy</fielddescr>
+ <fieldname>transparent_proxy</fieldname>
+ <description>If transparent mode is enabled; all requests for destination port 80 will be forwarded to the proxy server without any additional configuration necessary.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Log Enabled</fielddescr>
+ <fieldname>log_enabled</fieldname>
+ <description>This enables the Web Proxy logging feature. All clients requests will be written to a log file viewable under Services -> Proxy Log.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Log Query Terms</fielddescr>
+ <fieldname>log_query_terms</fieldname>
+ <description>This will log the complete URL rather than the part of the URL containing dynamic queries.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Log User Agents</fielddescr>
+ <fieldname>log_user_agents</fieldname>
+ <description>This 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.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <combinefieldsend>true</combinefieldsend>
+ <fielddescr>Proxy Port</fielddescr>
+ <fieldname>proxy_port</fieldname>
+ <description>This is the port the Proxy Server will listen for client requests on. The default is 3128.</description>
+ <size>4</size>
+ <type>input</type>
+ </field>
+
+ <field>
+ <fielddescr>Visible Hostname</fielddescr>
+ <fieldname>visible_hostname</fieldname>
+ <description>This URL is displayed on the Proxy Server error messages.</description>
+ <size>35</size>
+ <type>input</type>
+ </field>
+
+ <field>
+ <fielddescr>Cache Administrator E-Mail</fielddescr>
+ <fieldname>cache_admin_email</fieldname>
+ <description>This E-Mail address is displayed on the Proxy Server error messages.</description>
+ <size>35</size>
+ <type>input</type>
+ </field>
+
+ <field>
+ <fielddescr>Error Messages Language</fielddescr>
+ <fieldname>error_language</fieldname>
+ <description>Select the language in which the Proxy Server shall display error messages to users.</description>
+ <type>select</type>
+ <options>
+ <option><name>Bulgarian</name><value>bulgarian</value></option>
+ <option><name>Catalan</name><value>catalan</value></option>
+ <option><name>Czech</name><value>czech</value></option>
+ <option><name>Danish</name><value>danish</value></option>
+ <option><name>Dutch</name><value>dutch</value></option>
+ <option><name>English</name><value>english</value></option>
+ <option><name>Estonian</name><value>estonian</value></option>
+ <option><name>Finnish</name><value>finnish</value></option>
+ <option><name>French</name><value>french</value></option>
+ <option><name>German</name><value>german</value></option>
+ <option><name>Hebrew</name><value>hebrew</value></option>
+ <option><name>Hungarian</name><value>hungarian</value></option>
+ <option><name>Italian</name><value>italian</value></option>
+ <option><name>Japanese</name><value>japanese</value></option>
+ <option><name>Korean</name><value>korean</value></option>
+ <option><name>Lithuanian</name><value>lithuanian</value></option>
+ <option><name>Polish</name><value>polish</value></option>
+ <option><name>Portuguese</name><value>portuguese</value></option>
+ <option><name>Romanian</name><value>romanian</value></option>
+ <option><name>Russian-1251</name><value>russian_1251</value></option>
+ <option><name>Russian-koi8-r</name><value>russian_koi8</value></option>
+ <option><name>Serbian</name><value>serbian</value></option>
+ <option><name>Simplified Chinese</name><value>simplified_chinese</value></option>
+ <option><name>Slovak</name><value>slovak</value></option>
+ <option><name>Spanish</name><value>spanish</value></option>
+ <option><name>Swedish</name><value>swedish</value></option>
+ <option><name>Traditional Chinese</name><value>traditional_chinese</value></option>
+ <option><name>Turkish</name><value>turkish</value></option>
+ </options>
+ </field>
+
+ </fields>
+
+ <!-- The below writes the configuration as defined by the GUI options -->
+
+ <custom_php_global_functions>
+ function write_squid_config() {
+ conf_mount_rw(); <!-- mounts filesystems in read/write mode -->
+ config_lock(); <!-- locks the config file -->
+ global $config;
+
+ $fout = fopen("/usr/local/etc/squid/squid.conf","w");
+
+ <!-- if listening interface is specified, identifies the ip address -->
+ 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'];
+ }
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option shutdown_lifetime:
+ this puts squid into shutdown pending mode until all sockets are
+ closed. any active clients after the specified seconds will
+ receive a 'timeout'.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ fwrite($fout, "shutdown_lifetime 5 seconds\n");
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option icp_port:
+ the port where squid sends and receives ICP queries to and from
+ neighbor caches. a value of "0" disables this feature. default
+ is "3130".
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ fwrite($fout, "icp_port 3130\n");
+ fwrite($fout, "\n");
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option http_port:
+ this specifies the ip address/port that squid will be listening
+ on for requests. the below evaluates if a value was entered for
+ the listening port and defines the value.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ if ($http_port == "") $http_port="3128";
+ fwrite($fout, "http_port " . $listen_ip . " " . $proxy_port . "\n");
+
+ fwrite($fout, "\n");
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option acl QUERY urlpath_regex cgi-bin \?:
+ option non_cache deny QUERY:
+ this forces squid to never cache files in the below specified
+ directory for security and performance reasons.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ fwrite($fout, "acl QUERY urlpath_regex cgi-bin \?\n");
+ fwrite($fout, "non_cache deny QUERY\n");
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option cache_effective_user:
+ option cache_effective_group:
+ this specifies the UID/GID that the cache process will run on.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ fwrite($fout, "cache_effective_user squid\n");
+ fwrite($fout, "cache_effective_group squid\n");
+
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ option pid_filename:
+ this specifies the path and filename to write the process-id to.
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ fwrite($fout, "pid_filename /var/run/squid.pid\n");
+
+ fclose($fout);
+ }
+ </custom_php_global_functions>
+
+ <custom_add_php_command>
+ function sync_package_squid;
+ write_squid_config();
+ mwexec("/usr/local/sbin/squid -k reconfigure");
+ conf_mount_ro(); <!-- mounts filesystems in read only mode -->
+ config_unlock(); <!-- unlock the config file -->
+ }
+
+ sync_package_squid();
+ </custom_add_php_command>
+
+ <custom_php_resync_command>
+ function sync_package_squid;
+ write_squid_config();
+ mwexec("/usr/local/sbin/squid -k reconfigure");
+ conf_mount_ro(); <!-- mounts filesystems in read only mode -->
+ config_unlock(); <!-- unlock the config file -->
+ }
+
+ sync_package_squid();
+ </custom_php_resync_command>
+
+</packagegui>
+ \ No newline at end of file
diff --git a/packages/squid_upstream.xml b/packages/squid_upstream.xml
new file mode 100644
index 00000000..3d18924f
--- /dev/null
+++ b/packages/squid_upstream.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<packagegui>
+ <info>
+ <name>Squid Upstream Proxy</name>
+ </info>
+
+ <files></files>
+ <menus></menus>
+
+ <configpath>installedpackages->package->$packagename->configuration->settings</configpath>
+
+ <tabs>
+ <tab>
+ <text>General Settings</text>
+ <url>/pkg_edit.php?xml=squid1.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Upstream Proxy</text>
+ <url>/pkg_edit.php?xml=squid_upstream.xml&amp;id=0</url>
+ <active/>
+ </tab>
+
+ <tab>
+ <text>Cache Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_cache&.xmlamp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Network Access Control</text>
+ <url>/pkg_edit.php?xml=squid_nac.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Traffic Mgmt</text>
+ <url>/pkg_edit.php?xml=squid_traffic.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Authentication Settings</text>
+ <url>/pkg_edit.php?xml=squid_auth.xml&amp;id=0</url>
+ </tab>
+
+ <tab>
+ <text>Users</text>
+ <url>/pkg_edit.php?xml=squid_users.xml&amp;id=0</url>
+ </tab>
+ </tabs>
+
+ <fields>
+ <field>
+ <fielddescr>Proxy Address Forwarding</fielddescr>
+ <fieldname>proxy_forwarding</fieldname>
+ <description>This option will enable the Proxy Server to forward requests to an upstream server.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Client IP Address Forwarding</fielddescr>
+ <fieldname>client_ip_forwardining</fieldname>
+ <description>This option will enable the client IP address to be forwarded to the upstream proxy server.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Username Forwarding</fielddescr>
+ <fieldname>user_forwarding</fieldname>
+ <description>This option will enable the username to be forwarded to the upstream proxy server.</description>
+ <type>checkbox</type>
+ </field>
+
+ <field>
+ <fielddescr>Upstream Proxy Hostname</fielddescr>
+ <fieldname>upstream_proxy</fieldname>
+ <description>Enter the IP address or host name of the upstream proxy server.</description>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Upstream Proxy Port</fielddescr>
+ <fieldname>upstream_proxy_port</fieldname>
+ <description>Enter the port to use with the upstream proxy server. If no port is specified, the default is set to port "80".</description>
+ <size>4</size>
+ <type>input</type>
+ <validation>number</validation>
+ </field>
+
+ <field>
+ <fielddescr>Upstream Username</fielddescr>
+ <fieldname>upstream_username</fieldname>
+ <description>If the upstream proxy requires a username, specify it here.</description>
+ <type>input</type>
+ </field>
+
+ <field>
+ <fielddescr>Upstream Password</fielddescr>
+ <fieldname>upstream_password</fieldname>
+ <description>If the upstream proxy server requires a password with the above username, specify it here.</description>
+ <type>password</type>
+ </field>
+ </fields>
+
+</packagegui> \ No newline at end of file