Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/koofr/graval
An experimental go FTP server framework
https://github.com/koofr/graval
Last synced: about 2 months ago
JSON representation
An experimental go FTP server framework
- Host: GitHub
- URL: https://github.com/koofr/graval
- Owner: koofr
- License: mit
- Fork: true (yob/graval)
- Created: 2014-04-22T19:17:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-02T13:42:14.000Z (about 4 years ago)
- Last Synced: 2024-07-31T20:52:36.627Z (4 months ago)
- Language: Go
- Size: 142 KB
- Stars: 28
- Watchers: 9
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - graval - Experimental FTP server framework. (Networking / Transliteration)
- zero-alloc-awesome-go - graval - Experimental FTP server framework. (Networking / Transliteration)
- awesome-go-extra - graval - 04-22T19:17:18Z|2020-10-02T13:42:14Z| (Networking / Uncategorized)
- awesome-go-zh - graval
- awesome-go - graval - An experimental go FTP server framework - ★ 23 (Networking)
README
# graval
Go FTP server framework. By providing a simple driver class that
responds to a handful of methods you can have a complete FTP server.Some sample use cases include persisting data to:
* an Amazon S3 bucket
* a relational database
* redis
* memoryFull documentation for the package is available on [godoc](http://godoc.org/github.com/koofr/graval)
## Installation
go get github.com/koofr/graval
## Example
go run example/example.go
## Usage
To boot an FTP server you will need to provide a driver that speaks to your
persistence layer - the required driver contract is listed below.Do not forget to seed math random in your main program. Otherwise passive ports will be predictable.
func main() {
rand.Seed(time.Now().UTC().UnixNano())
...
}### The Driver Contract
Your driver MUST implement a number of simple methods. You can view the required
contract in the package docs on [godoc](http://godoc.org/github.com/koofr/graval)## Contributors
* James Healy [http://www.yob.id.au](http://www.yob.id.au)
* Luka Zakrajsek [http://koofr.net](http://koofr.net)## Warning
FTP is an incredibly insecure protocol. Be careful about forcing users to authenticate
with a username or password that are important.## License
This library is distributed under the terms of the MIT License. See the included file for
more detail.## Contributing
All suggestions and patches welcome, preferably via a git repository I can pull from.
If this library proves useful to you, please let me know.## Further Reading
There are a range of RFCs that together specify the FTP protocol. In chronological
order, the more useful ones are:* [http://tools.ietf.org/rfc/rfc959.txt](http://tools.ietf.org/rfc/rfc959.txt)
* [http://tools.ietf.org/rfc/rfc1123.txt](http://tools.ietf.org/rfc/rfc1123.txt)
* [http://tools.ietf.org/rfc/rfc2228.txt](http://tools.ietf.org/rfc/rfc2228.txt)
* [http://tools.ietf.org/rfc/rfc2389.txt](http://tools.ietf.org/rfc/rfc2389.txt)
* [http://tools.ietf.org/rfc/rfc2428.txt](http://tools.ietf.org/rfc/rfc2428.txt)
* [http://tools.ietf.org/rfc/rfc3659.txt](http://tools.ietf.org/rfc/rfc3659.txt)
* [http://tools.ietf.org/rfc/rfc4217.txt](http://tools.ietf.org/rfc/rfc4217.txt)For an english summary that's somewhat more legible than the RFCs, and provides
some commentary on what features are actually useful or relevant 24 years after
RFC959 was published:* [http://cr.yp.to/ftp.html](http://cr.yp.to/ftp.html)
For a history lesson, check out Appendix III of RCF959. It lists the preceding
(obsolete) RFC documents that relate to file transfers, including the ye old
RFC114 from 1971, "A File Transfer Protocol"This library is heavily based on [em-ftpd](https://github.com/yob/em-ftpd), an FTPd
framework with similar design goals within the ruby and EventMachine ecosystems. It
worked well enough, but you know, callbacks and event loops make me something
something.TLS implementation and some other commands are based on
[pyftpdlib](https://code.google.com/p/pyftpdlib).