Skip to main content

arks_server/
lib.rs

1//! arks-server — Git server role (M11 / M25 / Phase Sv + Sv2).
2//! Claimed: smart HTTP (G15), dumb/SSH/v2/git:// (G29–G32), additive WebDAV
3//! write for dumb HTTP push (R2), optional HTTP Basic (G36),
4//! receive-pack githooks honor list (pre-receive/update/post-receive),
5//! and native `info/lfs` Batch + Basic Transfer server (E7).
6#![forbid(unsafe_code)]
7mod advertise;
8mod auth;
9mod daemon;
10mod dav;
11mod dumb;
12mod error;
13mod hooks;
14mod http;
15pub mod lfs;
16mod push_policy;
17mod receive;
18pub mod ref_gate;
19mod serve;
20mod ssh_openssh_chacha;
21mod ssh_serve;
22mod stdio;
23mod tls;
24mod upload;
25mod v2;
26mod walk;
27pub mod web_ui;
28pub use auth::{
29    BASIC_REALM, BasicAuthConfig, BasicCredential, base64_encode, basic_authorization_header,
30};
31pub use daemon::{
32    DEFAULT_DAEMON_PORT, DaemonListeners, DaemonLog, DaemonOptions, DaemonPlatform, DaemonService,
33    HostInfo, LogDestination, Outcome as DaemonOutcome, SYSLOG_IDENT, SYSLOG_SOCKET, ServicePolicy,
34    ServiceTable, StdPlatform, bind_daemon, serve_daemon, serve_daemon_inetd,
35    spawn_loopback_daemon,
36};
37pub use dumb::{dumb_info_refs_body, serve_dumb_path, update_server_info};
38pub use error::ServerError;
39pub use http::{HttpRequest, HttpResponse, handle_smart_http, handle_smart_http_auth};
40pub use push_policy::{PushPolicy, Pusher, RefUpdate, install_push_policy, installed_push_policy};
41pub use receive::{
42    receive_advertisement, receive_pack, receive_pack_advertisement, receive_pack_as,
43    receive_pack_with,
44};
45pub use serve::{
46    ListenRebindSlot, PageHandler, ServeHttpOptions, serve_http, serve_http_scheme,
47    serve_http_with_opts, spawn_loopback, spawn_loopback_with_opts,
48};
49pub use ssh_serve::{
50    ServeSshOptions, default_authorized_keys_path, default_host_key_path, serve_ssh_listener,
51    spawn_loopback_ssh, spawn_ssh_listener,
52};
53pub use stdio::{
54    receive_pack_session, receive_pack_stream, receive_pack_stream_as, upload_pack_session,
55    upload_pack_stream,
56};
57pub use tls::load_server_config;
58/// Operator-supplied in-process TLS server config (B9); avoids naming `rustls` in CLI crates.
59pub type ProductTlsServerConfig = std::sync::Arc<rustls::ServerConfig>;
60pub use upload::{upload_advertisement, upload_pack_advertisement, upload_pack_result};
61pub use v2::{
62    handle_v2_request, v2_capability_advertisement, v2_capability_advertisement_for,
63    v2_capability_lines, v2_capability_lines_for,
64};
65pub use web_ui::{
66    WEB_UI_CSP, handle_web_ui, html_escape, init_bare_repo, multi_repo_page_handler,
67    web_ui_page_handler, web_ui_page_handler_with_actions,
68};
69#[cfg(test)]
70mod tests;