RepositoryRust
TH

TheWaWaR/simple-http-server

Simple http server in Rust (Windows/Mac/Linux)

3.5kstars
219forks
39issues
3views

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: static

#1 Repository Của Tháng

1
TINIX TRENDING·Chủ đề: simplehttpserver

#1 Repository Của Tháng

2
TINIX TRENDING·Chủ đề: file

#2 Repository Của Tháng

🦀 Máy chủ HTTP tĩnh bằng Rust với đầy đủ tính năng mà không phức tạp

Một binary duy nhất, cargo install là xong — serve file, upload, HTTPS, SPA fallback đều có.

Simple HTTP Server là một máy chủ tĩnh viết bằng Rust, chạy trên Windows, Mac và Linux. Dựa trên axum/tokio, nó cung cấp đầy đủ các tính năng thường thấy ở một file server chuyên nghiệp nhưng giữ cho binary mặc định nhỏ gọn bằng cách tắt TLS theo mặc định. Dự án hiện có 3.461 sao trên GitHub.

✨ Điểm nổi bật

  • Liệt kê thư mục có breadcrumb: duyệt cấu trúc thư mục trực quan khi không có index.html
  • Tải lên file: hỗ trợ nhiều file cùng lúc, có bảo vệ CSRF token
  • HTTP Basic Auth: bảo vệ thư mục bằng username:password
  • Range requests: hỗ trợ partial content phục vụ video, audio, file lớn
  • Nén gzip/deflate: giảm băng thông cho các file js, css, html...
  • CORS + COOP + COEP: cấu hình bảo mật chéo gốc chỉ bằng một cờ bật
  • SPA fallback: --try-file tự chuyển các đường 404 về index.html, phù hợp cho React, Vue, Svelte...
  • HTTPS qua PKCS#12: bật feature tls để hỗ trợ .p12/.pfx, binary mặc định vẫn nhỏ
  • Cache control: Last-Modified và ETag hỗ trợ HTTP caching
  • Base URL prefix: --base-url để chạy sau reverse proxy strip path

💡 Vì sao đáng chú ý

Dự án giải quyết đúng nhu cầu "cần serve file nhanh" mà không cần viết code hay cấu hình nặng. Chỉ một lệnh cargo install simple-http-server là có binary sử dụng được, thêm -i để tự render index.html, thêm -u để bật upload. Cấu hình CLI rõ ràng, mỗi option tương ứng một hành động cụ thể.

Điểm đáng lưu ý là cách dự án xử lý HTTPS: feature tls bị tắt mặc định, giữ binary gọn nhẹ cho phần lớn trường hợp chỉ cần HTTP. Khi cần TLS, chỉ cần thêm --features tls và truyền file PKCS#12 — không phải chuyển đổi định dạng phức tạp. SPA fallback qua --try-file cũng là một điểm hay cho frontend devs muốn local test mà không cần cấu hình server riêng.


#Rust #StaticFileServer #HTTPS #SPAFallback #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
http-party/http-server

A simple, zero-configuration, command-line http server

14.2k
Apr 15, 2026
RepositoryHaskell
PostgREST/postgrest

REST API for any Postgres database

27.8k
Nov 21, 2026
RepositorySwift
vapor/vapor

💧 A server-side Swift HTTP web framework.

26.2k
Nov 24, 2026
RepositoryTypeScript
elysiajs/elysia

Ergonomic Framework for Humans

19.4k
Nov 20, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
165.0M
Jun 1, 2026
RepositoryRust
farion1231/cc-switch

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode,DeepSeek Harness and more. Only official website: ccswitch.io

156.9k
Nov 24, 2026
RepositoryRust
rustdesk/rustdesk

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

131.2k
Nov 24, 2026
RepositoryRust
rust-lang/rust

Empowering everyone to build reliable and efficient software.

122.4k
Nov 22, 2026
RepositoryRust
tauri-apps/tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.

113.2k
Nov 23, 2026