From 86e16ec35449a2925eae53dc88ee67dbe519c54a Mon Sep 17 00:00:00 2001 From: lgcosta Date: Fri, 26 Aug 2011 02:03:58 -0300 Subject: Add string for port of squid in transparent mode from config file --- config/squid/squid.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 4299abeb..8a4de81e 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -604,7 +604,7 @@ function squid_resync_general() { } } if (($settings['transparent_proxy'] == 'on')) { - $conf .= "http_port 127.0.0.1:80 transparent\n"; + $conf .= "http_port 127.0.0.1:" . $settings['proxy_port'] . " transparent\n"; } $icp_port = ($settings['icp_port'] ? $settings['icp_port'] : 0); @@ -1380,15 +1380,15 @@ function squid_generate_rules($type) { } } foreach ($ifaces as $iface) { - $rules .= "rdr on $iface proto tcp from any to !($iface) port 80 -> 127.0.0.1 port 80\n"; + $rules .= "rdr on $iface proto tcp from any to !($iface) port 80 -> 127.0.0.1 port " . $squid_conf['proxy_port'] . "\n"; } /* Handle PPPOE case */ if(($config['pppoe']['mode'] == "server" && $config['pppoe']['localip']) || (function_exists("is_pppoe_server_enabled") && is_pppoe_server_enabled())) { - $rules .= "rdr on $PPPOE_ALIAS proto tcp from any to !127.0.0.1 port 80 -> 127.0.0.1 port 80\n"; + $rules .= "rdr on $PPPOE_ALIAS proto tcp from any to !127.0.0.1 port 80 -> 127.0.0.1 port " . $squid_conf['proxy_port'] . "\n"; } /* Handle PPTP case */ if($config['pptpd']['mode'] == "server" && $config['pptpd']['localip']) { - $rules .= "rdr on $PPTP_ALIAS proto tcp from any to !127.0.0.1 port 80 -> 127.0.0.1 port 80\n"; + $rules .= "rdr on $PPTP_ALIAS proto tcp from any to !127.0.0.1 port 80 -> 127.0.0.1 port " . $squid_conf['proxy_port'] . "\n"; } $rules .= "\n"; break; -- cgit v1.2.3