From 7cd907b78dc90c338448bf4c079067cd563baa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BC=D1=98=D0=B0=D0=BD=20=D0=93=D0=B5=D0=BE?= =?UTF-8?q?=D1=80=D0=B3=D0=B8=D0=B5=D0=B2=D1=81=D0=BA=D0=B8?= Date: Wed, 4 Jul 2018 10:55:05 +0200 Subject: [PATCH] initial idea commited --- .gitignore | 2 ++ Cargo.toml | 15 +++++++++++++++ LICENSE | 22 ++++++++++++++++++++++ README.md | 18 ++++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 LICENSE create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53eaa21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +**/*.rs.bk diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..e701f71 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,15 @@ +[package] +name = "http-server" +version = "0.1.0" +authors = ["Damjan Georgievski "] +license = "MIT" +readme = "README.md" + +[dependencies] +actix = "*" +actix-web = { git = "https://github.com/actix/actix-web.git" } +futures = "0.1" +tar = "0.4" + +[patch.crates-io] +actix = { git = "https://github.com/actix/actix.git" } diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..fb749c5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2009 Damjan Georgievski + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6031d2c --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +a simple http server like `python -m http.server` but: + +* written in rust with actix, should be faster +* allow concurency +* download whole directories in .tar format +* better auto index +* maybe announce itself on mDNS (avahi) +* maybe compress + +Usage: + +``` +http-server [--bind ADDRESS] [--chdir DIRECTORY] [port] + + port Specify alternate port [default: 8000] + --bind ADDRESS Specify alternate bind address [default: all interfaces] + --chdir DIRECTORY Specify directory to server [default: current directory] +```