You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#Connect out to a specific server, instead of waiting to be found
58
+
sendspin-cli -n living-room -s music.local
59
59
```
60
60
61
61
| Option | What it does |
62
62
|---|---|
63
63
|`-n, --name <name>`| The friendly name a server displays. Defaults to this host's name. |
64
64
|`-o, --output <device>`| Which sound card to play through. `-l` lists this host's devices and what they accept. |
65
65
|`--audio-format <codec:rate:depth:channels>[,...]`| Formats to offer first, in priority order, e.g. `flac:48000:24:2,pcm:48000:24:2`. Everything else the player normally offers still follows, and a server uses the first format it can encode, so it can still fall back to a later one. This sets a preference, not a restriction. |
66
-
|`-s, --server mdns:[<name>]`|Discover a server over mDNS and connect to it, rather than waiting to be discovered. `mdns:` takes any server. Turns off the mDNS advertisement. |
66
+
|`-s, --server <host[:port]>`|Connect out to a server rather than waiting to be discovered, or `mdns:[<name>]` to discover one over mDNS. Turns off the mDNS advertisement. |
67
67
68
68
Any of these can go in a config file instead of on the command line — see
Copy file name to clipboardExpand all lines: docs/wiki/Configuration.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@ already does that.
52
52
|`id`|`--id`| the stable client id a server files this player's settings under — two players on one host must not share it | derived from the interface MAC |
53
53
|`manufacturer`|`--manufacturer`| the manufacturer `client/hello` reports |`sendspin-cpp-cli`|
54
54
|`product-name`|`--product-name`| the product name `client/hello` reports |`sendspin-cli`|
55
-
|`server`|`-s`, `--server`|`mdns:` to discover any server, or `mdns:<name>` for the one advertised under that name| none — wait to be discovered |
55
+
|`server`|`-s`, `--server`|`<host>[:<port>]`, a `ws://` URL, or `mdns:[<name>]`| none — wait to be discovered |
56
56
|`port`|`--port`| the port this player's own WebSocket server listens on |`8928`|
57
57
|`buffer-ms`|`--buffer-ms`| audio the output backend keeps queued, 10–2000 |`100`|
58
58
|`audio-format`|`--audio-format`| preferred formats, comma-separated in priority order: `codec:rate:depth:channels[,...]`, e.g. `flac:48000:24:2,pcm:48000:24:2`; offered first in that order, with the rest of the advertised list still behind them, so a server that cannot encode them falls back — a preference, not a restriction; refuses to start if the advertised list does not carry every one — it carries a single channel count — and an `opus` entry at anything but 48000/16 and at most 2 channels is refused outright | none — device-derived order |
@@ -77,6 +77,21 @@ Booleans take `true`/`yes`/`on`/`1` or `false`/`no`/`off`/`0`. A line whose firs
77
77
character is `#` is a comment; a `#` anywhere else is not, so a name or a path is free to
78
78
contain one. Where a key appears twice, the last one wins.
79
79
80
+
**A `server` URL that carries userinfo belongs here rather than on the command line — and it
81
+
does not authenticate anything.**`ws://user:token@host:8927/sendspin` is accepted, and the
82
+
`user:token` is dropped before the handshake: Sendspin authenticates in the handshake, not in
83
+
the URL, so nothing turns userinfo into an `Authorization` header. If a proxy in front of
84
+
your server wants HTTP Basic, this is not the way to give it to it — and the player accepting
85
+
a credential it cannot send is a wrong it owes a fix, not a feature to configure around.
86
+
87
+
Where it still matters is what gets written down. A URL typed at `-s` is in the process's
88
+
`argv`, which `ps` shows to **every** local user for as long as the player runs; in this file
89
+
it is protected by the file's own permissions, so `chmod 0600` and an owner is the whole of
90
+
the fix. The player also masks userinfo out of every line *it* writes — `Connecting to
91
+
ws://user:***@host:8927/sendspin` — but every line tagged `sendspin.*` is the library's own
92
+
and prints the URL in full, at the default log level. Treat the log of a `-s` run with
93
+
userinfo in it as sensitive either way.
94
+
80
95
**Five things cannot come from a file**: `-l`, `-z`, `--config`, `--help` and `--version`.
81
96
Run shape stays on the command line, and a config naming one is refused as an unknown key.
82
97
Excluding them is reversible; debugging a `daemonize` that came out of a file under systemd
0 commit comments