summaryrefslogtreecommitdiffstats
path: root/squid-basic-html.lsp
blob: 2d5fbac8f365f555e15ba00ca41106518c6d06a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<? 
   local form = ... 
   local data = form.option
   local service = form.service
   local config = form.service.config
   
   local srv1fill = ""
   local srv2fill = "disabled"
   if form.info.status.value == "running" then
   	srv1fill = "disabled"
   	srv2fill = ""
   end
   
   local ifthen = function( variable, value, result )
      if variable == value then
         io.write( result )
      end
   end
   
?>
<h1>Web Proxy</h1>
<H2>General information</H2>
<p>
Squid is a web proxy server. It makes web requests in behalf of the client, and 
inspecting the returned and optionally caches that content so that the next time 
a client request is made, the content can be served from local disk. This can make 
web surfing faster. Squid can also forward its requests on to a content filter, 
such as DansGuardian.</p>
<p>This page determines the general operational settings for squid.</p>

<h2>Status</h2>

<form action="" method="POST">
<dt>Program version</dt><DD><? io.write( form.info.version.value ) ?></DD>
<dt>Process status</dt><DD><? io.write( form.info.status.value ) ?></DD>
<DT>Process information</DT><DD>This process runs as a service. When you make and save changes, the configuration 
files for the service are changed. However, the changes will not be <i>applied</i> 
until you restart the service.</DD>
<DT>Daemon control</DT><dd><input class="submit" type="submit" name="srvcmd" value="start" <? io.write( srv1fill ) ?> style="width:100px"> 
<input class="submit" type="submit" name="srvcmd" value="stop" <? io.write( srv2fill ) ?> style="width:100px">
<input class="submit" type="submit" name="srvcmd" value="restart" <? io.write( srv2fill ) ?> style="width:100px"></dd>
<p class="error"><? io.write( service.message ) ?></p>
</form>

<h2>Configuration</h2>
<form action="" method="POST">
<DT>Config status</DT><DD class="error"><? io.write(service.error ) ?></DD>

<h3>Primary Listener service</h3>
<p>These parameters define the interface and port that the web proxy uses to accept connections.</p>

<dt>proxyip</dt><dd><input class="text" type="text" name="proxyip" value="<? io.write( config.proxyip.value ) ?>"></dd>
<dt>proxyport</dt><dd><input class="text" type="text" name="proxyport" value="<? io.write( config.proxyport.value ) ?>"></dd>

<h3>Filter Service</h3>
<p>These parameters define the ip address and port that the web proxy forwards requests to. 
This is typically the address that DansGuardian (Web Content Filter) is listening on. 
If you want this web proxy to handle retrieving the content, then leave these blank.</p>
<p>Filtering is a cpu-intensive process. The FilterRegex is a list of regular expressions that qualify 
for filtering. Anything not matching the regular expression filter will bypass the content filter. 
It is safe to leave this at the default settings.</p>

<dt>filterip</dt><dd><input class="text" type="text" name="filterip" value="<? io.write( config.filterip.value ) ?>"</dd>
<dt>filterport</dt><dd><input class="text" type="text" name="filterport" value="<? io.write( config.filterport.value ) ?>"></dd>
<dt>FilterRegex</dt><dd><input class="text" type="text" name="filterregex" value="<? io.write( config.filterregex.value ) ?>"></dd>

<h3>Access Logs</h3>
<p>This determines if the visited sites are logged or not.</p>
<dt>Log visited sites</dt>
<dd><input type="radio" name="accesslog" value="no"<? ifthen( config.accesslog.value, "no", " checked" ); ?>> No access log
<input type="radio" name="accesslog" value="yes"<? ifthen( config.accesslog.value, "yes", " checked" ); ?>> Use access log</dd>

<h3>Disk Cache Parameters</h3>
<p>This determines if the disk is used for caching. This can speed up web surfing when many clients are accessing the Internet, 
but it requires a local hard disk.</p>

<dt>Enable disk caching</dt>
<dd><input class="radio" type="radio" name="diskcache" value="no"<? ifthen( config.diskcache.value, "no", " checked" ); ?>>No
<input class="radio" type="radio" name="diskcache" value="yes"<? ifthen( config.diskcache.value, "yes", " checked" ); ?>>Yes</dd>

<h3>Allowed Ports</h3>
<p>Web servers typically run on port 80; SSL (https) servers typically run on port 443. Some web 
servers run on other ports as well. These fields list all ports and port ranges that are considered 
"safe" for the web proxy to handle.</p>

<p>It is safe to leave these values at their default values.</p>

<dt>Safe_ports</dt><dd><input class="text" type="text" name="safeports" value="<? io.write( config.safeports.value ) ?>" style="width:400px;"></dd>
<dt>SSL_ports</dt><dd><input class="text" type="text" name="sslports" value="<? io.write( config.sslports.value ) ?>" style="width:400px;"></dd>

<h2>Save changes</h2>
<DT>Save above changes</DT><DD><input class="submit" type="submit" name="cmd" value="save"></DD>
</form>