5 releases

Uses new Rust 2021

new 0.2.2 Jan 25, 2023
0.2.1 Jun 25, 2022
0.2.0 Jul 13, 2021
0.1.1 May 22, 2021
0.1.0 Mar 26, 2021

#307 in Network programming

Download history 355/week @ 2022-10-07 361/week @ 2022-10-14 324/week @ 2022-10-21 498/week @ 2022-10-28 981/week @ 2022-11-04 789/week @ 2022-11-11 611/week @ 2022-11-18 368/week @ 2022-11-25 534/week @ 2022-12-02 399/week @ 2022-12-09 222/week @ 2022-12-16 177/week @ 2022-12-23 219/week @ 2022-12-30 510/week @ 2023-01-06 487/week @ 2023-01-13 659/week @ 2023-01-20

1,918 downloads per month
Used in 4 crates

Apache-2.0

355KB
7K SLoC

unftp-sbe-fs

Crate Version API Docs Crate License Follow on Telegram

This unftp-sbe-fs crate allows you to use a regular Filesystem with libunftp and work like a regular FTP server.

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.

[dependencies]
libunftp = "0.18.8"
unftp-sbe-fs = "0.2.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 unftp-sbe-fs!

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.

Dependencies

~16–24MB
~476K SLoC