xteve-project / xTeVe

M3U Proxy for Plex DVR and Emby Live TV
MIT License
1.72k stars 227 forks source link

Add socks proxy support for m3u grabs #238

Open Diniboy1123 opened 3 years ago

Diniboy1123 commented 3 years ago

Is your feature request related to a problem? Please describe. I am hosting my Plex content and xteve on a dedicated server which obviously has a business network and a non residential IP address. Unfortunately my IPTV provider has all of these blocked. They only allow residential IPs to both access their m3u lists and also to start streaming. Therefore I set up a socks proxy at home I could use with xteve. I have confirmed using curl that it indeed works. But I couldn't find a way within xteve to set up proxies.

Describe the solution you'd like I would like to have an option to specify socks proxies within the settings.

Describe alternatives you've considered I have considered using proxychains which can replace syscalls so they will go thru over the proxy. But that's a hacky solution and not even sure if it would work since go binaries not necessarily link to libc.

Additional context -

Diniboy1123 commented 3 years ago

Yeah, just confirmed. Since xteve is not even using the system libc, but it is a static binary, it doesn't even respect the proxychain syscall overwrites. So it could only be possible with a built in support for proxies.

[user@luna xteve]$ file ./xteve
./xteve: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, Go BuildID=az6Ob2APO9do645wF-oW/n0eQy-6U5R2mrYdn-bWU/wiXrjBPMYCayL7pAH4pB/ULQTcxIEdp33M8Qk3usE, stripped
[user@luna xteve]$ ldd ./xteve
        not a dynamic executable
mar-mei commented 3 years ago

xTeVe is written in Go and uses the standard Go frameworks for communication with the OS and the network. For your use case, an SSH or VPN tunnel might also be a solution.

Diniboy1123 commented 3 years ago

I assume so, but I would assume adding proxy support as a config option within xteve itself would make sense as many would probably find this option useful. Running an ssh tunnel wouldn't be beneficial in my case as that won't replace routing to my home network and running a VPN would probably work, but would involve the need of extra routing plus encryption. While a socks proxy can do all that straight away and many applications implement it anyway as a possibility to define.

gregor-hh commented 2 years ago

I also would love to have socks proxy support directly integrated in xTeVe. And if possible to set it per provider (playlist) seperately. Maybe this would help to implementate -> https://github.com/extremecoders-re/go-dispatch-proxy ?