PDA

View Full Version : Android Squeezeplayer over SSH?



strindberg
2011-05-12, 00:48
Has anyone tried running Squeezeplayer on an Android over an SSH tunnel (over 3G)? I would love to be able to connect remotely to my server, but I am reluctant to do so without proper security configured.

Has anyone tried this with SSH or VPN? Would it work?

bluegaspode
2011-05-12, 02:42
Has anyone tried running Squeezeplayer on an Android over an SSH tunnel (over 3G)? I would love to be able to connect remotely to my server, but I am reluctant to do so without proper security configured.

Has anyone tried this with SSH or VPN? Would it work?

Hi strindberg,

Together with another user I tried with SSH tunneling using 'irrsi connectbot'. This tool allows to configure port forwarding via SSH and is really easy to setup (when one has a Linux server with an already open SSH port).

Unfortunately there seems to be a bug down the network route/tunnel: The connection to the download Stream (stream.mp3) never ends (at least from the perspective of SqueezePlayer), so SqueezePlayer doesn't know when to start downloading the next song.
So with this solution one needs to skip song by song :(
We tried to analyze network logs, but didn't come to a conclusion yet.

I didn't look yet if there are other SSH clients available that create a better working tunnel.

OpenVPN should work too of course, didn't have time to test this yet, but would be interested of course if someone else has set this up already.

jt25741
2011-05-12, 23:05
Hi strindberg,

Together with another user I tried with SSH tunneling using 'irrsi connectbot'. This tool allows to configure port forwarding via SSH and is really easy to setup (when one has a Linux server with an already open SSH port).

Unfortunately there seems to be a bug down the network route/tunnel: The connection to the download Stream (stream.mp3) never ends (at least from the perspective of SqueezePlayer), so SqueezePlayer doesn't know when to start downloading the next song.
So with this solution one needs to skip song by song :(
We tried to analyze network logs, but didn't come to a conclusion yet.

I didn't look yet if there are other SSH clients available that create a better working tunnel.

OpenVPN should work too of course, didn't have time to test this yet, but would be interested of course if someone else has set this up already.


I've had good success using Connectbot/Squeezebox server. First setup the port forwards, then I use AOnline Radio App... to setup a "radio station" to stream from localhost:9000/stream.mp3. The squeezebox server streams perfectly. I control my remote squeezebox using SqueezeControl app... again setting up 9090(CLI) and (9000) in the port forwards.

You can browse the library and play any song remotely. The only hitch is that Aonline does a good amount of local buffering (a good thing)... so there will be a lag when you change playlists until the buffer catches up.

Over 3G...be aware that when you receive a call on CDMA/Verizon..you lose data connection......a bummer......so the tunnel closes. This issue is gone over Wifi, of course -- where I tend to use it more. But I have used it for a long trip in the car....before I got a call to drop the tunnel (I am looking forward to LTE for this reason).

For me, when I disconnect....the stream.mp3 just pauses for that remote player.... it will resume upon reconnection....kinda nice.

bluegaspode
2011-05-13, 00:27
I've had good success using Connectbot/Squeezebox server. First setup the port forwards, then I use AOnline Radio App... to setup a "radio station" to stream from localhost:9000/stream.mp3. The squeezebox server streams perfectly.
Yep - streaming and remote controlling is absolutely no problem with connectbot. And with an endless streaming Radio Station one won't even recognize any problems that happen when using multiple tracks.

When you use stream.mp3 directly one has to manually skip/reload the stream.mp3 for the next song of the playlist to play anyway - with SqueezePlayer this is not needed (also the buffering problems don't exist here) under normal circumstances.

As said: the only issue I had with SqueezePlayer via SSH tunnel was, that when one has multiple tracks in the playlist, due to problems of the tunnel SqueezePlayer won't recognize automatically when a track is finished - so won't skip automatically to the next one like it normally does. At least with SqueezePlayer you won't have the buffering problems that you have when using stream.mp3 directly, so skipping songs/changing playlists is instant.

jt25741
2011-05-13, 07:06
When you use stream.mp3 directly one has to manually skip/reload the stream.mp3 for the next song of the playlist to play anyway - with SqueezePlayer this is not needed (also the buffering problems don't exist here) under normal circumstances.



I have not needed to do this when using Aonline. Just changing the playlist from the app changes the stream.mp3 -- no issues -- and the next song always plays normally. The other value of using stream.mp3 is that all my FLAC files are transcoded to mp3....which is great. I have not tried squeezeplay so I may have the same issues you describe with it.

The buffering is a big plus...especially over 3g where network performance can be variable.

bluegaspode
2011-05-13, 07:10
The buffering is a big plus...especially over 3g where network performance can be variable.
SqueezePlayer buffers as well ;), so no problems via 3G. It just throws away the buffer, when you switch tracks ...

jt25741
2011-05-13, 07:14
SqueezePlayer buffers as well ;), so no problems via 3G. It just throws away the buffer, when you switch tracks ...

Although I really like the Aonline app for consolidating my music channels...I would give squeezeplayer a try --- but but what I read above it seems that it doesnt change to the next song and you must reconnect to stream.mp3 over ssh.....this is not good?

bluegaspode
2011-05-13, 08:24
Although I really like the Aonline app for consolidating my music channels...I would give squeezeplayer a try --- but but what I read above it seems that it doesnt change to the next song and you must reconnect to stream.mp3 over ssh.....this is not good?

According to my tests with the irrsibot it 'works' as
- start irrsi-connectbot for the SSH tunnel
- start SqueezePlayer
- start Controller App (like SqueezeCommander)
- start playlist/radiostream/whatever
- skipping/scrubbing now works very well

- but: everytime a song ends - you need to press 'skip' in SqueezeCommander or alike, as tracks don't advance automatically :(

Via WiFi or 3G without SSH tunnel you don't need this last step.
This is a bug in the SSH tunnel/irrsibot implementation.

If you search for 'SSH' on the android market there are many alternative SSH clients, I just didn't have time to test them all.
Maybe I have some time on the weekend. If everything else fails openvpn is a viable alternative.

As SHH tunneling might be easier to setup for most people, I hope to find some time on the weekend to test all the other SSH clients.

@jt25741: if you provide me with your device-id (https://market.android.com/details?id=com.langlearner.deviceid) I'll send you a free copy of SqueezePlayer for testing! Anyone else interested in helping me finding and documenting easy secure connections via 3G are welcome as well!
support(at)squeezeplayer.com

jt25741
2011-05-13, 08:31
According to my tests with the irrsibot it 'works' as
- start irrsi-connectbot for the SSH tunnel
- start SqueezePlayer
- start Controller App (like SqueezeCommander)
- start playlist/radiostream/whatever
- skipping/scrubbing now works very well

- but: everytime a song ends - you need to press 'skip' in SqueezeCommander or alike, as tracks don't advance automatically :(

Via WiFi or 3G without SSH tunnel you don't need this last step.
This is a bug in the SSH tunnel/irrsibot implementation.

If you search for 'SSH' on the android market there are many alternative SSH clients, I just didn't have time to test them all.
Maybe I have some time on the weekend. If everything else fails openvpn is a viable alternative.

As SHH tunneling might be easier to setup for most people, I hope to find some time on the weekend to test all the other SSH clients.

@jt25741: if you provide me with your device-id (https://market.android.com/details?id=com.langlearner.deviceid) I'll send you a free copy of SqueezePlayer for testing! Anyone else interested in helping me finding and documenting easy secure connections via 3G are welcome as well!
support(at)squeezeplayer.com


Connectbot doesn't behave that way with Aoinline over VZW 3G on my Droid2...so I do not think the problem is with Connectbot. I am using the generic Connectbot.

bluegaspode
2011-05-13, 08:55
Connectbot doesn't behave that way with Aoinline over VZW 3G on my Droid2...so I do not think the problem is with Connectbot. I am using the generic Connectbot.
Then generic connectbot will be the next thing I'll try. I talked about 'irrsi connectbot' not working and these are two different Apps for creating SSH tunnels.

And trust me: I do have proof down at the network layer + wireshark protocols that the irrsi connectbot tunnel behaves different to not using a tunnel at all.
When a track ends, the connection to stream.mp3 is dropped by the server (when using the official slimdevices protocol). This does not happen via the irrsi-bot tunnel, so SqueezePlayer has no means of knowing that the track is over to advance to the next track.

jt25741
2011-05-13, 09:23
Then generic connectbot will be the next thing I'll try. I talked about 'irrsi connectbot' not working and these are two different Apps for creating SSH tunnels.

And trust me: I do have proof down at the network layer + wireshark protocols that the irrsi connectbot tunnel behaves different to not using a tunnel at all.
When a track ends, the connection to stream.mp3 is dropped by the server (when using the official slimdevices protocol). This does not happen via the irrsi-bot tunnel, so SqueezePlayer has no means of knowing that the track is over to advance to the next track.

I believe you....must be the different code/programs we use. Best to you!

bluegaspode
2011-05-14, 15:50
Tested some more SSH clients

- 'ConnectBot': same problem as 'irrsi connectbot': doesn't finish connection to stream.mp3 properly
- 'SSHTunnel (Beta)': doesn't show the problem, but: only allows one port to be forwared :(

So right now I can only get a working SSH tunneling solution by running both tools in parallel:
- 'SSHTunnel (Beta)': forwarding port 9000
- 'ConnectBot': forwarding port 3483

Bit cumbersome.
SSHTunnel allows to save the password, so the connection once configured is easier to start.
Maybe running the non-beta-version (which is based on connectbot) in parallel to the beta version (using dropbear as implementation) is a viable alternative.

For now I contacted the connectbot people to analyze the problem as well as the SSHTunnel people to see if they can support two port forwardings at the same time.