Revision: 5551
          http://ipcop.svn.sourceforge.net/ipcop/?rev=5551&view=rev
Author:   dotzball
Date:     2011-03-24 05:28:14 +0000 (Thu, 24 Mar 2011)

Log Message:
-----------
Fix transparent proxy on openvpn.

Modified Paths:
--------------
    ipcop/trunk/html/cgi-bin/proxy.cgi
    ipcop/trunk/src/misc-progs/restartsquid.c

Modified: ipcop/trunk/html/cgi-bin/proxy.cgi
===================================================================
--- ipcop/trunk/html/cgi-bin/proxy.cgi  2011-03-24 05:26:36 UTC (rev 5550)
+++ ipcop/trunk/html/cgi-bin/proxy.cgi  2011-03-24 05:28:14 UTC (rev 5551)
@@ -496,7 +496,8 @@
                     $errormessage = $Lang::tr{'errmsg non-transparent proxy 
required'};
                     goto ERROR;
                 }
-            } else {
+            }
+            else {
                 if (($proxysettings{'ENABLED_GREEN_1'} eq 'off') || 
($proxysettings{'TRANSPARENT_GREEN_1'} eq 'on'))
                 {
                     $errormessage = $Lang::tr{'errmsg non-transparent proxy 
required'};
@@ -3217,7 +3218,7 @@
     if ($proxysettings{'ENABLED_OVPN'} eq 'on') {
         my $serverip = 
NetAddr::IP->new($ovpnsettings{'DOVPN_SUBNET'})->first()->addr();
         print FILE "http_port $serverip:$proxysettings{'PROXY_PORT'}";
-        # if ($proxysettings{'TRANSPARENT_OVPN'} eq 'on') { print FILE " 
transparent" }
+        if ($proxysettings{'TRANSPARENT_OVPN'} eq 'on') { print FILE " 
transparent" }
         if ($proxysettings{'NO_CONNECTION_AUTH'} eq 'on') { print FILE " 
no-connection-auth" }
         print FILE "\n";
     }

Modified: ipcop/trunk/src/misc-progs/restartsquid.c
===================================================================
--- ipcop/trunk/src/misc-progs/restartsquid.c   2011-03-24 05:26:36 UTC (rev 
5550)
+++ ipcop/trunk/src/misc-progs/restartsquid.c   2011-03-24 05:28:14 UTC (rev 
5551)
@@ -196,7 +196,7 @@
     int enabled_blue = 0;
     int transparent_blue = 0;
     int enabled_ovpn = 0;
-    int transparent_ovpn = 0;       /* currently not implemented */
+    int transparent_ovpn = 0;
     struct stat st;
     NODEKV *squid_kv = NULL;
     char buffer[STRING_SIZE];
@@ -258,7 +258,7 @@
         while ((c++ < 15) && (access("/var/run/squid.pid", F_OK) != -1)) {
             sleep(1);
         }
-        
+
         if (access("/var/run/squid.pid", F_OK) != -1) {
             verbose_printf(1, "Really shutdown squid ... \n");
             safe_system("/usr/bin/killall -9 squid >/dev/null 2>/dev/null");
@@ -402,7 +402,7 @@
                     enabled_blue && transparent_blue);
     }
 
-    /*  TODO: disable transparence for OpenVPN networks, but only for 
+    /*  TODO: disable transparence for OpenVPN networks, but only for
         OpenVPN net-2-net which we currently have not implemented */
 
     /* choose RED destination: 'localip' or 'red_netaddress/red_netmask' */


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn

Reply via email to