From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Question regarding lines 3603 to 3613 in proxy.cgi Date: Wed, 07 Apr 2021 21:36:48 +0100 Message-ID: In-Reply-To: <77634c01-f184-56cc-49f6-b1409015fe94@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8040653350863580637==" List-Id: --===============8040653350863580637== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, > On 5 Apr 2021, at 12:35, Peter M=C3=BCller wro= te: >=20 > Hello development folks, >=20 > since I am currently working on a patch(set?) allowing to enable the web pr= oxy for ORANGE > through the web interface, And why would that be a good idea? > I stumbled across lines 3603 to 3613 in the proxy.cgi file: >=20 >> if ($netsettings{'BLUE_DEV'}) >> { >> print FILE "delay_access 1 allow IPFire_green_network"; >> if (!-z $acl_dst_throttle) { print FILE " for_throttled_urls"; } >> print FILE "\n"; >> print FILE "delay_access 1 deny all\n"; >> } else { >> print FILE "delay_access 1 allow all"; >> if (!-z $acl_dst_throttle) { print FILE " for_throttled_urls"; } >> print FILE "\n"; >> } >=20 > This block appears odd to me, particularly due to the block in lines 3615 t= o 3625: >=20 >> if ($netsettings{'BLUE_DEV'}) >> { >> print FILE "delay_access 2 deny IPFire_ips\n"; >> if (!-z $acl_src_unrestricted_ip) { print FILE "delay_access 2 deny IP= Fire_unrestricted_ips\n"; } >> if (!-z $acl_src_unrestricted_mac) { print FILE "delay_access 2 deny IP= Fire_unrestricted_mac\n"; } >> if (($proxysettings{'AUTH_METHOD'} eq 'ncsa') && (!-z $extgrp)) { print = FILE "delay_access 2 deny for_extended_users\n"; } >> print FILE "delay_access 2 allow IPFire_blue_network"; >> if (!-z $acl_dst_throttle) { print FILE " for_throttled_urls"; } >> print FILE "\n"; >> print FILE "delay_access 2 deny all\n"; >> } >=20 > While the entire CGI is rather - um - hacky at some points, I suspect the f= irst code block > to be related to throttling on GREEN, which is not involved into the presen= ce or absence of > the BLUE interface. Or am I missing something here? It is indeed a file that has been worked on over decades. It isn=E2=80=99t cu= t from just one piece of marble, but made out of many small pieces. However, I do not know what you are asking. What does =E2=80=9Codd code=E2=80= =9D mean? -Michael > Thanks, and best regards, > Peter M=C3=BCller --===============8040653350863580637==--