mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
Fixed Proxy unable to handle max download size correct. Added and started to core 45.
This commit is contained in:
@@ -82,7 +82,6 @@ my @templist=();
|
||||
my $cachemem=0;
|
||||
my $proxy1='';
|
||||
my $proxy2='';
|
||||
my $replybodymaxsize=0;
|
||||
my $browser_regexp='';
|
||||
my $needhup = 0;
|
||||
my $errormessage='';
|
||||
@@ -3870,19 +3869,18 @@ END
|
||||
request_body_max_size $proxysettings{'MAX_OUTGOING_SIZE'} KB
|
||||
END
|
||||
;
|
||||
$replybodymaxsize = 1024 * $proxysettings{'MAX_INCOMING_SIZE'};
|
||||
if ($proxysettings{'MAX_INCOMING_SIZE'} > 0) {
|
||||
if (!-z $acl_src_unrestricted_ip) { print FILE "reply_body_max_size 0 deny IPFire_unrestricted_ips\n"; }
|
||||
if (!-z $acl_src_unrestricted_mac) { print FILE "reply_body_max_size 0 deny IPFire_unrestricted_mac\n"; }
|
||||
if (!-z $acl_src_unrestricted_ip) { print FILE "reply_body_max_size none IPFire_unrestricted_ips\n"; }
|
||||
if (!-z $acl_src_unrestricted_mac) { print FILE "reply_body_max_size none IPFire_unrestricted_mac\n"; }
|
||||
if ($proxysettings{'AUTH_METHOD'} eq 'ncsa')
|
||||
{
|
||||
if (!-z $extgrp) { print FILE "reply_body_max_size 0 deny for_extended_users\n"; }
|
||||
if (!-z $extgrp) { print FILE "reply_body_max_size none for_extended_users\n"; }
|
||||
}
|
||||
}
|
||||
|
||||
if ( $replybodymaxsize != '0' )
|
||||
if ( $proxysettings{'MAX_INCOMING_SIZE'} != '0' )
|
||||
{
|
||||
print FILE "reply_body_max_size $replybodymaxsize deny all\n\n";
|
||||
print FILE "reply_body_max_size $proxysettings{'MAX_INCOMING_SIZE'} KB all\n\n";
|
||||
}
|
||||
|
||||
print FILE "visible_hostname";
|
||||
|
||||
Reference in New Issue
Block a user