joolswills / plugin.video.iplayer

This plugin is broken.
10 stars 4 forks source link

request to support authenticated proxies #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It's great to see core proxy support being added, but I need to authenticate to 
use the proxy I'm behind. I've tried setting user:pass@sub.domain.tld in the 
proxy/IP field as that's a common format, but with that set I don't even see 
connections being attempted (and denied) in the proxy logs. If I remove the 
user:pass@ I can see connections being made. Thx.

Original issue reported on code.google.com by christia...@gmail.com on 22 Feb 2011 at 5:09

GoogleCodeExporter commented 9 years ago
Yeh i didnt think about authenticated proxies. idd add authentication and 
perhaps you can test it out for me.

Original comment by exob...@gmail.com on 24 Feb 2011 at 1:21

GoogleCodeExporter commented 9 years ago
sure, happy to test anything you come up with, just drop me a note

Original comment by christia...@gmail.com on 24 Feb 2011 at 3:37

GoogleCodeExporter commented 9 years ago
please could you try this out
http://malus.exotica.org.uk/~buzz/xbmcdev/2011-02/plugin.video.iplayer.zip

Original comment by exob...@gmail.com on 26 Feb 2011 at 7:17

GoogleCodeExporter commented 9 years ago
Just to add, it may not work as it only supports user/pass via socks5 (not sure 
if your proxy is just an http proxy with http authentication for example) and 
there are other issues. Ive just seen there is a fork of the proxy code that 
has some stuff fixed in it so I will also try that out. If your proxy is a 
service you pay for, and they support trial accounts, I could test it out to 
help me debug it further.

Original comment by exob...@gmail.com on 26 Feb 2011 at 7:22

GoogleCodeExporter commented 9 years ago
Please post any error. most likely i expect to see a 401 error from the proxy - 
Im currently looking at adding http auth to the sockipy code.

Original comment by exob...@gmail.com on 26 Feb 2011 at 7:30

GoogleCodeExporter commented 9 years ago
I took some patches for the proxy code, plus added http authentication too. I 
tested it against a local apache http proxy that didnt support tunnelling and 
it worked well.

same download location

http://malus.exotica.org.uk/~buzz/xbmcdev/2011-02/plugin.video.iplayer.zip

Original comment by exob...@gmail.com on 26 Feb 2011 at 10:26

GoogleCodeExporter commented 9 years ago
downloaded (link in #6), installed, configured ..and watching Top Gear in 720p 
:o)  ..All appears to be fine and Squid proxy logs just show normal access. I 
did notice that the proxy password is shown within the config tool - it would 
be good to mask it with *** for security. I'll do some more testing over the 
day and post findings..

Original comment by christia...@gmail.com on 27 Feb 2011 at 4:52

GoogleCodeExporter commented 9 years ago
Glad it is working for you. The user/password is already masked in current svn 
but thanks for the heads up :) you might want to grab the latest code from svn 
since there have been some more changes

Original comment by exob...@gmail.com on 27 Feb 2011 at 6:01

GoogleCodeExporter commented 9 years ago
having enjoyed Top Gear, last nights Rugby doesn't stream. What logs are you 
interested in to look at issues?

Original comment by christia...@gmail.com on 27 Feb 2011 at 6:17

GoogleCodeExporter commented 9 years ago
only the England v France match won't stream.. no issue with Italy v Wales

Original comment by christia...@gmail.com on 27 Feb 2011 at 6:48

GoogleCodeExporter commented 9 years ago
logs from any failed playbacks. please note to redownload the plugin from the 
link above as it has been updated.

Original comment by exob...@gmail.com on 27 Feb 2011 at 7:12

GoogleCodeExporter commented 9 years ago
I've got an RSS feed of commits that I'm keeping an eye on, this is with rev 85:

http://pastebin.com/0TKjPLNX <= cricket highlights that won't stream
http://pastebin.com/hnN46WSA <= rugby (england v france)

Live streams don't work, although I'd kind of expect that as I'm not in the UK 
at the moment so I'd need to proxy port 1935 in addition to port 80 to bypass 
the additional geolocation check (at the CDN) for live streams.

Original comment by christia...@gmail.com on 27 Feb 2011 at 7:27

GoogleCodeExporter commented 9 years ago
NB: xbmc log shows a masked proxy password, but it's still in cleartext within 
the configuration screens. Once it's been inputted it should be masked there as 
well.

