server

package module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 3 Imported by: 0

README

goftpd

Forked from https://gitea.com/goftp/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 github.com/kgolding/goftpd

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

go get github.com/kgolding/goftpd/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.

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 "github.com/kgolding/goftpd/core"

And if the drivers are required use

import "github.com/kgolding/goftpd/driver/file"
import "github.com/kgolding/goftpd/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 github.com/kgolding/goftpd/core

View Source
var NewMinioDriverFactory = minio.NewDriverFactory

Backwards compatible functions for the minio driver code.

New code should import github.com/kgolding/goftpd/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 github.com/kgolding/goftpd/core

type Command

type Command = core.Command

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Conn

type Conn = core.Conn

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type DataSocket

type DataSocket = core.DataSocket

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type DiscardLogger

type DiscardLogger = core.DiscardLogger

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Driver

type Driver = core.Driver

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type DriverFactory

type DriverFactory = core.DriverFactory

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type FileDriver

type FileDriver = file.Driver

Backwards compatible types for the file driver code.

New code should import github.com/kgolding/goftpd/driver/file

type FileDriverFactory

type FileDriverFactory = file.DriverFactory

Backwards compatible types for the file driver code.

New code should import github.com/kgolding/goftpd/driver/file

type FileInfo

type FileInfo = core.FileInfo

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Logger

type Logger = core.Logger

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type MinioDriver

type MinioDriver = minio.Driver

Backwards compatible types for the minio driver code.

New code should import github.com/kgolding/goftpd/driver/minio

type MinioDriverFactory

type MinioDriverFactory = minio.DriverFactory

Backwards compatible types for the minio driver code.

New code should import github.com/kgolding/goftpd/driver/minio

type MultipleDriver

type MultipleDriver = core.MultipleDriver

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type MultipleDriverFactory

type MultipleDriverFactory = core.MultipleDriverFactory

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Notifier

type Notifier = core.Notifier

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type NullNotifier

type NullNotifier = core.NullNotifier

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Perm

type Perm = core.Perm

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type Server

type Server = core.Server

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type ServerOpts

type ServerOpts = core.ServerOpts

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type SimpleAuth

type SimpleAuth = core.SimpleAuth

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type SimplePerm

type SimplePerm = core.SimplePerm

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

type StdLogger

type StdLogger = core.StdLogger

Backwards compatible types for the server code.

New code should import github.com/kgolding/goftpd/core

Directories

Path Synopsis
driver

Jump to

Keyboard shortcuts

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