3 # A form for edit misc options
5 require './squid-lib.pl';
6 $access{'miscopt'} || &error($text{'emisc_ecannot'});
7 &ui_print_header(undef, $text{'emisc_header'}, "", "edit_misc", 0, 0, 0, &restart_button());
10 print "<form action=save_misc.cgi>\n";
11 print "<table border width=100%>\n";
12 print "<tr $tb> <td><b>$text{'emisc_mo'}</b></td> </tr>\n";
13 print "<tr $cb> <td><table width=100%>\n";
16 print &opt_input($text{'emisc_sdta'}, "dns_testnames", $conf,
17 $text{'default'}, 40);
21 print &opt_input($text{'emisc_slr'}, "logfile_rotate", $conf,
23 print &opt_input($text{'emisc_dd'}, "append_domain", $conf, $text{'none'}, 10);
26 if ($squid_version < 2) {
28 print &opt_input($text{'emisc_sp'}, "ssl_proxy", $conf, $text{'none'}, 15);
29 print &opt_input($text{'emisc_nghp'}, "passthrough_proxy",
30 $conf, $text{'none'}, 15);
35 print &opt_input($text{'emisc_emt'}, "err_html_text", $conf, $text{'none'}, 40);
39 print &choice_input($text{'emisc_pcs'}, "client_db", $conf,
40 "on", $text{'yes'}, "on", $text{'no'}, "off");
41 print &choice_input($text{'emisc_xffh'}, "forwarded_for", $conf,
42 "on", $text{'yes'}, "on", $text{'no'}, "off");
46 print &choice_input($text{'emisc_liq'}, "log_icp_queries", $conf,
47 "on", $text{'yes'}, "on", $text{'no'}, "off");
48 print &opt_input($text{'emisc_mdh'}, "minimum_direct_hops", $conf,
53 print &choice_input($text{'emisc_kmffu'}, "memory_pools", $conf,
54 "on", $text{'yes'}, "on", $text{'no'}, "off");
55 if ($squid_version >= 2) {
56 print &opt_bytes_input($text{'emisc_aomtk'}, "memory_pools_limit",
57 $conf, $text{'emisc_u'}, 6);
62 if ($squid_version >= 2.2 && $squid_version < 2.5) {
63 foreach $a (&find_config("anonymize_headers", $conf)) {
64 @ap = @{$a->{'values'}};
68 print "<td valign=top><b>$text{'emisc_htpt'}</b></td> ",
70 printf "<input type=radio name=anon_mode value=0 %s> $text{'emisc_ah'}<br>\n",
71 $anon ? "" : "checked";
72 printf "<input type=radio name=anon_mode value=1 %s> $text{'emisc_oh'}\n",
73 $anon eq "allow" ? "checked" : "";
74 printf "<input name=anon_allow size=50 value='%s'><br>\n",
75 $anon eq "allow" ? join(" ", @anon) : "";
76 printf "<input type=radio name=anon_mode value=2 %s> $text{'emisc_ae'}\n",
77 $anon eq "deny" ? "checked" : "";
78 printf "<input name=anon_deny size=50 value='%s'>\n",
79 $anon eq "deny" ? join(" ", @anon) : "";
80 print "</td> </tr> <tr>\n";
82 elsif ($squid_version < 2.2) {
83 print &choice_input($text{'emisc_a'}, "http_anonymizer", $conf,
84 "off", $text{'emisc_off'}, "off",
85 $text{'emisc_std'}, "standard",
86 $text{'emisc_par'}, "paranoid");
88 print &opt_input($text{'emisc_fua'}, "fake_user_agent", $conf, $text{'none'}, 15);
91 if ($squid_version < 2.6) {
92 $host = &find_value("httpd_accel_host", $conf);
93 print "<td><b>$text{'emisc_hah'}</b></td> <td colspan=3>\n";
94 printf "<input type=radio name=accel value=0 %s> %s\n",
95 $host ? "" : "checked", $text{'emisc_none'};
96 printf "<input type=radio name=accel value=1 %s> %s\n",
97 $host eq "virtual" ? "checked" : "", $text{'emisc_virtual'};
98 printf "<input type=radio name=accel value=2 %s>\n",
99 $host eq "virtual" || !$host ? "" : "checked";
100 printf "<input name=httpd_accel_host size=50 value='%s'></td>\n",
101 $host eq "virtual" ? "" : $host;
103 print &opt_input($text{'emisc_hap'}, "httpd_accel_port", $conf,
104 $text{'emisc_none'}, 10);
105 if ($squid_version >= 2.5) {
106 print &choice_input($text{'emisc_hash'}, "httpd_accel_single_host",
107 $conf, "off", $text{'yes'}, "on", $text{'no'}, "off");
110 print &choice_input($text{'emisc_hawp'}, "httpd_accel_with_proxy",
111 $conf, "off", $text{'on'}, "on", $text{'off'}, "off");
112 print &choice_input($text{'emisc_hauhh'}, "httpd_accel_uses_host_header",
113 $conf, "off", $text{'yes'}, "on", $text{'no'}, "off");
117 if ( $squid_version >= 2.3) {
118 print &opt_input($text{'emisc_wccprtr'}, "wccp_router", $conf,
119 $text{'default'}, 35);
121 print &opt_input($text{'emisc_wccpin'}, "wccp_incoming_address",
122 $conf, $text{'default'}, 35);
124 print &opt_input($text{'emisc_wccpout'}, "wccp_outgoing_address",
125 $conf, $text{'default'}, 35);
129 print "</table></td></tr></table>\n";
130 print "<input type=submit value='$text{'buttsave'}'></form>\n";
132 &ui_print_footer("", $text{'emisc_return'});