Original comment by christia...@gmail.com on 27 Feb 2011 at 7:35

GoogleCodeExporter commented 9 years ago
rev86 appears to have fixed the rugby :o)

Original comment by christia...@gmail.com on 27 Feb 2011 at 7:50

GoogleCodeExporter commented 9 years ago
I also need debugging turned on in xbmc - so I can see more details about the 
rtmp stream, but it looks as though in the first log it timed out. you could 
try forcing to a different provider in the settings. BTW I wouldnt recommend 
rtmpt unless you really cant connect out on port 1935. none of the stream data 
gets proxied btw - only the http handshake/rss etc

password is hidden in settings now.

Original comment by exob...@gmail.com on 27 Feb 2011 at 7:51

GoogleCodeExporter commented 9 years ago
sorry scrap my comment about timed out - i wrote that and meant to delete it. i 
cant actually see the error without debug logging. but it is worth trying 
without rtmpt and seeing if you do better forcing limelight or akamai. 

Original comment by exob...@gmail.com on 27 Feb 2011 at 7:52

GoogleCodeExporter commented 9 years ago
it isnt really possible that rev86 would fix that. its more likely just a 
networking issue. I noticed some streams were not that great this morning. for 
example it may choose akamai one time and limelight the next, so it could vary.

Original comment by exob...@gmail.com on 27 Feb 2011 at 8:07

GoogleCodeExporter commented 9 years ago
http://pastebin.com/c90xNcxt <= BBC1 failing to stream live (with debug on)
http://pastebin.com/1hfV5Qtt <= same, but BBC2

With previous experiments with live streaming in a browser and with the 
get_iplayer script I needed to force 1935 through the proxy as well - or run 
everything down a VPN tunnel to get live working. 

http://pastebin.com/f6D4b3pD <= madagascar HD show, plays fine but then drops 
after a few minutes, it's dropped a few times as well.

before rev86 every attempt to play the rugby stream failed silently while 
others worked. after that update it worked first time and has since. possibly 
unrelated but who knows! :o)

Original comment by christia...@gmail.com on 27 Feb 2011 at 8:10

GoogleCodeExporter commented 9 years ago
I think I was on rtmpt80, switching back to 1935 means the madagascar show is 
okay now

Any chance of adding an option to also proxy 1935 for live streams?

Original comment by christia...@gmail.com on 27 Feb 2011 at 8:28

GoogleCodeExporter commented 9 years ago
it it not possible to proxy rtmp only rtmpt neither of which is supported by 
the rtmp library. the plugin only ever proxies http handshake and not the 
actual data streams. so if for example any data streams are geolocked, the only 
way now is a vpn.

Original comment by exob...@gmail.com on 27 Feb 2011 at 10:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
also if you can connect out on port 1935, there is no reason to use rtmpt - 
that is only there for people behind firewalls that can't - it just doesnt work 
as well as rtmp on port 1935. It has no relation to the proxy code.

I'm going to release a new version today, as others have also had success with 
this new code.

Original comment by exob...@gmail.com on 27 Feb 2011 at 2:49

GoogleCodeExporter commented 9 years ago
I think there's a caching issue that's also related to my ability to stream 
things. This morning I've gone to watch the England v Italy game from Saturday. 
This played fine when I was testing things yesterday, but it repeatedly refused 
to play this morning until I wiped out the contents of the plugin cache folder 
- it then plays instantly.

Original comment by christia...@gmail.com on 28 Feb 2011 at 3:11

GoogleCodeExporter commented 9 years ago
xbmc updated itself to the 2.4.5 release and this stopped working ..did you 
change something?

proxy logs are showing 403 errors, it's like the plugin stopped using 
authentication

Original comment by christia...@gmail.com on 4 Mar 2011 at 12:52

GoogleCodeExporter commented 9 years ago
I changed some stuff but nothing that should stop the proxy working. did you 
confirm all settings were correct after the upgrade?

Original comment by exob...@gmail.com on 4 Mar 2011 at 2:58

GoogleCodeExporter commented 9 years ago
can you check the svn version also ?

Original comment by exob...@gmail.com on 4 Mar 2011 at 3:00

GoogleCodeExporter commented 9 years ago
If no luck, then please could you test checking out older revisions and trying 
them

