server

package module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2020 License: MIT Imports: 3 Imported by: 11

README

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

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.

Documentation

Overview

Package server is a backwards compatibility shim for this module

The code has been re-organised to split out the drivers from the server functionality.

New code should

import "goftp.io/server/core"

And if the drivers are required use

import "goftp.io/server/driver/file"
import "goftp.io/server/driver/minio"

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrServerClosed = core.ErrServerClosed
	NewServer       = core.NewServer
	NewSimplePerm   = core.NewSimplePerm
	Version         = core.Version
)

Backwards compatible functions and variables for the server code.

New code should import goftp.io/server/core

View Source
var NewMinioDriverFactory = minio.NewDriverFactory

Backwards compatible functions for the minio driver code.

New code should import goftp.io/server/driver/minio

Functions

This section is empty.

Types

type Auth

type Auth = core.Auth

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Command

type Command = core.Command

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Conn

type Conn = core.Conn

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type DataSocket

type DataSocket = core.DataSocket

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type DiscardLogger

type DiscardLogger = core.DiscardLogger

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Driver

type Driver = core.Driver

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type DriverFactory

type DriverFactory = core.DriverFactory

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type FileDriver added in v0.3.2

type FileDriver = file.Driver

Backwards compatible types for the file driver code.

New code should import goftp.io/server/driver/file

type FileDriverFactory added in v0.3.2

type FileDriverFactory = file.DriverFactory

Backwards compatible types for the file driver code.

New code should import goftp.io/server/driver/file

type FileInfo

type FileInfo = core.FileInfo

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Logger

type Logger = core.Logger

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type MinioDriver added in v0.3.3

type MinioDriver = minio.Driver

Backwards compatible types for the minio driver code.

New code should import goftp.io/server/driver/minio

type MinioDriverFactory added in v0.3.3

type MinioDriverFactory = minio.DriverFactory

Backwards compatible types for the minio driver code.

New code should import goftp.io/server/driver/minio

type MultipleDriver added in v0.3.2

type MultipleDriver = core.MultipleDriver

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type MultipleDriverFactory added in v0.3.2

type MultipleDriverFactory = core.MultipleDriverFactory

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Notifier added in v0.3.3

type Notifier = core.Notifier

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type NullNotifier added in v0.3.4

type NullNotifier = core.NullNotifier

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Perm

type Perm = core.Perm

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type Server

type Server = core.Server

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type ServerOpts

type ServerOpts = core.ServerOpts

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type SimpleAuth

type SimpleAuth = core.SimpleAuth

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type SimplePerm

type SimplePerm = core.SimplePerm

Backwards compatible types for the server code.

New code should import goftp.io/server/core

type StdLogger

type StdLogger = core.StdLogger

Backwards compatible types for the server code.

New code should import goftp.io/server/core

Directories

Path Synopsis
driver

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL