1#![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;
18mod serve;
19mod ssh_openssh_chacha;
20mod ssh_serve;
21mod stdio;
22mod tls;
23mod upload;
24mod v2;
25mod walk;
26pub mod web_ui;
27pub use auth::{
28 BASIC_REALM, BasicAuthConfig, BasicCredential, base64_encode, basic_authorization_header,
29};
30pub use daemon::{
31 DEFAULT_DAEMON_PORT, DaemonListeners, DaemonLog, DaemonOptions, DaemonPlatform, DaemonService,
32 HostInfo, LogDestination, Outcome as DaemonOutcome, SYSLOG_IDENT, SYSLOG_SOCKET, ServicePolicy,
33 ServiceTable, StdPlatform, bind_daemon, serve_daemon, serve_daemon_inetd,
34 spawn_loopback_daemon,
35};
36pub use dumb::{dumb_info_refs_body, serve_dumb_path, update_server_info};
37pub use error::ServerError;
38pub use http::{HttpRequest, HttpResponse, handle_smart_http, handle_smart_http_auth};
39pub use push_policy::{PushPolicy, Pusher, RefUpdate, install_push_policy, installed_push_policy};
40pub use receive::{
41 receive_advertisement, receive_pack, receive_pack_advertisement, receive_pack_as,
42 receive_pack_with,
43};
44pub use serve::{
45 ListenRebindSlot, PageHandler, ServeHttpOptions, serve_http, serve_http_scheme,
46 serve_http_with_opts, spawn_loopback, spawn_loopback_with_opts,
47};
48pub use ssh_serve::{
49 ServeSshOptions, default_authorized_keys_path, default_host_key_path, serve_ssh_listener,
50 spawn_loopback_ssh, spawn_ssh_listener,
51};
52pub use stdio::{
53 receive_pack_session, receive_pack_stream, receive_pack_stream_as, upload_pack_session,
54 upload_pack_stream,
55};
56pub use tls::load_server_config;
57pub type ProductTlsServerConfig = std::sync::Arc<rustls::ServerConfig>;
59pub use upload::{upload_advertisement, upload_pack_advertisement, upload_pack_result};
60pub use v2::{handle_v2_request, v2_capability_advertisement, v2_capability_lines};
61pub use web_ui::{WEB_UI_CSP, handle_web_ui, html_escape, web_ui_page_handler};
62#[cfg(test)]
63mod tests;