brysonreece / Stream

Torrent streaming for XBMC
GNU General Public License v3.0
79 stars 17 forks source link

Socks5 Problem #23

Open janiedjs opened 10 years ago

janiedjs commented 10 years ago

Stream won't play if I add Socks5 proxy. I get Error: Script Failed!:addon.py. If I remove the Socks5 proxy it works. But then I am defeating the purpose of the proxy. Here is my log.

http://xbmclogs.com/show.php?id=248840

PhatPuff commented 10 years ago

-----Oprindelig besked----- Fra: Jane Sendt: 18-07-2014, 07:14 Til: brysonreece/Stream Emne: [Stream] Socks5 Problem (#23)

Stream won't play if I add Socks5 proxy. I get Error: Script Failed!:addon.py. If I remove the Socks5 proxy it works. But then I am defeating the purpose of the proxy. Here is my log.

http://xbmclogs.com/show.php?id=248840


Reply to this email directly or view it on GitHub: https://github.com/brysonreece/Stream/issues/23

PhatPuff commented 10 years ago

P -----Oprindelig besked----- Fra: Jane Sendt: 18-07-2014, 07:14 Til: brysonreece/Stream Emne: [Stream] Socks5 Problem (#23)

Stream won't play if I add Socks5 proxy. I get Error: Script Failed!:addon.py. If I remove the Socks5 proxy it works. But then I am defeating the purpose of the proxy. Here is my log.

http://xbmclogs.com/show.php?id=248840


Reply to this email directly or view it on GitHub: https://github.com/brysonreece/Stream/issues/23

janiedjs commented 10 years ago

The proxy people say I need to be able to input a username and password.

Jane

brysonreece commented 10 years ago

If your SOCKS5 proxy requires authentication, try downloading 1.4.6-RC3 and input your username and password combination in the addon settings.

Thanks!

janiedjs commented 10 years ago

I downloaded 1.4.6-RC3 and installed it. Put in my username and password. Still gives me the script error: addon.py

The zip file on my thumb drive says 1.4.6-RC3 but the version in xbmc says RC2.
Disable the proxy and it works fine. Enable and it stops working.

Thanks

janiedjs commented 10 years ago

Any more ideas on my Socks5 problem?

brysonreece commented 10 years ago

Haven't had much time to look at it. I'll get to it as soon as I can and see if I can work out a remedy.

Thanks!

janiedjs commented 10 years ago

Thanks.

agoffard commented 10 years ago

up.

Same issue here.

Thanks.

gedl commented 10 years ago

Same happens to me.

After disabling (commenting out the relevant lines on ga.py) the log is the following: https://gist.github.com/gedl/fe1d676370d07205536a

gedl commented 10 years ago

Any progress on this one ?

janiedjs commented 9 years ago

Anything fixes?

gedl commented 9 years ago

I don't think so.

bmanturner commented 9 years ago

Alright, I just plowed through my night trying to get this sorted out.

Bottomline: I fixed it. Will clean up my work and commit changes tomorrow. Poke me if I forget.

janiedjs commented 9 years ago

Is this a poke?

janiedjs commented 9 years ago

brendanfturner, any fix yet?

bmanturner commented 9 years ago

I'm sorry I missed the first poke. Turns out I was mistaken... The entire plugin is supposed to be wrapped up so that all traffic in and out goes through the proxy. My failed workaround involved allowing the scrapers to access the the web sans the proxy while keeping the actual streaming routed through the proxy.

I don't understand the modifications made to "socks.py" and I do not have a clear enough understanding of "torrent2http". Here was my attempt, for any who were curious:

#torrent2http.py
def find_free_port():
    import socket
    from stream import socks
    s = socks.socksocket()
    s.setproxy(socks.PROXY_TYPE_SOCKS5, "PROXYADDRESSHERE", "PORTNUMBERHERE", "USERNAME", "PASSWORD")
    s.bind(('',0))
    port = s.getsockname()[1]
    s.close()
    return port

Video plays like this, but it's not being routed through a proxy whatsoever because the returned port is appended to "localhost:" (in 'start()' found in torrent2http.py). I wish it were as simple as replacing localhost with a proxy url, but it isn't.

I honestly am not positive it's possible to use SOCKS without modifying the source of the torrent2http module this addon relies on. I personally am using a VPN now and have had no complaints since.