open-tv icon indicating copy to clipboard operation
open-tv copied to clipboard

Feature Request - Specify interface

Open jeffsmith82 opened this issue 3 months ago • 1 comments

Its not uncommon to have to use a VPN when using this app so would it be possible to be able to add a menu that lets you pick which interface you want to use. QBitorrent is often recommended to people as it has this exact feature so you can tell your client to only ever use a specific interface so you never leak your IP address.

https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.interface I can see your using reqwest to make http requests in places. You can use a builder and specify the interface to use. Maybe an setting that lets you type the interface you want or something smarter like a drop down list would be nice.

There does not currently seem to be a way to ask mpv to use a specific interface (Please correct me if I'm wrong) but I was also going to ask there if they could add something like --interface that curl has https://everything.curl.dev/usingcurl/connections/interface.html so we could append to command line if set and force video streams to use the same interface.

Having a play with this and interface() appears to work perfectly on Linux which is what I'm running at home but it's not cross platform so if you are running on windows it's best to lookup the IP address on the interface and then use https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.local_address

jeffsmith82 avatar Sep 14 '25 07:09 jeffsmith82

Asked chatgpt if mpv supports this feature and it hallucinated a command line option that does not exist called --network-bind-address

mpv --network-bind-address=192.168.1.50 http://example.com/stream.m3u8

After a bit of prodding it does appear you can pass through a local address for ffmpeg to bind to when connecting to a remote stream.

mpv "udp://@239.0.0.1:1234?localaddr=192.168.1.50"

yt-dlp also seems to have --source-address so should be able to force all traffic through a specific interface.

jeffsmith82 avatar Sep 14 '25 08:09 jeffsmith82