Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 32

Hybrid View

  1. #1
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,061

    TLS for squeezelite?

    During my recent attempt to find the problem with RP and HTTPS, I explored the possibility to add TLS to squeezelite. It's not super easy but I now have a good opinion on how to do it. But ... is this really useful? As of today, LMS proxies TLS connections, is this a real problem?

    [edit]: I decided to give it a try and that's done, but I'm now a bit confused by how/when LMS will send an HTTPS link directly to my squeezelite instance (I've set player capabilities to add "CanHTTPS=1"). At least it works for podcasts...

    in SqueezePlayDirect.pm
    Code:
    sub contentType { 'spdr' }
    
    sub formatOverride { 'spdr' }
    
    sub slimprotoFlags { 0x10 }
    
    sub canDirectStream {
    	my ($class, $client, $url) = @_;
    
    	my ($handler) = $url =~ /spdr:\/\/(.+?)\?/;
    
    	if ($handler && $client->can('spDirectHandlers') && $client->spDirectHandlers =~ /$handler/) {
    		return $url;
    	}
    }
    and in HTTPS.pm
    Code:
    # Check whether the current player can stream HTTPS or not 
    sub canDirectStream {
    	my $self = shift;
    	my ($client) = @_;
    	
    	if ( $client->canHTTPS ) {
    		return $self->SUPER::canDirectStream(@_);
    	}
    
    	return 0;
    }
    Last edited by philippe_44; 2019-04-26 at 00:57.
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  2. #2
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,220
    That's excellent!

    Could the changes be incorporated into squeezelite as an optional feature at compile time?

    Having to tool all the various versions for SSL in one go would be a monumental task.
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  3. #3
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    5,061
    Quote Originally Posted by ralphy View Post
    That's excellent!

    Could the changes be incorporated into squeezelite as an optional feature at compile time?

    Having to tool all the various versions for SSL in one go would be a monumental task.
    I've pushed a proposal on github
    LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000, ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5

  4. #4
    Senior Member ralphy's Avatar
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    2,220
    Thank you for creating the pull request.

    I've been testing the ssl changes today on picoreplayer 4.1 with good success so far, so I've created an armhf build compatible with picoreplayer and raspbian jessie and stretch.

    squeezelite-1.9.1.1142.ssltest4-armv6hf.tar.gz is available on sourceforge for forum members to help test. The ssl changes have not been committed to git so I've included a patch file in the tarball.

    Please post issues here and any suggested changes to the github pull request.

    Here's how to install the custom ssl test build on picoreplayer.

    Stop squeezelite on the Main Page of the webgui.

    Code:
    ce
    
    wget -O squeezelite-1.9.1.1142.ssltest4-armv6hf.tar.gz https://sourceforge.net/projects/lmsclients/files/squeezelite/linux/squeezelite-1.9.1.1142.ssltest4-armv6hf.tar.gz/download
    
    tar xf squeezelite-1.9.1.1142.ssltest4-armv6hf.tar.gz squeezelite
    
    mv squeezelite squeezelite-custom
    Then on the squeezelite tab in the Set Squeezelite Binary section at the bottom.

    Click the custom squeezelite radio button and then the Set Binary button.

    Squeezelite will restart if the download was successful and you'll see the squeezelite ssltest3 version in the webgui footer.

    To remove the test build.

    Select either the Standard or DSD/DOP radio button and Set Squeezelite Binary.

    Once squeezelite restarts you can delete the files.

    Code:
    ce
    
    rm squeezelite-custom
    
    rm squeezelite-1.9.1.1142.ssltest4-armv6hf.tar.gz
    Last edited by ralphy; 2019-05-01 at 04:53. Reason: ssltest4 - stop squeezelite first
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 1-UE Radio
    Squeezebox client builds donations always appreciated.

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,316

    TLS for squeezelite?

    What would be the logging parameters to see whether it's streaming
    directly or not?

    --

    Michael

  6. #6
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,316

    TLS for squeezelite?

    > What would be the logging parameters to see whether it's streaming
    > directly or not?


    player.streaming.direct - nm.


    --

    Michael

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,316

    TLS for squeezelite?

    > Thank you for creating the pull request.

    Another pull request of Philippe's and Radio Paradise is streaming
    directly to my pCP 4.1! Very nice!



    --

    Michael

  8. #8
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,316
    ...and it played through all night.
    Michael

    http://www.herger.net/slim-plugins - Spotty, MusicArtistInfo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •