• Stars
    star
    182
  • Rank 211,154 (Top 5 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created almost 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Extensible, async, cloud orientated FTP(S) server library and the core of unFTP: https://github.com/bolcom/unFTP. Follow up and talk to us on https://t.me/unftp

libunftp

Crate Version API Docs Build Status Crate License Follow on Telegram

When you need to FTP, but don't want to.

logo

Website | API Docs | unFTP

The libunftp library drives unFTP. It's an extensible, async, cloud orientated FTP(S) server implementation in Rust brought to you by the bol.com techlab.

Because of its plug-able authentication (e.g. PAM, JSON File, Generic REST) and storage backends (e.g. local filesystem, Google Cloud Storage) it's more flexible than traditional FTP servers and a perfect match for the cloud.

It runs on top of the Tokio asynchronous run-time and tries to make use of Async IO as much as possible.

Feature highlights:

  • 39 Supported FTP commands (see commands directory) and growing
  • Ability to implement own storage back-ends
  • Ability to implement own authentication back-ends
  • Explicit FTPS (TLS)
  • Mutual TLS (Client certificates)
  • TLS session resumption
  • Prometheus integration
  • Structured Logging
  • Proxy Protocol support
  • Automatic session timeouts
  • Per user IP allow lists

Known storage back-ends:

Known authentication back-ends:

Prerequisites

You'll need Rust 1.41 or higher to build libunftp.

Getting started

If you've got Rust and cargo installed, create your project with

cargo new myftp

Add the libunftp and tokio crates to your project's dependencies in Cargo.toml. Then also choose a storage back-end implementation to add. Here we choose the file system back-end:

[dependencies]
libunftp = "0.18.9"
unftp-sbe-fs = "0.2"
tokio = { version = "1", features = ["full"] }

Now you're ready to develop your server! Add the following to src/main.rs:

use unftp_sbe_fs::ServerExt;

#[tokio::main]
pub async fn main() {
    let ftp_home = std::env::temp_dir();
    let server = libunftp::Server::with_fs(ftp_home)
        .greeting("Welcome to my FTP server")
        .passive_ports(50000..65535);
    
    server.listen("127.0.0.1:2121").await;
}

You can now run your server with cargo run and connect to localhost:2121 with your favourite FTP client e.g.:

lftp -p 2121 localhost

For more help refer to:

Getting help and staying informed

Support is given on a best effort basis. You are welcome to engage us on the discussions page or create a Github issue.

You can also follow news and talk to us on Telegram

Contributing

Thank you for your interest in contributing to libunftp!

Please feel free to create a Github issue if you encounter any problems.

Want to submit a feature request or develop your own storage or authentication back-end? Then head over to our contribution guide (CONTRIBUTING.md).

License

You're free to use, modify and distribute this software under the terms of the Apache License v2.0.

More Repositories

1

unFTP

A FTP(S) server with a couple of twists written in Rust. Follow and talk to us on https://t.me/unftp. Docs on https://unftp.rs
HTML
267
star
2

serenade

Session-based recommender system: Serenade
Rust
76
star
3

hive_compared_bq

hive_compared_bq compares/validates 2 (SQL like) tables, and graphically shows the rows/columns that are different.
Python
28
star
4

avro-schema-viewer

Visualizer for Avro Schemas (.avsc) - Try it yourself at:
TypeScript
28
star
5

bol-technical-assignments

bol.com technical recruitment assignments
Java
10
star
6

prometheus-remote-storage-adapter

Go
8
star
7

terraform-provider-calico

Terraform Provider for Calico
Go
5
star
8

local-prometheus-grafana

5
star
9

mesos_metrics

Go definitions for the Mesos `{master}:5050/metrics/snapshot` and `{slave}:5051/metrics/snapshot` endpoints
Go
4
star
10

cryptvault

Generic, versioned crypto implementation
Java
3
star
11

muts

Go package with utilities to create shell and make-like files in Go
Go
3
star
12

serenade-experiments-sigmod

Rust
2
star
13

docker-for-testers

Introductory Docker training, focused on use on your local machine
CSS
2
star
14

recon

Python
1
star
15

k8s-scheduler-tester

Active monitoring of Kubernetes scheduler health, with Prometheus metrics endpoint.
Python
1
star
16

fleet-java-api

Java api using fleet REST api https://github.com/coreos/fleet
Java
1
star
17

log15-redis-handler

handler for the log15 package that sends JSON messages in Logstash format to a Redis queue
Go
1
star
18

student-dojo

Java Dojo used for student workshop @ bol.com
Java
1
star
19

stash-java-client-cd

Java Client for Atlassian Stash
Java
1
star
20

jira-java-client

Java Client for Atlassian Jira
Java
1
star
21

spring-data-mongodb-rollback

A distributed, optimistic, cross-microservice/generic transaction engine for spring-data & mongodb
Java
1
star
22

parsival

OpenAPI differ and backwards compatibility checker
Kotlin
1
star