The Gemini specification defines both the Gemini protocol and a native file format for that protocol, analogous to
HTML for HTTP, known as "gemtext". The design is inspired by
Gopher, but with modernisation such as mandatory use of
Transport Layer Security (TLS) for connections and a
hypertext format as native content type. The design is deliberately not easily extensible, in order to meet a project goal of simplicity.
Protocol Gemini is designed within the framework of the
Internet protocol suite. Like HTTP/S, Gemini functions as a
request–response protocol in the client–server computing model. A Gemini server should listen on TCP port 1965. A Gemini browser, for example, may be the
client and an application running on a computer
hosting a Gemini site may be the
server. The client sends a Gemini
request message to the server, and the server sends back a
response message. Gemini uses a separate
connection to the same server for every resource request. Gemini mandates the use of TLS with privacy-related features and
trust on first use (TOFU) verification being strongly suggested. Gemini resources are identified and located on the network by
Uniform Resource Locators (URLs), using the
URI scheme gemini://. A Gemini request consists only of such a URL, terminated by CRLF; the header of a Gemini response consists of a two-digit status code, a space, and a "meta" field, also terminated by CRLF. If the server is successful in finding the requested file, the "meta" field is the
MIME type of the returned file and after the header follows the file data.
Gemtext format Gemtext format is line-oriented and the first three characters of a line determine its type. The syntax includes markup for headlines, flat list items, pre-formatted text, quotes and link lines. As with HTTP hypertext, URIs are encoded as
hyperlinks to form interlinked hypertext documents in the Gemini "web", which users refer to as
Geminispace. == Geminispace ==