commit 0e727f8

uint  ·  2026-01-31 12:28:06 +0000 UTC
parent 92e059d
conform all docs to max line-length 60-Character
3 files changed,  +72, -63
+21, -19
 1@@ -9,18 +9,18 @@
 2 .Op Fl v
 3 .Sh DESCRIPTION
 4 .Nm
 5-is a minimal HTTP media server for serving local audio and video files
 6-over a network.
 7-It exposes a HTTP interface intended for use by external
 8-clients such as media players or web frontends.
 9+is a minimal HTTP media server for serving local audio and
10+video files over a network.  It exposes a HTTP interface
11+intended for use by external clients such as media players
12+or web frontends.
13 .Pp
14-The server scans a directory tree at startup and exposes the contents
15-through a simple HTTP API.
16-Each file is assigned an identifier derived from its relative path.
17+The server scans a directory tree at startup and exposes the
18+contents through a simple HTTP API.  Each file is assigned
19+an identifier derived from its relative path.
20 .Pp
21 .Nm
22-does not provide a user interface;
23-all interaction is expected to happen through clients.
24+does not provide a user interface; all interaction is
25+expected to happen through clients.
26 .Sh OPTIONS
27 .Bl -tag -width Ds
28 .It Fl v
29@@ -41,15 +41,17 @@ or, if not present,
30 .It
31 Parse user and access rules.
32 .It
33-Scan the configured media directory and build the media library.
34+Scan the configured media directory and build the media
35+library.
36 .It
37 Bind to the configured address and port.
38 .It
39 Accept and handle HTTP requests.
40 .El
41 .Pp
42-Each incoming connection is handled independently in its own thread.
43-The maximum number of concurrent clients is limited by the
44+Each incoming connection is handled independently in its own
45+thread.  The maximum number of concurrent clients is limited
46+by the
47 .Ic max_clients
48 configuration option.
49 .Pp
50@@ -69,18 +71,18 @@ The HTTP interface is documented in
51 Authentication is optional and configured through
52 .Xr parados.conf 5 .
53 .Pp
54-If no users are defined, all requests are served without authentication.
55-If one or more users are defined, HTTP Basic authentication is required
56-for all endpoints except
57+If no users are defined, all requests are served without
58+authentication.  If one or more users are defined, HTTP
59+Basic authentication is required for all endpoints except
60 .Pa /ping .
61 .Pp
62-Access to media files is restricted per user based on configured
63-allow-lists.
64+Access to media files is restricted per user based on
65+configured allow-lists.
66 .Sh LIBRARY MANAGEMENT
67 The media library is scanned at startup.
68 .Pp
69-If authentication is enabled, the library may be rescanned at runtime
70-by issuing a request to the
71+If authentication is enabled, the library may be rescanned
72+at runtime by issuing a request to the
73 .Pa /rescan
74 endpoint.
75 .Sh EXIT STATUS
+17, -14
 1@@ -12,12 +12,12 @@ protocol describes the HTTP interface provided by
 2 It is intended for simple clients and scripts.
 3 .Pp
 4 The protocol uses HTTP/1.1.
 5-Each request is handled on a separate connection, which is closed after
 6-the response.
 7-Persistent connections are not supported.
 8+Each request is handled on a separate connection, which is
 9+closed after the response. Persistent connections are not