svn co -r89 https://xbmc-iplayerv2.googlecode.com/svn/trunk/plugin.video.iplayer

then r88 etc until it works ? i appreciate the help :)

Original comment by exob...@gmail.com on 4 Mar 2011 at 4:09

GoogleCodeExporter commented 9 years ago
I've removed the plugin from within xbmc, then reinstalled. I've also tried 
manually overwriting the content of the plugin with the latest files (v89) from 
SVN. In both cases XBMC shows a network error and the proxy logs show a denied 
message. I've also notices that the plugin configuration GUI is missing text 
labels for proxy username and password, although the data entry fields are 
still there and values can be set.

I'm working backwards in SVN now..

Original comment by christia...@gmail.com on 4 Mar 2011 at 4:14

GoogleCodeExporter commented 9 years ago
Maybe something happened with your settings. its worth perhaps cleaning out the 
ilpayer stuff in userdata also.

Original comment by exob...@gmail.com on 4 Mar 2011 at 5:14

GoogleCodeExporter commented 9 years ago
i think I know what it is. I just checked on hitcher's repo and he has an old 
file in there that should be removed - it's probably the cause. check if you 
have a socksipy folder in the lib/ folder in the plugin. if so, delete it and 
see if it works then.

Original comment by exob...@gmail.com on 4 Mar 2011 at 5:19

GoogleCodeExporter commented 9 years ago
not only that, he misses updates to the socks stuff in the httplib so no proxy 
support at all there. I'll let him know.

Original comment by exob...@gmail.com on 4 Mar 2011 at 5:22

GoogleCodeExporter commented 9 years ago
see http://forum.xbmc.org/showpost.php?p=742217&postcount=1362

Original comment by exob...@gmail.com on 4 Mar 2011 at 5:31

GoogleCodeExporter commented 9 years ago
I wiped the plugin from xbmc then re-installed from a zip file created from SVN 
v90. Once I'd reconfigured to use the proxy it worked, but immediately after 
watching one streamed show the plugin (tagged as 2.4.2) self-updated to 2.4.5 
and broke itself. I'll wait until the repo is sorted and a clean update is 
available.. thx.

Original comment by christia...@gmail.com on 5 Mar 2011 at 6:36

GoogleCodeExporter commented 9 years ago
r90 is 2.4.6 so it shouldnt upgrade to a lower version.

Original comment by exob...@gmail.com on 5 Mar 2011 at 2:23

GoogleCodeExporter commented 9 years ago
This is possibly me being a noob ..I've discovered that I have 
plugin.video.iplayer stuff in ~/.xbmc/addons/ as well as what appears to be a 
replica of that + settings.xml in ~/.xbmc/userdata - I've been overwriting the 
content in /userdata with svn builds but I think the system has been using some 
kind of mix of that and what's in /addons which was still at v2.4.2. It's 
definitely running svn 90 now, tagged as 2.4.6 and all appears to be okay.. 
apologies for confusion. 

NB: many other plugins appear to store only settings.xml data in /userdata - is 
there a reason the entire iplayer plugin content is replicated to that folder?

Final pedant question :o) ..is there a reason why the plugin refers to itself 
using IPlayer instead of iPlayer?

Original comment by christia...@gmail.com on 5 Mar 2011 at 4:40

GoogleCodeExporter commented 9 years ago
The addon lives in addons. the userdata is where the addon stores its settings. 
it doesnt replicate its content to that area, so I dont know how you got it 
there :)

Original comment by exob...@gmail.com on 5 Mar 2011 at 7:19

GoogleCodeExporter commented 9 years ago
The naming is historical. Another user also mentioned it. If i hadn't added the 
proxy support, I could have done the rename perhaps instead :) I'll probably 
change it for the next release.

Original comment by exob...@gmail.com on 5 Mar 2011 at 7:22

GoogleCodeExporter commented 9 years ago
I'll try to do some testing tomorrow, removing the plugin and then seeing at 
what point the replication of the plugin content from /addons to /userdate 
appears to take place. It's happened after a proper clean install from zip file 
earlier so it's definitely not me doing it to confuse myself.

Original comment by christia...@gmail.com on 5 Mar 2011 at 8:31

GoogleCodeExporter commented 9 years ago
Marking fixed.

Original comment by exob...@gmail.com on 11 Mar 2011 at 5:03