GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - FubarDevelopment/FtpServer: Portable FTP server written in .NET

BranchesTags
Open more actions menu

Latest commit

 

History

728 Commits
728 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
docfx_project
docfx_project
 
 
docs
docs
 
 
samples
samples
 
 
src
src
 
 
test/FubarDev.FtpServer.Tests
test/FubarDev.FtpServer.Tests
 
 
third-party
third-party
 
 
.dockerignore
.dockerignore
 
 
.editorconfig
.editorconfig
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
DotNetSdkMono.props
DotNetSdkMono.props
 
 
FubarDev.FtpServer.ruleset
FubarDev.FtpServer.ruleset
 
 
FubarDev.FtpServer.sln
FubarDev.FtpServer.sln
 
 
FubarDev.FtpServer.sln.DotSettings
FubarDev.FtpServer.sln.DotSettings
 
 
FubarDev.FtpServer.v3.ncrunchsolution
FubarDev.FtpServer.v3.ncrunchsolution
 
 
GitVersion.yml
GitVersion.yml
 
 
Global.props
Global.props
 
 
GlobalAssemblyInfo.cs
GlobalAssemblyInfo.cs
 
 
LICENSE.md
LICENSE.md
 
 
PackageLibrary.props
PackageLibrary.props
 
 
README.md
README.md
 
 
azure-pipelines.yml
azure-pipelines.yml
 
 
stylecop.json
stylecop.json
 
 

Repository files navigation

Portable FTP server

Build Status

This FTP server is written as .NET Standard 2.0 library and has an abstract file system which allows e.g. Google Drive as backend.

License

The library is released under the MIT license.

Support the development

Patreon

Prerequisites

Compilation

  • Visual Studio 2022 / C# 8.0

Using

  • Visual Studio 2022
  • .NET Standard 2.0 (everything except sample application, PAM authentication)
  • .NET Core 3.1 (PAM authentication)

NuGet packages

Package name Description Badge
FubarDev.FtpServer Core library FubarDev.FtpServer
FubarDev.FtpServer.Abstractions Basic types FubarDev.FtpServer.Abstractions
FubarDev.FtpServer.FileSystem.DotNet System.IO-based file system FubarDev.FtpServer.FileSystem.DotNet
FubarDev.FtpServer.FileSystem.GoogleDrive Google Drive as file system FubarDev.FtpServer.FileSystem.GoogleDrive
FubarDev.FtpServer.FileSystem.InMemory In-memory file system FubarDev.FtpServer.FileSystem.InMemory
FubarDev.FtpServer.FileSystem.Unix Unix file system FubarDev.FtpServer.FileSystem.Unix
FubarDev.FtpServer.MembershipProvider.Pam PAM membership provider FubarDev.FtpServer.MembershipProvider.Pam

Example FTP server

Creating the project

dotnet new console
dotnet add package FubarDev.FtpServer.FileSystem.DotNet
dotnet add package FubarDev.FtpServer
dotnet add package Microsoft.Extensions.DependencyInjection

Contents of Main in Program.cs

// Setup dependency injection
var services = new ServiceCollection();

// use %TEMP%/TestFtpServer as root folder
services.Configure<DotNetFileSystemOptions>(opt => opt
    .RootPath = Path.Combine(Path.GetTempPath(), "TestFtpServer"));

// Add FTP server services
// DotNetFileSystemProvider = Use the .NET file system functionality
// AnonymousMembershipProvider = allow only anonymous logins
services.AddFtpServer(builder => builder
    .UseDotNetFileSystem() // Use the .NET file system functionality
    .EnableAnonymousAuthentication()); // allow anonymous logins

// Configure the FTP server
services.Configure<FtpServerOptions>(opt => opt.ServerAddress = "127.0.0.1");

// Build the service provider
using (var serviceProvider = services.BuildServiceProvider())
{
    // Initialize the FTP server
    var ftpServerHost = serviceProvider.GetRequiredService<IFtpServerHost>();

    // Start the FTP server
    ftpServerHost.StartAsync(CancellationToken.None).Wait();

    Console.WriteLine("Press ENTER/RETURN to close the test application.");
    Console.ReadLine();

    // Stop the FTP server
    ftpServerHost.StopAsync(CancellationToken.None).Wait();
}

About

Portable FTP server written in .NET

fubardevelopment.github.io/FtpServer/

Topics

dotnetftp-server

Resources

Readme
MIT license
Activity
Custom properties

Stars

521 stars

Watchers

30 watching

Forks

181 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.