gophi/README.md

96 lines
2.0 KiB
Markdown
Raw Normal View History

# 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.
`go build` and you're set to go! (...phor ha)
Linux only FOR NOW.
# 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
Unavailable for now due to issues with accessing path within chroot:
~~$ -- Execute shell command and print stdout here~~
```
# Todos
- TLS support
- connection throttling
- header + footer text
- support proposed protocol extensions (Gopher+ etc)
- ~~toggleable logging~~
- rotating logs
- set default page width (modifies max UserName / Selector fields)
- set default charset
- autogenerated caps.txt
- server status page (?)
- proxy over HTTP support
- connection timeout
- gopher servemux (?)
- ~~treat plain line of text (no tabs) as info line~~
# Standards followed
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:
https://gopher.floodgap.com/gopher/gw
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