FileGopherServer is a Gopher server which serves the file listing.
I've tried as much as possible to align the implementation with the Gopher RFC 1436. This server is non-gopher+, but supports gateway for gopher+ clients as a forward compatibility.
Gopher is a pre-HTTP protocol for browsing the internet. It is easy to use and light-weight, even for implementation. To know more about Gopher visit wiki page Wiki.
FileGopherServer depends upon boost library. Install boost library and then compile FileGopherServer.
$ g++ -o server server.cpp FileGopherServer.cpp -std=gnu++11 -lboost_program_options
$ ./server -d <directory-to-serve>
For example, to serve current directory:
$ ./server -d .
In order to see server contents, you will need a Gopher client.
Ubuntu has it in it's repository. To install it, type:
$ sudo apt-get install gopher
See Overbite Project for clients for major platforms.
DiggieDog is a nice client for Android.
- Implement efficient method to check a file is text or binary.
- Add option to list hidden files.
You can find the docs here.