diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-05-29 12:20:55 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-05-29 12:20:55 -0400 |
commit | 7d9d627d6efec748fd6de2a162e2cb5a0b1685e8 (patch) | |
tree | f6f301765ad74a55da7481ceb548e2bb79b7a0ae /README.md | |
download | gnc-7d9d627d6efec748fd6de2a162e2cb5a0b1685e8.tar.gz gnc-7d9d627d6efec748fd6de2a162e2cb5a0b1685e8.zip |
Initial code commit, and it actually works
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..409a40a --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# GNC: A Gemini Server for inetd + +GNC is a pure-Fortran implementation of a simple Gemini server for UNIX-like +systems. The server requires the inetd super-server (or compatible system +like xinetd) to work. GNC will handle all the TLS nonsense, and, if given a +root directory to work with, should provide some mild security that only +files in that directory will be served (no promises, though!). + +## Requirements + +GNC requires almost nothing: + + * A modern Fortran compiler (GNU Fortran > 7) + * OpenSSL + * The *file* command (for computing MIME types) + * inetd or equivalent (Debian calls it inetutils-inetd) + +There is a makefile provided to compile it (makefile.gnu) and a Simply +Fortran project if you're rad. + +## Usage + +These directions will focus on just getting everything running on plain, old +BSD-esque inetd. Users can probably extrapolate for other systems. + +You'll first need to set up the Gemini protocol in the file /etc/services: + +``` +gemini 1965/tcp # Gemini... +``` + +Next, you can add a nice line to inetd.conf: + +``` +gemini stream tcp nowait root /path/to/gnc gnc -pub /path/to/certs/cer +t.pem -priv /path/to/certs/key.pem -root /path/to/files/to/serve -l /path/to/logfile +``` + +Note that if you don't provide a logfile (the "-l" option), GNC will write to +/tmp/gnc.log all the time. + +The inetd.conf line above implies using *root* as the user for GNC which is super- +unecessary. Users should probably set up a sensible user instead. + +The "-root" option isn't mandatory. If you don't provide it, though, GNC will just +serve your **entire filesystem**, so maybe you should provide it... + +After that, it should just work. + +Paths ending in a slash will actually attempt to open a file "index.gmi" without +letting the end user know. You might want one of those in your root directory +from which you're serving. + +## License + +GNC is Copyright (c) 2020 Jeffrey Armstrong <jeff@rainbow-100.com>, and the software +is licensed under the JSON license. See LICENSE.txt for more details. |