]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Templates for captive portal proxy configration instructions
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 16 Mar 2010 23:53:33 +0000 (12:53 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 16 Mar 2010 23:53:33 +0000 (12:53 +1300)
Captive portals often have to bounce users to configuration instructions.
Those instructions consist of of how to setup WPAD or manual settings.
These templates allow for a standard and localized instruction set for
better support of mixed language users across any portal.

They are used by adding deny_info ERR_AGENT_... to the configuration.

The ERR_AGENT_CONFIGURE template utilizes visible_hostname and port info
from the responding proxy to display correct configuration details for
the gateway without requiring administrative re-write of the page.

Derived from work by the Mandrivia Project.

TODO:
 * some form of CSS agent detection to specialize the instructions.
 * add texts for other common agents

errors/templates/ERR_AGENT_CONFIGURE [new file with mode: 0644]
errors/templates/ERR_AGENT_WPAD [new file with mode: 0644]

diff --git a/errors/templates/ERR_AGENT_CONFIGURE b/errors/templates/ERR_AGENT_CONFIGURE
new file mode 100644 (file)
index 0000000..f25410b
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Web Browser Configuration</title>
+<style type="text/css"><!--
+ %l
+
+body
+:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
+:lang(he) { direction: rtl; float: right; }
+ --></style>
+</head><body>
+<div id="titles">
+<h1>ERROR</h1>
+<h2>Web Browser Configuration</h2>
+</div>
+<hr>
+
+<div id="content">
+<blockquote id="error">
+<p>Your Web Browser configuration needs to be corrected to use this network.</p>
+</blockquote>
+
+<p>How to find these settings in your browser:</p>
+
+<div id="firefox">
+For Firefox browsers go to:
+<ul>
+<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+<li>In the HTTP proxy box type the proxy name %h and port 3128.</li>
+</ul>
+</div>
+
+<div id="microsoft">
+For Internet Explorer browsers go to:
+<ul>
+<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>In the HTTP proxy box type the proxy name %h and port 3128.</li>
+</ul>
+</div>
+
+<div id="opera">
+For Opera browsers go to:
+<ul>
+<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>In the HTTP proxy box type the proxy name %h and port 3128.</li>
+</ul>
+</div>
+
+<p>Your cache administrator is <a href="mailto:%w%W">%w</a>.</p>
+<br>
+</div>
+
+<hr>
+<div id="footer">
+<p>Generated %T by %h (%s)</p>
+<!-- %c -->
+</div>
+</body></html>
diff --git a/errors/templates/ERR_AGENT_WPAD b/errors/templates/ERR_AGENT_WPAD
new file mode 100644 (file)
index 0000000..82235ba
--- /dev/null
@@ -0,0 +1,59 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html><head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>Web Browser Configuration</title>
+<style type="text/css"><!--
+ %l
+
+body
+:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
+:lang(he) { direction: rtl; float: right; }
+ --></style>
+</head><body>
+<div id="titles">
+<h1>ERROR</h1>
+<h2>Web Browser Configuration</h2>
+</div>
+<hr>
+
+<div id="content">
+<blockquote id="error">
+<p>Your Web Browser configuration needs to be corrected to use this network.</p>
+</blockquote>
+
+<p>How to find these settings in your browser:</p>
+
+<div id="firefox">
+For Firefox browsers go to:
+<ul>
+<li>Tools -&gt; Options -&gt; Advanced -&gt; Network -&gt; Connection Settings</li>
+</li>Select Auto-detect proxy settings for this network</li>
+</ul>
+</div>
+
+<div id="microsoft">
+For Internet Explorer browsers go to:
+<ul>
+<li>Tools -&gt; Internet Options -&gt; Connection -&gt; LAN Settings -&gt;Proxy</li>
+<li>Select Automatically detect settings</li>
+</ul>
+</div>
+
+<div id="opera">
+For Opera browsers go to:
+<ul>
+<li>Tools -&gt; Preferences -&gt; Advanced -&gt; Network -&gt; Proxy Servers</li>
+<li>Select Use Automatic proxy configuration</li>
+</ul>
+</div>
+
+<p>Your cache administrator is <a href="mailto:%w%W">%w</a>.</p>
+<br>
+</div>
+
+<hr>
+<div id="footer">
+<p>Generated %T by %h (%s)</p>
+<!-- %c -->
+</div>
+</body></html>