Update README with instructions on how to setup a secure remote connection to your mpv instance#5
Update README with instructions on how to setup a secure remote connection to your mpv instance#5varenc wants to merge 8 commits intooxan:masterfrom
Conversation
|
also my example script might be overly complicated with all the variables and the use of #!/bin/bash
socat TCP-LISTEN:2352,reuseaddr,fork UNIX-CONNECT:/path/to/mpv-socket & # <-- run socat in the background
ssh -N -R 2352:localhost:2352 [email protected]This does the same thing without all the extra setup, just hardcoded paths. Might be easier for folks to understand at a glance. |
|
just updated the PR in line with this! |
…uld have negated this entire approach
|
had to add back a check for duplicate instances of the script. seems that Sorry the script got so complicated but don't think I can avoid it. Classic usability vs security challenges. Also this made me realize that your prior example probably causes a new background instance of |
The current guidance in the README for setting up a remote connection is insecure. mpv supports a
runinput command that allows executing arbitrary commands, meaning anyone with access to the exposed port could runecho "run <any_command>" | nc <your_ip> 2352to execute commands on your system.For a trusted local network that's not a huge deal... but unless your security stance trusts everything on your LAN and you never leave it, it still doesn't make sense. If you had it running on a laptop while connected to some public WiFi networks, your computer would could be easily pwn'd by anyone. (fortunately this is obscure enough that most people aren't looking for it)
This update provides guidance on how to achieve the same remote connection securely using
socatwith SSH port forwarding. I've implemented this solution myself and can confirm it works great!btw, thank you so much for making this project. I love mpv, and I love home assistant, and now I get to combine my interests!