Add server options on conn Reviewed-on: goftp/server#114
|2 months ago|
|.drone.yml||3 months ago|
|.gitignore||2 months ago|
|LICENSE||2 years ago|
|README.md||1 year ago|
|auth.go||1 year ago|
|cmd.go||3 months ago|
|cmd_test.go||2 years ago|
|conn.go||2 months ago|
|conn_test.go||3 months ago|
|doc.go||2 years ago|
|driver.go||3 months ago|
|driver_file.go||2 months ago|
|driver_minio.go||2 months ago|
|driver_minio_test.go||2 months ago|
|file_info.go||3 months ago|
|go.mod||2 months ago|
|go.sum||2 months ago|
|list_formatter.go||5 months ago|
|logger.go||3 months ago|
|notifier.go||3 months ago|
|notifier_test.go||4 months ago|
|perm.go||3 months ago|
|server.go||2 months ago|
|server_test.go||3 months ago|
|socket.go||5 months ago|
A FTP server framework forked from github.com/yob/graval and changed a lot.
Full documentation for the package is available on godoc
go get goftp.io/server
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/server/exampleftpd
Then run it if you have add $GOPATH to your $PATH:
exampleftpd -root /tmp
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.
FTP is an incredibly insecure protocol. Be careful about forcing users to authenticate with an username or password that are important.
This library is distributed under the terms of the MIT License. See the included file for more detail.
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.
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.