gopher
Version, currently 0.1.04 versions
- 0.1.0latestJan 8, 2019
- 0.0.3not indexedJan 17, 2019
- 0.0.2not indexedJan 17, 2019
- 0.0.1not indexedJan 17, 2019
github.com/anicholson/gopher.cr
a Gopher server, written in Crystal
Installation
# Add this to your shard.yml
dependencies:
gopher:
github: anicholson/gopher.cr
version: ~> 0.1.0Then run:
shards installshard.yml
- Crystal
0.25.0- License
- GPL
- Author
- Andy Nicholson
- Target
examplefrom src/example.cr
Dependencies
Runtime Dependencies
- result~> 0.3github: anicholson/result.cr
Development Dependencies
- minitest~> 0.4.2github: ysbaddaden/minitest.crdev
README
gopher.cr 
An implementation of RFC 1437, the Gopher protocol.
This repository is 2 things:
- A library that implements the Gopher protocol
- An example server that serves Gopher requests
Gopher Protocol
The Gopher protocol consists of 2 phases: request & response.
Like its relative HTTP, clients makes a request for a URI to the server, and the server responds. Unlike HTTP, however, there are no headers, caching, MIME response types, keepalives, etc. This makes the protocol both simpler and less featureful.
Requests
A request to a gopher:// server consists of a single line, containing a URI (called a selector):
/1stuff/1and/1nonsense/0intro.txt\r\n
the server then resolves that request into a response, and renders it back to the client.
Responses
A Response can be one of 3 things:
- a menu of further choices a user can make
- a resource (a file, or a another server)
- an error
A copy of the RFC that describes the protocol is included in this repo
Using this library
To use this library, you need to:
- Create a
Serverobject - Provide it with
Resolver(s) that instruct it how to find content - Tell the server to listen for requests!
A good example for how this can be done exists in src/example.cr
If you're looking for a more turnkey solution, check out its sister project Port70.
Development
Testing on the application is built using the excellent minitest.cr.
Run tests with crystal spec.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.0- Tagged
- Jan 8, 2019
- Commit
d28addf5fdec- Crystal
0.25.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/anicholson/gopher.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Nov 29, 2026
- Synced
- Nov 28, 2026
- Versions
- 4