![]() ![]()
|
Hi,
Is it possible to get audio streams routed through a proxy server in amarok. I am behind a squid proxy server and thus is the only way can get streams. Thanks |
![]() KDE Developer ![]()
|
It is possible when you switch off "Display shoutcast metadata". Reason is, our "TitleProxy" (which is also a http proxy really, responsible for extracting the stream metadata) does not currently support http proxies. Please see this bug report:
http://bugs.kde.org/show_bug.cgi?id=75389 I would like to fix this problem, but don't know how to do it, and also can't test/reproduce, since I don't use a http proxy.
--
Mark Kretschmann - Amarok Developer |
![]() ![]()
|
problem is: when there is a proxy set for kde, arts tries to connect to this proxy, which then tries to connect to our titleproxy. this must fail of course, since the real http proxy wont be able to find our titleproxy at 127.0.0.1.
finding a solution might be really hard. we need to force arts to explicitly _not_ connect to the http proxy, so we can do a manual proxying with our titleproxy. lots of "proxies" in here ![]() ...muesli |
![]() ![]()
|
it is possible to recreate in any computer, just install a squid or any other proxy server you like on your pc connected to the lan, make sure it\'s working; and then configure any http client to connect to http://localhost:3128 (3128 is squid\'s default port), you may even add a socks5 proxy server and connect to that at http://localhost:1080
you may even configure your server to give service to certain IP addresses, this way one of you with a big pipe may have the server set up and some friends can use the server over the internet. btw i am here because I can\'t use amarok through my proxies, and I do use both squid and socks5. so, how can I get to the \"display shoutcast metadata\" option? ![]() |
![]() KDE Developer ![]()
|
carlos wrote:
Carlos, the comment you are referring to is old, providing outdated information. I.e. switching this option is useless. amaroK does not currently support proxy servers, but I would like to add support for them. As I\'m not using a proxy myself, I\'m missing information on what needs to be done. Any technical advice is welcome.
--
Mark Kretschmann - Amarok Developer |
![]() ![]()
|
This is not realy complicate, instead of connecting directly to the stream,
you just have to connect to the proxy with the real url as argument. Using a socks-proxy (without authentication) is almost the same. I\'ve somewhere some code where I\'ve done this for vnc, have to look... |
![]() ![]()
|
Haven\'t had the time to search my socks code, but for http-proxying (squid) just have a look at RFC 2616 section 9.9 CONNECT. This is what is normally used for such things.
|
![]() ![]()
|
I\'ve found my sources. But I haven\'t used CONNECT there, but GET. I think this was because I\'ve used that to fetch a static html page.
Here is what I\'ve used: sprintf(str, \"GET http://%s%s HTTP/1.0\\r\\nHost: %s\\r\\nProxy-Connection: Keep-Alive\\r\\nPragma: no-cache\\r\\nUser-Agent: Amarok\\r\\nAccept: */*\\r\\nContent-type: application/x-www-form-urlencoded\\r\\nContent-length: 0\\r\\n\\r\\n\",host, url, host); Maybe the Content-type has to be changed. If you could give me a pointer where I have to modify the request amarok uses (I\'m silly and doesn\'t want to search through the sources), I could test it changing the normal request to a static request to my proxy. ![]() |
![]() ![]()
|
hmm, the backslashes are gone. rn means slash r slash n
|
![]() KDE Developer ![]()
|
FYI, I tried to reply to your mail, but my mail bounced.
--
Mark Kretschmann - Amarok Developer |
![]() ![]()
|
Ok, it doesn\'t seem that easy. Here are my findings if anyone wants to fix that:
Amarok (using the arts-engine) functions itself as a proxy. What\'s happening when a proxy is defined in KDE is this: Amarok instructs arts (or noatun, I don\'t know about the internals) to get the stream from 127.0.0.1 (localhost). Now, if a proxy is defined in KDE, arts/noatun tries to get the stream from the proxy using 127.0.0.1 as url. But for the proxy this is the proxy-host itself, so the proxy tries to get the stream from it\'s own host where he normally can\'t find the stream. The Solution would be to instruct arts/noatun (by api) to skip the proxy, but I don\'t know how and if that is possible. |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]