A FTP server framework written by Golang
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Go to file
hpo3 d07a820aac
continuous-integration/drone/push Build is passing Details
Bugfix: listing result modify time error when file older than one year (#149)
Mod time error for file older than one year

File older than one year should be in  "MMM DD  YYYY" format, not "MMM DD hh:mm" format

Reviewed-on: #149
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: hpo3 <hpo3@noreply.gitea.io>
Co-committed-by: hpo3 <hpo3@noreply.gitea.io>
2 years ago
core Bugfix: listing result modify time error when file older than one year (#149) 2 years ago
driver Fix test 2 years ago
.drone.yml add golangci-lint to ci pipeline #127 (#130) 3 years ago
.gitignore Factor into server and driver directories (#120) 3 years ago
LICENSE release v0.3.0 5 years ago
README.md introcude v2 version on README 2 years ago
compat.go Factor into server and driver directories (#120) 3 years ago
go.mod Fix bug when not use ListenAndServe (#110) 3 years ago
go.sum Fix bug when not use ListenAndServe (#110) 3 years ago

README.md

server

Build Status

A FTP server framework forked from github.com/yob/graval and changed a lot.

Full documentation for the package is available on godoc

Installation

go get goftp.io/server

If you want to use v2 version which has some break change on interfaces, just

go get goftp.io/server/v2

Usage

To boot a FTP server you will need to provide a driver that speaks to your persistence layer - the required driver contract is in the documentation.

Look at the file driver to see an example of how to build a backend.

There is a sample ftp server as a demo. You can build it with this command:

go install goftp.io/ftpd

And finally, connect to the server with any FTP client and the following details:

host: 127.0.0.1
port: 2121
username: admin
password: 123456

This uses the file driver mentioned above to serve files.

Contact us

You can contact us via discord https://discord.gg/ytmYqfNfqh or QQ群 972357369

Contributors

see https://gitea.com/goftp/server/graphs/contributors

Warning

FTP is an incredibly insecure protocol. Be careful about forcing users to authenticate with an 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:

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:

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, 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.