2020-04-10 19:35:22 +00:00
|
|
|
# Gophor
|
|
|
|
|
|
|
|
A Gopher server written in GoLang as a means of learning about the Gopher
|
|
|
|
protocol, and more GoLang.
|
|
|
|
|
|
|
|
Possibly beta quality soon? More likely alpha right now.
|
|
|
|
|
2020-04-11 13:21:21 +00:00
|
|
|
`go build` and you're set to go! (...phor ha)
|
2020-04-11 10:45:12 +00:00
|
|
|
|
2020-04-10 19:38:17 +00:00
|
|
|
Linux only FOR NOW.
|
2020-04-10 19:35:22 +00:00
|
|
|
|
2020-04-13 21:49:25 +00:00
|
|
|
# Features
|
|
|
|
|
|
|
|
- ZERO external dependencies
|
|
|
|
|
|
|
|
- Item type characters beyond RFC 1436 standard (see below)
|
|
|
|
|
|
|
|
- Security focused -- `Until we reach beta/stable, maybe don't trust this...`
|
|
|
|
|
|
|
|
- File caching -- Until LRU is implemented, this means cache size is infinite,
|
|
|
|
which for a gopher server of very limited size, this is fine. Probably.
|
|
|
|
|
|
|
|
- Separate system and access logging with output to file if requested (or
|
|
|
|
disable both!)
|
|
|
|
|
2020-04-12 20:31:50 +00:00
|
|
|
# Supported gophermap item types
|
|
|
|
|
|
|
|
```
|
|
|
|
0 -- regular file (text)
|
|
|
|
1 -- directory (menu)
|
|
|
|
2 -- CSO phone-book server... should you be using this in 2020 lmao
|
|
|
|
3 -- Error
|
|
|
|
4 -- Binhexed macintosh file
|
|
|
|
5 -- DOS bin archive
|
|
|
|
6 -- Unix uuencoded file
|
|
|
|
7 -- Index-search server
|
|
|
|
8 -- Text-based telnet session
|
|
|
|
9 -- Binary file
|
|
|
|
T -- Text-based tn3270 session... in 2020???
|
|
|
|
g -- Gif format graphic
|
|
|
|
I -- Image file of some kind
|
|
|
|
|
|
|
|
+ -- Redundant server
|
|
|
|
|
|
|
|
. -- Lastline if online this followed by CrLf
|
|
|
|
|
|
|
|
i -- Info message
|
|
|
|
h -- HTML document
|
|
|
|
s -- Audio file
|
|
|
|
p -- PNG image
|
|
|
|
d -- Document
|
|
|
|
|
|
|
|
M -- MIME type file
|
|
|
|
; -- Video file
|
|
|
|
c -- Calendar file
|
|
|
|
! -- Title
|
|
|
|
# -- Comment (not displayed)
|
|
|
|
- -- Hide file from directory listing
|
|
|
|
= -- Include subgophermap (prints file output here)
|
|
|
|
* -- Act as-if lastline and print directory listing below
|
|
|
|
|
2020-04-13 19:22:50 +00:00
|
|
|
Unavailable for now due to issues with accessing path within chroot:
|
|
|
|
~~$ -- Execute shell command and print stdout here~~
|
2020-04-12 20:31:50 +00:00
|
|
|
```
|
|
|
|
|
2020-04-10 19:35:22 +00:00
|
|
|
# Todos
|
|
|
|
|
|
|
|
- TLS support
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Connection throttling + timeouts
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Header + footer text
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- ~~Support proposed protocol extensions (Gopher+ etc)~~
|
2020-04-11 13:21:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- ~~Toggleable logging~~
|
2020-04-11 13:21:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Rotating logs
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Set default page width (modifies max UserName / Selector fields)
|
2020-04-11 13:21:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Set default charset
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Autogenerated caps.txt
|
2020-04-11 13:17:21 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Server status page (?)
|
2020-04-11 13:32:00 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Proxy over HTTP support
|
2020-04-11 13:32:00 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Gopher servemux (?)
|
2020-04-11 18:31:58 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- ~~Treat plain line of text (no tabs) as info line~~
|
2020-04-12 15:13:57 +00:00
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Finish inline shell scripting support
|
2020-04-13 21:49:25 +00:00
|
|
|
|
|
|
|
- Implement LRU in file cache
|
|
|
|
|
|
|
|
- Allow setting UID+GID via username string
|
|
|
|
|
2020-04-13 21:51:43 +00:00
|
|
|
- Neaten-up newly added file caching code
|
|
|
|
|
2020-04-13 21:55:06 +00:00
|
|
|
# Please note
|
|
|
|
|
|
|
|
During the initial writing phase the quality of git commit messages may be
|
|
|
|
low and many changes are likely to be bundled together at a time, just
|
|
|
|
because the pace of development right now is rather break-neck.
|
|
|
|
|
|
|
|
As soon as we reach a stable point in development, or if other people start
|
|
|
|
contributing issues or PRs, whichever comes first, this will be changed
|
|
|
|
right away.
|
|
|
|
|
2020-04-11 13:21:21 +00:00
|
|
|
# Standards followed
|
2020-04-11 13:17:21 +00:00
|
|
|
|
|
|
|
Gopher-II (The Next Generation Gopher WWIS):
|
|
|
|
https://tools.ietf.org/html/draft-matavka-gopher-ii-00
|
|
|
|
|
|
|
|
All of the below can be viewed from your standard web browser using
|
|
|
|
floodgap's Gopher proxy:
|
2020-04-11 13:21:21 +00:00
|
|
|
https://gopher.floodgap.com/gopher/gw
|
2020-04-11 13:17:21 +00:00
|
|
|
|
|
|
|
RFC 1436 (The Internet Gopher Protocol:
|
|
|
|
gopher://gopher.floodgap.com:70/0/gopher/tech/rfc1436.txt
|
|
|
|
|
|
|
|
Gopher+ (upward compatible enhancements):
|
|
|
|
gopher://gopher.floodgap.com:70/0/gopher/tech/gopherplus.txt
|