10+supported.
11 .Pp
12-Media items are identified by 64-bit identifiers encoded as 16 hexadecimal
13-digits.
14+Media items are identified by 64-bit identifiers encoded as
15+16 hexadecimal digits.
16 .Sh REQUESTS
17 All endpoints accept
18 .Cm GET
19@@ -29,7 +29,8 @@ The server also accepts
20 for CORS preflight.
21 .Sh AUTHENTICATION
22 If one or more users are configured,
23-HTTP Basic authentication is required for all endpoints except
24+HTTP Basic authentication is required for all endpoints
25+except
26 .Pa /ping .
27 .Pp
28 Credentials are provided using the
29@@ -52,8 +53,9 @@ Response format:
30 .Ed
31 .It Pa /meta/{id}
32 Return metadata for a single item as JSON.
33-The response includes the item identifier, path, basename, size in bytes,
34-modification time (epoch seconds), MIME type, and kind.
35+The response includes the item identifier, path, basename,
36+size in bytes, modification time (epoch seconds), MIME type,
37+and kind.
38 .Pp
39 Response format:
40 .Bd -literal -offset indent
41@@ -72,7 +74,8 @@ Invalid ranges return HTTP 400 or HTTP 416.
42 Rescan the media directory and rebuild the library.
43 If authentication is disabled, the endpoint returns HTTP 403.
44 .Pp
45-During a rescan, requests that access the library may get block until the rescan completes.
46+During a rescan, requests that access the library may get
47+block until the rescan completes.
48 .El
49 .Sh RESPONSES
50 The server sets
51@@ -85,8 +88,8 @@ Responses include
52 .Cm Content-Length
53 and close the connection after each request.
54 .Pp
55-If a user is authenticated, items outside the configured allow-list are
56-treated as not found.
57+If a user is authenticated, items outside the configured
58+allow-list are treated as not found.
59 .Sh STATUS CODES
60 .Bl -tag -width Ds
61 .It Cm 200
62@@ -116,9 +119,9 @@ JSON responses include a
63 field indicating the protocol version.
64 Clients should reject unknown versions.
65 .Sh NOTES
66-The protocol does not provide sessions, persistent connections,
67-transcoding, or server-side state.
68-All higher-level behavior is handled by the client.
69+The protocol does not provide sessions, persistent
70+connections, transcoding, or server-side state. All
71+higher-level behavior is handled by the client.
72 .Sh SEE ALSO
73 .Xr parados 1 ,
74 .Xr parados.conf 5
+34, -30
  1@@ -10,8 +10,8 @@ The
  2 file configures
  3 .Xr parados 1 .
  4 .Pp
  5-The file format is line-oriented.
  6-Each non-empty, non-comment line is a key/value pair int he form:
  7+The file format is line-oriented. Each non-empty,
  8+non-comment line is a key/value pair int he form:
  9 .Bd -literal -offset indent
 10 key=value
 11 .Ed
 12@@ -26,13 +26,14 @@ Unknown keys are ignored but logged.
 13 .It Pa /etc/parados.conf
 14 System-wide configuration file.
 15 .It Pa ./parados.conf
 16-Fallback configuration file in the current working directory.
 17+Fallback configuration file in the current working
 18+directory.
 19 .El
 20 .Sh PARAMETERS
 21 .Bl -tag -width Ds
 22 .It Ic media_dir
 23-Directory containing all media files.
 24-The library is built by recursively scanning this directory at startup.
 25+Directory containing all media files. The library is built
 26+by recursively scanning this directory at startup.
 27 .Pp
 28 Example:
 29 .Bd -literal -offset indent
 30@@ -42,9 +43,9 @@ media_dir=/path/to/media
 31 Address to bind the HTTP server to.
 32 Use
 33 .Cm 127.0.0.1
 34-to listen on the local host only.
 35-This is recommended if a web interface is being hosted on the same machine;
 36-exposing the server to the network may unnecessarily increase risk.
 37+to listen on the local host only. This is recommended if a
 38+web interface is being hosted on the same machine; exposing
 39+the server to the network may unnecessarily increase risk.
 40 Use
 41 .Cm 0.0.0.0
 42 to listen on all IPv4 interfaces.
 43@@ -77,30 +78,32 @@ Example:
 44 verbose_log=true
 45 .Ed
 46 .It Ic cors_origin
 47-Configure Cross-Origin Resource Sharing (CORS) for web clients.
 48+Configure Cross-Origin Resource Sharing (CORS) for web
 49+clients.
 50 .Pp
 51 If empty, no CORS headers are sent.
 52 If set to
 53 .Cm * ,
 54 all origins are allowed.
 55 Otherwise, the value is interpreted as a
 56-comma-separated list of allowed origins (clients that can interact
 57-over the web).
 58+comma-separated list of allowed origins (clients that can
 59+interact over the web).
 60 .Pp
 61 Example:
 62 .Bd -literal -offset indent
 63 cors_origin=http://127.0.0.1:8000
 64 .Ed
 65 .It Ic http_io_timeout
 66-Maximum number of seconds the server will block on a single socket
 67-read/write operation.
 68+Maximum number of seconds the server will block on a single
 69+socket read/write operation.
 70 .Pp
 71-This limits how long a client may stall for while sending a request or
 72-receiving a response.
 73-If the timeout is exceeded, the connection is closed.
 74+This limits how long a client may stall for while sending a
 75+request or receiving a response. If the timeout is exceeded,
 76+the connection is closed.
 77 .Pp
 78-This option is used to protect against stalled or misbehaving clients.
 79-It does not limit the total duration of a request or stream.
 80+This option is used to protect against stalled or
 81+misbehaving clients. It does not limit the total duration of
 82+a request or stream.
 83 .Pp
 84 Valid values are integers in the range 1 to 300.
 85 .Pp
 86@@ -122,7 +125,8 @@ max_clients=64
 87 .Ed
 88 .El
 89 .Sh AUTHENTICATION
 90-Authentication entries are specified using repeated groups of the keys
 91+Authentication entries are specified using repeated groups
 92+of the keys
 93 .Ic user ,
 94 .Ic pass ,
 95 and
 96@@ -132,14 +136,13 @@ If no
 97 .Ic user
 98 entries are present, authentication is disabled and all files are
 99 accessible.
100-If one or more users are present, HTTP Basic authentication is required
101-for all requests except
102+If one or more users are present, HTTP Basic authentication
103+is required for all requests except
104 .Pa /ping .
105 .Pp
106 Each
107 .Ic user
108-starts a new authentication entry.
109-The following
110+starts a new authentication entry. The following
111 .Ic pass
112 and
113 .Ic allow
114@@ -155,24 +158,25 @@ Example:
115 user=glenda
116 .Ed
117 .It Ic pass
118-Set the password for the most recently declared user.
119-If empty, the account is passwordless and accepts only an empty password.
120+Set the password for the most recently declared user. If
121+empty, the account is passwordless and accepts only an empty
122+password.
123 .Pp
124 Example:
125 .Bd -literal -offset indent
126 pass=secret
127 .Ed
128 .It Ic allow
129-Add an allowed path prefix for the most recently declared user.
130-Multiple
131+Add an allowed path prefix for the most recently declared
132+user. Multiple
133 .Ic allow
134 directives may be used.
135 .Pp
136 A value of
137 .Cm *
138-allows all paths.
139-Otherwise, the value must match the beginning of a file's relative path.
140-Directory boundaries are respected.
141+allows all paths. Otherwise, the value must match the
142+beginning of a file's relative path. Directory boundaries
143+are respected.
144 .Pp
145 Example:
146 .Bd -literal -offset indent