mirror of
https://git.proxmox.com/git/pve-http-server
synced 2025-05-02 00:15:30 +00:00
utils: add LISTEN_IP option in /etc/default/pveproxy
to allow setting arbitrary IP address to listen on Signed-off-by: Oguz Bektas <o.bektas@proxmox.com> Tested-by: Dylan Whyte <d.whyte@proxmox.com> Reviewed-by: Dylan Whyte <d.whyte@proxmox.com>
This commit is contained in:
parent
6d832dbced
commit
9afe1e89ea
@ -14,6 +14,7 @@ sub read_proxy_config {
|
||||
|
||||
# Note: evaluate with bash
|
||||
my $shcmd = ". $conffile;\n";
|
||||
$shcmd .= 'echo \"LISTEN_IP:\$LISTEN_IP\";';
|
||||
$shcmd .= 'echo \"ALLOW_FROM:\$ALLOW_FROM\";';
|
||||
$shcmd .= 'echo \"DENY_FROM:\$DENY_FROM\";';
|
||||
$shcmd .= 'echo \"POLICY:\$POLICY\";';
|
||||
@ -36,6 +37,8 @@ sub read_proxy_config {
|
||||
push @$ips, Net::IP->new($ip) || die Net::IP::Error() . "\n";
|
||||
}
|
||||
$res->{$key} = $ips;
|
||||
} elsif ($key eq 'LISTEN_IP') {
|
||||
$res->{$key} = $value;
|
||||
} elsif ($key eq 'POLICY') {
|
||||
die "unknown policy '$value'\n" if $value !~ m/^(allow|deny)$/;
|
||||
$res->{$key} = $value;
|
||||
|
Loading…
Reference in New Issue
Block a user