{"id":21659770,"url":"https://github.com/bolcom/libunftp","last_synced_at":"2025-05-15T04:04:27.299Z","repository":{"id":40274785,"uuid":"160579647","full_name":"bolcom/libunftp","owner":"bolcom","description":"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","archived":false,"fork":false,"pushed_at":"2025-04-24T19:14:56.000Z","size":1696,"stargazers_count":195,"open_issues_count":43,"forks_count":37,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-24T19:41:20.438Z","etag":null,"topics":["ftp","hacktoberfest","rust","server"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bolcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-05T21:16:28.000Z","updated_at":"2025-04-24T19:14:59.000Z","dependencies_parsed_at":"2023-11-28T12:31:12.484Z","dependency_job_id":"9b5022f2-70e6-47d5-b41a-dd33538a7544","html_url":"https://github.com/bolcom/libunftp","commit_stats":{"total_commits":612,"total_committers":27,"mean_commits":"22.666666666666668","dds":0.542483660130719,"last_synced_commit":"26cfed94d5f13fe167b492d9c0dc582f73a6e776"},"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flibunftp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flibunftp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flibunftp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bolcom%2Flibunftp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bolcom","download_url":"https://codeload.github.com/bolcom/libunftp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270641,"owners_count":22042858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ftp","hacktoberfest","rust","server"],"created_at":"2024-11-25T09:31:31.337Z","updated_at":"2025-05-15T04:04:27.280Z","avatar_url":"https://github.com/bolcom.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# [libunftp](https://github.com/bolcom/libunftp)\n\n[![Crate Version](https://img.shields.io/crates/v/libunftp.svg)](https://crates.io/crates/libunftp)\n[![API Docs](https://docs.rs/libunftp/badge.svg)](https://docs.rs/libunftp)\n[![Build Status](https://github.com/bolcom/libunftp/actions/workflows/rust.yml/badge.svg?branch=master)](https://github.com/bolcom/libunftp/actions/workflows/rust.yml)\n[![Crate License](https://img.shields.io/crates/l/libunftp.svg)](https://crates.io/crates/libunftp)\n[![Follow on Telegram](https://img.shields.io/badge/Follow%20on-Telegram-brightgreen.svg)](https://t.me/unftp)\n\nWhen you need to FTP, but don't want to.\n\n![logo](logo.png)\n\n[**Website**](https://unftp.rs) | [**API Docs**](https://docs.rs/libunftp) | [**unFTP\n**](https://github.com/bolcom/unFTP)\n\nThe libunftp library drives [unFTP](https://github.com/bolcom/unFTP). It's an extensible, async, cloud orientated FTP(S)\nserver implementation in [Rust](https://rust-lang.org) brought to you by the [bol.com techlab](https://techlab.bol.com).\n\nBecause of its plug-able authentication (e.g. PAM, JSON File, Generic REST) and storage\nbackends (e.g. local filesystem, [Google Cloud Storage](https://cloud.google.com/storage)) it's\nmore flexible than traditional FTP servers and a perfect match for the cloud.\n\nIt runs on top of the [Tokio](https://tokio.rs) asynchronous run-time and tries to make use of Async IO as much as\npossible.\n\nFeature highlights:\n\n* 39 Supported FTP commands (see [commands directory](./src/server/controlchan/commands)) and growing\n* Ability to implement own storage back-ends\n* Ability to implement own authentication back-ends\n* Explicit FTPS (TLS)\n* Mutual TLS (Client certificates)\n* TLS session resumption\n* Prometheus integration\n* Structured Logging\n* [Proxy Protocol](https://www.haproxy.com/blog/haproxy/proxy-protocol/) support\n* Automatic session timeouts\n* Per user IP allow lists\n* Configurable cryptographic providers (ring or aws-lc-rs)\n\nKnown storage back-ends:\n\n* [unftp-sbe-fs](https://crates.io/crates/unftp-sbe-fs) - Stores files on the local filesystem\n* [unftp-sbe-gcs](https://crates.io/crates/unftp-sbe-gcs) - Stores files in Google Cloud Storage\n* [unftp-sbe-rooter](https://crates.io/crates/unftp-sbe-rooter) - Wraps another storage back-end in order to root a user\n  to a specific home directory.\n* [unftp-sbe-restrict](https://crates.io/crates/unftp-sbe-rooter) - Wraps another storage back-end in order to restrict\n  the FTP operations a user can do i.e. provide authorization.\n\nKnown authentication back-ends:\n\n* [unftp-auth-jsonfile](https://crates.io/crates/unftp-auth-jsonfile) - Authenticates against JSON text.\n* [unftp-auth-pam](https://crates.io/crates/unftp-auth-pam) - Authenticates\n  via [PAM](https://en.wikipedia.org/wiki/Linux_PAM).\n* [unftp-auth-rest](https://crates.io/crates/unftp-auth-rest) - Consumes an HTTP API to authenticate.\n\n## Cryptographic Providers\n\nThese two feature flags can be used to select the cryptographic provider:\n\n- `aws_lc_rs` (default): Uses AWS-LC through `rustls` for cryptographic operations\n- `ring`: Uses the ring crate for cryptographic operations\n\nTo use a specific provider, enable the corresponding feature in your `Cargo.toml`:\n\n```toml\n[dependencies]\nlibunftp = { version = \"0.21.0\", features = [\"ring\"] }  # Use ring\n# or\nlibunftp = { version = \"0.21.0\", features = [\"aws_lc_rs\"] }  # Use aws-lc-rs (default)\n```\n\nThe default provider is `aws-lc-rs` for backward compatibility. Choose the provider that best fits your needs:\n\n- [`ring`](https://crates.io/crates/ring): More widely used, good for general-purpose applications\n- [`aws-lc-rs`](https://crates.io/crates/aws-lc-rs): Optimized for AWS environments, good for cloud deployments\n\n## Prerequisites\n\nYou'll need [Rust](https://rust-lang.org) 1.85.0 or higher to build libunftp.\n\n## Getting started\n\nIf you've got Rust and cargo installed, create your project with\n\n```sh\ncargo new myftp\n```\n\nAdd the libunftp and tokio crates to your project's dependencies in `Cargo.toml`. Then also choose\na [storage back-end implementation](https://crates.io/search?page=1\u0026per_page=10\u0026q=unftp-sbe) to\nadd. Here we choose the [file system back-end](https://crates.io/crates/unftp-sbe-fs):\n\n```toml\n[dependencies]\nlibunftp = \"0.21.0\"\nunftp-sbe-fs = \"0.2\"\ntokio = { version = \"1\", features = [\"full\"] }\n```\n\nNow you're ready to develop your server!\nAdd the following to `src/main.rs`:\n\n```rust\nuse unftp_sbe_fs::ServerExt;\n\n#[tokio::main]\npub async fn main() {\n    let ftp_home = std::env::temp_dir();\n    let server = libunftp::Server::with_fs(ftp_home)\n        .greeting(\"Welcome to my FTP server\")\n        .passive_ports(50000..=65535)\n        .build()\n        .unwrap();\n\n    server.listen(\"127.0.0.1:2121\").await;\n}\n```\n\nYou can now run your server with `cargo run` and connect to `localhost:2121` with your favourite FTP client e.g.:\n\n```sh\nlftp -p 2121 localhost\n```\n\nFor more help refer to:\n\n- the [examples](./examples) directory.\n- the [API Documentation](https://docs.rs/libunftp).\n- [unFTP server](https://github.com/bolcom/unFTP), a server from the bol.com techlab that is built on top of libunftp.\n- this [blog post](https://blog.abstractinvoke.com/05-07-unftp.html) about libunftp and unFTP.\n\n## Getting help and staying informed\n\nSupport is given on a best effort basis. You are welcome to engage us\non [the discussions page](https://github.com/bolcom/libunftp/discussions)\nor create a Github issue.\n\nYou can also follow news and talk to us on [Telegram](https://t.me/unftp)\n\n## Contributing\n\nThank you for your interest in contributing to libunftp!\n\nPlease feel free to create a Github issue if you encounter any problems.\n\nWant to submit a feature request or develop your own storage or authentication back-end? Then head over to\nour [contribution guide (CONTRIBUTING.md)](CONTRIBUTING.md).\n\n## License\n\nYou're free to use, modify and distribute this software under the terms of\nthe [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolcom%2Flibunftp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbolcom%2Flibunftp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbolcom%2Flibunftp/lists"}