From 2da8ba225d6c7ae46f3fb1622f7c9fecf01e83d6 Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Thu, 9 Apr 2015 16:16:43 +0200 Subject: [PATCH] Proxy service work in progress, added options --- src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml | 7 ++++++- src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt | 10 ++++++++-- .../service/templates/OPNsense/Proxy/squid.conf | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml b/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml index 601f9dd55..912ca3156 100644 --- a/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml +++ b/src/opnsense/mvc/app/models/OPNsense/Proxy/Proxy.xml @@ -9,6 +9,12 @@ 0 Y + + 1 + 65535 + "ICP port needs to be an integer value between 1 and 65535" + N + @@ -31,7 +37,6 @@ - 1 diff --git a/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt b/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt index 49ad99caa..78f906316 100644 --- a/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt +++ b/src/opnsense/mvc/app/views/OPNsense/Proxy/index.volt @@ -178,6 +178,12 @@ maxheight: define max height of select box, default=170px to hold 5 items 'type':'checkbox', 'help':'Enable or disable the proxy service.' ], + ['id': 'proxy.general.icpPort', + 'label':'ICP port', + 'type':'text', + 'help':'The port number where Squid sends and receives ICP queries to + and from neighbor caches. Leave blank to disable (default). The standard UDP port for ICP is 3130.' + ], ['id': 'proxy.general.logging.enable.accessLog', 'label':'Enable access logging', 'type':'checkbox', @@ -194,8 +200,8 @@ maxheight: define max height of select box, default=170px to hold 5 items 'label':'Use alternate DNS-servers', 'type':'select_multiple', 'style':'tokenize', - 'help':'Type IPs of alternative DNS servers you like to use.', - 'hint':'Type IP adresses, followed by Enter.', + 'help':'Type IPs of alternative DNS servers you like to use.
TIP: You can also paste a comma seperated list into this field.
', + 'hint':'Type IP adresses, followed by Enter or comma.', 'allownew':'true', 'advanced':'true' ], diff --git a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf index 17d319581..7c816fea0 100644 --- a/src/opnsense/service/templates/OPNsense/Proxy/squid.conf +++ b/src/opnsense/service/templates/OPNsense/Proxy/squid.conf @@ -139,4 +139,9 @@ via off # Suppres http version string (default=off) httpd_suppress_version_string on {% endif %} +{% endif %} +{% if helpers.exists('OPNsense.proxy.general.icpPort') %} +{% if OPNsense.proxy.general.icpPort != '' %} +icp_port {{OPNsense.proxy.general.icpPort}} +{% endif %} {% endif %} \ No newline at end of file