Giter Site home page Giter Site logo

glv-1.12556's Introduction

GLV-1.12556: The First Gemini Protocol Server

It's named after the NASA designation for Gemini 1, which is fitting,
because it's the first Gemini protocol server written.

Features:

* Serves any type of document
* Configurable filenames for default Gemini index files
* Configurable extension for Gemini index files
* Will create a Gemini index file for directories sans a Gemini index file
* Support for CGI
	* Gemini-specific CGI scripts
	* HTTP-specific CGI scripts
* Support for SCGI
	* Gemini-specific SCGI programs
	* HTTP-specific SCGI programs
* Support for user directories
* Support for multiple directories per host
* Support for serving up single files
* Support for vitual hosting (multiple domains)
* Support for specifying MIME type per file extension
* Support for files in multiple human languages
* Support for specifying non-UTF-8 character sets
* Support for rewriting URLs internally
* Authentication by client certificates
* Easily extensible with support for custom handlers

Prerequisites:

* Lua >= 5.3 (Lua 5.2 might work, but not fully tested)
* Lpeg >= 1.0.0
* libretls >= 3.3.4 or LibreSSL >= 2.5.0
* GNU libmagic (NOTE:  This is NOT image manipulation, but file
	identification)
* A whole bunch of Lua modules, availble at:
	* https://github.com/spc476/lua-conmanorg
	* https://github.com/spc476/LPeg-Parsers

Installation:

This will require some work.  You will need to download the modules listed
above from Github and get them installed.  Out once you have all the
prerequisites installed, the server should just work.

Bulding:

Just type "make" (there's one C module that might be required, depending
upon your desired configuration).  If you have the Lua include files in a
non-standard location, you may need to do:

	make LUA_INCDIR=/path/to/Lua/includes

You can do "make install" if you want to install the server onto the system:

	make install

This will install files in the following locations:

	/usr/local/bin/GLV-1.12556	# server
	/usr/local/lib/lua/5.3/GLV-1	# server modules (written in C)
	/usr/local/share/lua/5.3/GLV-1	# server modules (written in Lua)

To fine tune, you can from the command line:

	make [location] install

The various [location] options are (multiple can be specified)

	prefix=target-dir

		target-dir/bin/GLV-1.12556
		target-dir/lib/lua/5.3/GLV-1
		target-dir/share/lua/5.3/GLV-1

	LUADIR=target-dir

		target-dir/GLV-1	# modules written in Lua

	LIBDIR=target-dir

		target-dir/GLV-1	# modules written in C

	BINDIR=target-dir

		target-dir/GLV-1.12556	# server program

If the Lua include files are in a non-standard location, you can specify:

	make LUA_INCDIR=/path/to/lua/includes

But you do not need to install anything if you run GLV-1.12556.lua directly
in the Lua subdirectory.  The program requires a single argument, the
location of the configuration file.

Configuration:

You will need to generate a certificate, as the protocol requires the use of
TLS.  There are plenty of on-line tortorials about generating a self-signed
certificate, or you could use a certificate from Let's Encrypt.

The file "minimal-conf.lua" is the bare minimum configuration file you'll
need to serve up files from a directory, but do look at the sample-conf.lua
file as that has extensive comments about each section and what is required,
and what isn't.  It will help to know some Lua, especially Lua string
patterns (its form of regex) as various sections of the configuration are
applied to requests via pattern matching of the request.

To run CGI scripts, you'll need to include the cgi section in the
configuration file,  After that, any file that the filesystem handler
encounters that is marked executable will be treated as a CGI script and
run.  If CGI is NOT enabled, the server will simply return a temporary error
(and log the condition via syslog()).

glv-1.12556's People

Contributors

spc476 avatar tallship avatar

Stargazers

Thiago Campos avatar Manon avatar Dejan Josifović avatar ابو الحسن الجاوي avatar  avatar  avatar Rafid Al Haque avatar Jean Raw avatar カシオ 金城 大関 avatar  avatar bing avatar Rick Carlino avatar Zedro avatar  avatar Seif avatar Matthew Pope avatar  avatar ejmg avatar Fuwn avatar scott boone avatar Joao Ponte avatar Samuel Chase avatar Sunny avatar Matthias Weiß avatar Andy Shevchenko avatar Pierre Chapuis avatar Hugo Soucy avatar Jorge Gomez avatar Juri Hahn avatar Phil Pirozhkov avatar Paul Boyd avatar Coleman McFarland avatar netop://ウエハ avatar Sebastian Hübner avatar Alex Wennerberg avatar Regan Koopmans avatar Daniel Grant avatar Jannis R avatar ~creme avatar Leo Nunner avatar Max P avatar  avatar Tim Vaughan avatar Michael Lazar avatar

Watchers

 avatar James Cloos avatar  avatar bing avatar  avatar  avatar

glv-1.12556's Issues

Files beyond a certain size aren't served up.

Files that are larger then 11,466 bytes aren't served up. Files that have 11,466 bytes or less are served up. I'm not sure exactly where the issue lies---it's most likely with the TLS wrapper module in org.conman.nfl.tls, but this project is where the bug was first noticed.

That pull request a few mins ago...

Looks good now. The table in the initial PR didn't format correctly (I was trying to keep it centered).

2019-10-31_1656

I also staged it back in my fork of the patch2, so I'm not sure if it's actually part of the PR I made for you, pls advise, and I can fix that later if you like the PR and new formatting of the README.md

Finally, I'm happy to start working on docs/manual too, running stuff by and collaborating w/you on what will/should be included in those docs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.