From: Michael Tremer <michael.tremer@ipfire.org>
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 [thread overview]
Message-ID: <F9B2FA82-BEF1-4B6B-8DC2-C3EFEDC70665@ipfire.org> (raw)
In-Reply-To: <77634c01-f184-56cc-49f6-b1409015fe94@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 2030 bytes --]
Hello,
> On 5 Apr 2021, at 12:35, Peter Müller <peter.mueller(a)ipfire.org> wrote:
>
> Hello development folks,
>
> since I am currently working on a patch(set?) allowing to enable the web proxy 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:
>
>> 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";
>> }
>
> This block appears odd to me, particularly due to the block in lines 3615 to 3625:
>
>> 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 IPFire_unrestricted_ips\n"; }
>> if (!-z $acl_src_unrestricted_mac) { print FILE "delay_access 2 deny IPFire_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";
>> }
>
> While the entire CGI is rather - um - hacky at some points, I suspect the first code block
> to be related to throttling on GREEN, which is not involved into the presence 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’t cut from just one piece of marble, but made out of many small pieces.
However, I do not know what you are asking. What does “odd code” mean?
-Michael
> Thanks, and best regards,
> Peter Müller
prev parent reply other threads:[~2021-04-07 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-05 11:35 Peter Müller
2021-04-07 20:36 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F9B2FA82-BEF1-4B6B-8DC2-C3EFEDC70665@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox