Private
Server IP : 195.201.23.43  /  Your IP : 18.219.89.186
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/squid/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/squid/save_misc.cgi
#!/usr/bin/perl
# save_misc.cgi
# Save miscellaneous options

use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
our (%text, %in, %access, $squid_version, %config);
require './squid-lib.pl';
$access{'miscopt'} || &error($text{'emisc_ecannot'});
&ReadParse();
&lock_file($config{'squid_conf'});
my $conf = &get_config();
&error_setup($text{'smisc_ftso'});

&save_opt("dns_testnames", undef, $conf);
&save_opt("logfile_rotate", \&check_rotate, $conf);
&save_opt("append_domain", \&check_domain, $conf);
if ($squid_version < 2) {
	&save_opt("ssl_proxy", \&check_proxy, $conf);
	&save_opt("passthrough_proxy", \&check_proxy, $conf);
	}
&save_opt("err_html_text", undef, $conf);
&save_choice("client_db", "on", $conf);
&save_choice("forwarded_for", "on", $conf);
&save_choice("log_icp_queries", "on", $conf);
&save_opt("minimum_direct_hops", \&check_hops, $conf);
if ($squid_version >= 2.2 && $squid_version < 2.5) {
	my $m = $in{'anon_mode'};
	if ($m == 0) {
		&save_directive($conf, "anonymize_headers", [ ]);
		}
	else {
		&save_directive($conf, "anonymize_headers",
			[ { 'name' => 'anonymize_headers',
			    'values' => [ $m == 1 ? "allow" : "deny",
					  $m == 1 ? $in{'anon_allow'}
						  : $in{'anon_deny'} ] } ]);
		}
	}
elsif ($squid_version < 2.2) {
	&save_choice("http_anonymizer", "off", $conf);
	}
&save_opt("fake_user_agent", undef, $conf);
&save_choice("memory_pools", "on", $conf);
if ($squid_version < 2.6) {
	if ($in{'accel'} == 0) {
		&save_directive($conf, "httpd_accel_host", [ ]);
		}
	else {
		my $v = $in{'accel'} == 1 ? "virtual" : $in{"httpd_accel_host"};
		&save_directive($conf, "httpd_accel_host",
				[ { 'name' => "httpd_accel_host",
				    'values' => [$v] } ]);
		}
	&save_opt("httpd_accel_port", undef, $conf);
	&save_choice("httpd_accel_with_proxy", undef, $conf);
	&save_choice("httpd_accel_uses_host_header", undef, $conf);
	if ($squid_version >= 2.5) {
		&save_choice("httpd_accel_single_host", undef, $conf);
		}
	}
if ($squid_version >= 2) {
	&save_opt_bytes("memory_pools_limit", $conf);
	}
if ($squid_version >= 2.3) {
        &save_opt("wccp_router", undef, $conf);
        &save_opt("wccp_incoming_address", undef, $conf);
        &save_opt("wccp_outgoing_address", undef, $conf);
	}
&flush_file_lines();
&unlock_file($config{'squid_conf'});
&webmin_log("misc", undef, undef, \%in);
&redirect("");

sub check_rotate
{
return $_[0] =~ /^\d+$/ ? undef : &text('smisc_emsg1',$_[0]);
}

sub check_domain
{
return $_[0] =~ /^[A-z0-9\.\-]+$/ ? undef : &text('smisc_emsg2',$_[0]); 
}

sub check_proxy
{
return $_[0] =~ /^\S+$/ ? undef : &text('smisc_emsg3',$_[0]); 
}

sub check_hops
{
return $_[0] =~ /^\d+$/ ? undef : &text('smisc_emsg4',$_[0]); 
}

Private