Expand description
A simple HTTP/WebDAV server — file serving, directory listing, and full WebDAV protocol support with optional TLS and Basic Auth.
Re-exports§
pub use auth::AuthState;pub use auth::build_auth_state;
Modules§
- auth
- Authentication types and shadow file management.
Authentication types, shadow file management, and the
build_auth_stateentry point. - handlers
- Request handlers for HTTP and WebDAV methods.
Request handlers for HTTP (
GET/HEAD/PUT/DELETE/OPTIONS) and WebDAV (PROPFIND/MKCOL/COPY/MOVE/PROPPATCH/LOCK/UNLOCK) methods. - middleware
- Tower middleware layers. Tower middleware layers — authentication, lock enforcement, and health checks.
- webdav
- WebDAV protocol types and helpers.
WebDAV protocol types (locks, properties, depth, conditions), XML parsing
helpers,
If/Lock-Token/Timeout/Depthheader parsers, and filesystem traversal utilities.
Structs§
- AppState
- Server state, configuration, startup, and router construction. Shared application state passed to every handler and middleware.
- Cli
- Command-line interface. A hybrid HTTP file server and WebDAV server
- Server
Config - Server state, configuration, startup, and router construction. Configuration for starting the server — root directory, bind address, optional TLS, authentication, and default lock timeout.
- TlsConfig
- TLS certificate/key configuration. TLS certificate and private key file paths (PEM format).
Functions§
- make_
router - Server state, configuration, startup, and router construction. Build the full middleware stack and request dispatch router from shared state.
- start_
server - Server state, configuration, startup, and router construction. Builds the axum router with all middleware layers, then starts the HTTP or HTTPS server. Also spawns a background task to prune expired locks and auth cache entries every 30 seconds.
Type Aliases§
- AppResult
- Server state, configuration, startup, and router construction.
Result type alias for handlers, with
Responsesuccess andStatusCodeerror by default.