70 lines
3.9 KiB
HTML
70 lines
3.9 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>Welcome to the GILD HTTP handler</title>
|
|
<style>
|
|
a {
|
|
background-color: black;
|
|
color: greenyellow;
|
|
}
|
|
|
|
body {
|
|
padding: 2em 20%;
|
|
background-color: black;
|
|
color: green;
|
|
font-family: Arial, Helvetica, sans-serif;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<h1 id="user-content-gild" dir="auto">GILD</h1>
|
|
<h2 id="user-content-the-generic-internet-listener-daemon" dir="auto">The Generic Internet Listener Daemon</h2>
|
|
<p dir="auto">This is ancient history, and never was meant for doing anything practical; it's essentially
|
|
a joke. Its practical use - when it had any practical use - was to experiment with new
|
|
protocols.</p>
|
|
<p dir="auto">The fact that protocols can be implemented in more or less any language you like is an added
|
|
jape: see HTTP in under 100 lines of shell script.</p>
|
|
<p dir="auto">Enjoy!</p>
|
|
<h2 id="user-content-building" dir="auto">Building</h2>
|
|
<pre><code>pushd src; make clean; make; popd
|
|
</code></pre>
|
|
<h2 id="user-content-running" dir="auto">Running</h2>
|
|
<p dir="auto">It depends what you want to do with it. Review the contents of <code>gild.conf</code>; in practice
|
|
only the HTTP handler is going to work out of the box, and, out of the box, it expects to find the website to
|
|
serve in <code>/usr/local/etc/gild/httpd/htdocs</code>. To change where it looks for its website, edit the HTTP
|
|
handler.</p>
|
|
<p dir="auto">The HTTP handler will serve HTML files, plain text files and common image formats, but nothing more
|
|
sophisticated. It currently won't serve CSS correctly (although your browser will probably cope) because it
|
|
can't tell the difference between CSS and plain text.</p>
|
|
<p dir="auto">Having said all that, to run it,</p>
|
|
<pre><code>bin/gild -f gild.conf
|
|
</code></pre>
|
|
<p dir="auto">will start <code>gild</code> listening on its default port, 8421. If you'd prefer it to listen on,
|
|
for example, port 6666, you would use</p>
|
|
<pre><code>bin/gild -f gild.conf -p 6666
|
|
</code></pre>
|
|
<p dir="auto"><em>Be aware that gild is a true daemon</em>. It will immediately detach from the console, and you
|
|
will get your prompt back as if nothing had happened. But if you look in the syslog, you'll see something
|
|
like this:</p>
|
|
<pre><code>Mar 8 19:05:25 fletcher gild: Loading configuration from gild.conf
|
|
Mar 8 19:05:25 fletcher gild: registering handler [handlers/http] for protocol http
|
|
Mar 8 19:05:25 fletcher gild: registering handler [handlers/crp] for protocol crp
|
|
Mar 8 19:05:25 fletcher gild: registering handler [handlers/mdlscp] for protocol mdlscp
|
|
Mar 8 19:05:25 fletcher gild: started; awaiting requests on port 6666
|
|
Mar 8 19:06:14 fletcher gild: using handler 'handlers/http' [28001] to handle http request from 127.0.0.1
|
|
</code></pre>
|
|
<p dir="auto">Back in the day, <code>gild</code> really did run a public website for several years. However, back in
|
|
the day, the internet was a much less hostile and dangerous place. <em>It is not at all security hardened</em>.
|
|
If you're going to run it on a public network, do it on a Raspberry Pi or something of that nature which has
|
|
nothing you value on it, and keep a close eye on what happens.</p>
|
|
<h2 id="user-content-using" dir="auto">Using</h2>
|
|
<p dir="auto">If you have a bright idea for a completely new application layer protocol, <code>gild</code> is a good
|
|
tool for prototyping, because it's absurdly easy to get things working. Apart from that, I strongly advise
|
|
you to treat it as an amusing curiousity, only.</p>
|
|
<h2 id="user-content-license" dir="auto">License</h2>
|
|
<p dir="auto">GPL version 2. You never were going to use this for anything commercial, seriously.</p>
|
|
</body>
|
|
|
|
</html> |