| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/squid/ |
Upload File : |
#!/usr/bin/perl
# save_icp.cgi
# Save cache options
require './squid-lib.pl';
$access{'othercaches'} || &error($text{'eicp_ecannot'});
&ReadParse();
&lock_file($config{'squid_conf'});
$conf = &get_config();
$whatfailed = $text{'sicp_ftsco'};
if ($squid_version < 2) {
&save_list("local_domain", undef, $conf);
&save_address("local_ip", $conf);
&save_list("inside_firewall", undef, $conf);
&save_address("firewall_ip", $conf);
}
&save_list("hierarchy_stoplist", undef, $conf);
if ($squid_version < 2) {
&save_choice("single_parent_bypass", "off", $conf);
&save_choice("source_ping", "off", $conf);
&save_opt("neighbor_timeout", \&check_timeout, $conf);
}
else {
&save_opt("icp_query_timeout", \&check_timeout, $conf);
&save_opt("mcast_icp_query_timeout", \&check_timeout, $conf);
&save_opt("dead_peer_timeout", \&check_timeout, $conf);
}
&flush_file_lines();
&unlock_file($config{'squid_conf'});
&webmin_log("icp", undef, undef, \%in);
&redirect("");
sub check_timeout
{
return $_[0] =~ /^\d+$/ ? undef : &text('sicp_emsg1',$_[0]);
}