mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-15 15:33:47 +00:00
update server instructions
This commit is contained in:
parent
7dcf6e7399
commit
36749d22b1
1 changed files with 19 additions and 3 deletions
22
README.md
22
README.md
|
|
@ -1,11 +1,24 @@
|
|||
Creating a PKCS#12 certificate file using OpenSSL:
|
||||
# mrc
|
||||
|
||||
[mpv video player]: https://mpv.io/
|
||||
|
||||
Fast, robust and experimental JSON IPC wrapper for the [mpv video player]; comes
|
||||
with a wrapper library, a CLI and a server for remote control.
|
||||
|
||||
## Hacking
|
||||
|
||||
mrc does not handle TLS certificates for you. To run the remote control server,
|
||||
you must create your own PKCS#12 certificates using OpenSSL.
|
||||
|
||||
```bash
|
||||
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
|
||||
openssl pkcs12 -export -out identity.pfx -inkey key.pem -in cert.pem
|
||||
```
|
||||
|
||||
Before running the server:
|
||||
mrc then read the `TLS_PFX_PATH` and `TLS_PASSWORD` environment variables to
|
||||
load them. You should also set `AUTH_TOKEN` for making authenticated requests to
|
||||
the server remotely. Running without an auth token is "supported", but the
|
||||
server will not fully function.
|
||||
|
||||
```bash
|
||||
export TLS_PFX_PATH=/path/to/identity.pfx
|
||||
|
|
@ -13,4 +26,7 @@ export TLS_PASSWORD="your_identity_passphrase"
|
|||
export AUTH_TOKEN="your_auth_token"
|
||||
```
|
||||
|
||||
How you handle environment is up to you, Systemd makes it somewhat easy.
|
||||
Then start the server with `cargo run --bin=server`.
|
||||
|
||||
How you handle environment is up to you, Systemd makes it somewhat easy if
|
||||
running mrc as a service.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue