chrippa / python-librtmp

python-librtmp is a RTMP client library. It uses the implementation provided by librtmp via cffi.
BSD 2-Clause "Simplified" License
154 stars 33 forks source link

Connecting to RTMP thru Socks does not work #18

Closed notnola closed 9 years ago

notnola commented 9 years ago

I have a sucessfull connection, but when adding socks=ip:port to RTMP() it does not connect thru the proxy.

ghost commented 9 years ago

Make sure the proxy is Socks4. Socks5 and HTTP proxies will not work.

notnola commented 9 years ago

yeah, it is socks4.

ghost commented 9 years ago

Do you get any errors?

notnola commented 9 years ago

No, no errors. Just no connection thru the proxy.

ghost commented 9 years ago

What OS and proxy provider (Tor?)?

notnola commented 9 years ago

Windows 7, and no - I had a friend set up a socks4 proxy server for me on his dedi.

ghost commented 9 years ago

Can you try another application, like XChat using the Socks4 server, just to make sure the problem is relevant to librtmp and not the Socks4 server itself?

notnola commented 9 years ago

I can confirm using the proxy in FireFox that the proxy server works.

_self.connection = librtmp.RTMP(self.url, socks=self.proxy, tcurl=self.tcurl, app=self.app, pageurl=self.pageurl, swfurl=self.swfurl, flashver=self.flashver, connect_data=connectdata)

this is the code I am using. I kno this is very simple stuff, but after trying and trying, i figured the problem must lie in python-librtmp

notnola commented 9 years ago

@chrippa - any word on this issue?

chrippa commented 9 years ago

Apparently librtmp needs to have the socks option set before RTMP_SetupURL is called rather than before connect as I had assumed.