Expand description
arks-server — Git server role (M11 / M25 / Phase Sv + Sv2).
Claimed: smart HTTP (G15), dumb/SSH/v2/git:// (G29–G32), additive WebDAV
write for dumb HTTP push (R2), optional HTTP Basic (G36),
receive-pack githooks honor list (pre-receive/update/post-receive),
and native info/lfs Batch + Basic Transfer server (E7).
Re-exports§
pub use web_ui::WEB_UI_CSP;pub use web_ui::handle_web_ui;pub use web_ui::html_escape;pub use web_ui::web_ui_page_handler;
Modules§
- lfs
- Native Git LFS server endpoints for
arks serve(info/lfs, E7). - web_ui
- Embedded single-binary SSR Web UI for
arks serve(E8).
Structs§
- Basic
Auth Config - Configured Basic auth store (one or more credentials).
- Basic
Credential - One plaintext Basic credential (
userid+password). - Daemon
Listeners - Bound listening sockets (bind first, drop privileges, then serve).
- Daemon
Log - Shared daemon logger (cheap to clone; one sink per process).
- Daemon
Options - Request-serving options of
git daemon(everything except socket setup and process control, which the CLI owns). - Host
Info - Result of resolving the host name a client sent with
host=. - Http
Request - Http
Response - Pusher
- What the transport knows about the pusher.
- RefUpdate
- One requested ref update; an all-zero
oldcreates, an all-zeronewdeletes. - Serve
Http Options - Serve
SshOptions - Options for the in-process SSH git listener.
- Service
Policy - Site-wide default for one service.
- Service
Table - Site-wide policy of every service (git defaults: only upload-pack enabled, every service overridable).
- StdPlatform
- Standard-library implementation.
Enums§
- Daemon
Outcome - What happened to one request.
- Daemon
Service - A
git://service the daemon can run. - LogDestination
- Where log lines go.
- Server
Error
Constants§
- BASIC_
REALM - Default realm advertised in
WWW-Authenticatechallenges. - DEFAULT_
DAEMON_ PORT - Default
git://port (IANAgit, gitDEFAULT_GIT_PORT). - SYSLOG_
IDENT - Syslog identifier used by
arks daemon. - SYSLOG_
SOCKET - Default local syslog socket.
Traits§
- Daemon
Platform - OS services used while resolving a request.
- Push
Policy - Decides, per ref update, whether a push may proceed.
Functions§
- base64_
encode - Encode bytes as standard Base64 (no wrapping) — used by tests / header builders.
- basic_
authorization_ header - bind_
daemon - Bind every address of every
--listenhost onport. With no host, bind all interfaces as git does. Fails only when nothing could be bound. - default_
authorized_ keys_ path - Default authorized_keys:
ARKS_SERVE_SSH_AUTHORIZED_KEYSor~/.config/arks/ssh/authorized_keys. - default_
host_ key_ path - Default host key:
ARKS_SERVE_SSH_HOST_KEYor~/.config/arks/ssh/host_key. - dumb_
info_ refs_ body - Build dumb
info/refsbody (TAB-separated; no HEAD; C-locale sort). - handle_
smart_ http - Handle one HTTP request against an open repository (smart + dumb + v2).
- handle_
smart_ http_ auth - Like
handle_smart_http, with optional Basic auth gate (LFS enabled by default). - handle_
v2_ request - Handle a v2 command request body (after capability advertisement).
- install_
push_ policy - Install (or clear) the process-wide policy used by the serving receive-pack paths.
- installed_
push_ policy - The installed policy, if any.
- load_
server_ config - Load a rustls
ServerConfigfrom operator-supplied PEM cert + key paths. - receive_
advertisement - Smart-HTTP receive-pack advertisement.
- receive_
pack - receive-pack with the installed push policy and a local pusher.
- receive_
pack_ advertisement - Pack-protocol duplex receive-pack advertisement (SSH / stdio).
- receive_
pack_ as - receive-pack with the installed push policy (
crate::install_push_policy). - receive_
pack_ session - receive_
pack_ stream - receive_
pack_ stream_ as receive_pack_streamfor a known transport pusher (push policy input).- receive_
pack_ with - receive-pack gated by an explicit push policy: each refused ref is reported
ng <ref> <reason>and left unchanged; other refs proceed. - serve_
daemon - Serve
git://onlistenersuntilstopis set. - serve_
daemon_ inetd --inetd: serve exactly one connection oninput/output.peeris the remote address when the CLI could read it from the inherited socket.- serve_
dumb_ path - Resolve a dumb HTTP GET path under the repository to bytes + content-type.
- serve_
http - Bind
addrand servegit_dirover smart HTTP untilstopis set or accept fails. - serve_
http_ scheme - Scheme label for listen banners (
httporhttps). - serve_
http_ with_ opts - serve_
ssh_ listener - Run an in-process SSH listener (durable accept per SoT §17(c)).
- spawn_
loopback - Bind an ephemeral port; return (bound addr, join handle, stop flag).
- spawn_
loopback_ daemon - Bind an ephemeral loopback daemon; return (addr, stop, join).
- spawn_
loopback_ ssh - Ephemeral loopback SSH listener for
arks serve ssh-smoke --git-pack. - spawn_
loopback_ with_ opts - spawn_
ssh_ listener - Spawn durable SSH listener on a background thread (cohost with HTTP/forge).
- update_
server_ info - Write
info/refsandobjects/info/packsfor dumb HTTP clients. - upload_
advertisement - Smart-HTTP upload-pack advertisement (
# service=git-upload-pack). - upload_
pack_ advertisement - Pack-protocol duplex advertisement (SSH /
git:/// stdio) — no HTTP service line. - upload_
pack_ result - upload_
pack_ session - Separate read/write halves (CLI stdio).
- upload_
pack_ stream - Single duplex stream (git:// TcpStream).
- v2_
capability_ advertisement - v2_
capability_ lines - Capability lines advertised for v2 (commands + agent).
Type Aliases§
- Listen
Rebind Slot - Shared slot: when set to
Some(addr), the HTTP accept loop performs a bounded dual-bind rebind. B7 is Claimed for the evidenced HTTP scenario; SSH/forge rebind and OpenSSH-class interop are separate gates. - Page
Handler - Optional page handler consulted for
GETrequests before git HTTP; it answersSome(response)for the paths it owns andNonefor the rest (used byinstawebfor its repository browser pages). - Product
TlsServer Config - Operator-supplied in-process TLS server config (B9); avoids naming
rustlsin CLI crates.