Giter Club home page Giter Club logo

Comments (7)

JasonLandbridge avatar JasonLandbridge commented on June 20, 2024

Hey, can you try setting the preferred connection like this:

image

  1. Open the server settings by cliking on the gear icon
  2. Go to Server Connections
  3. Select the https connection

Would this work?

from plexripper.

JasonLandbridge avatar JasonLandbridge commented on June 20, 2024

If the connection selection isn't showing up with the above, then that has been fixed here: #253

from plexripper.

tknmncr avatar tknmncr commented on June 20, 2024

from plexripper.

JasonLandbridge avatar JasonLandbridge commented on June 20, 2024

Can you try this url in your browser and see if the https connection shows up on the page?

https://plex.tv/api/v2/resources?X-Plex-Token={{PLEX_AUTH_TOKEN}}&X-Plex-Client-Identifier=Chrome

Make sure to replace the PLEX_AUTH_TOKEN with your token Plex account token

A quick Google search on "ErrorMessage - The SSL connection could not be established, see inner exception." shows that the server certificate might be invalid:

https://stackoverflow.com/questions/52939211/the-ssl-connection-could-not-be-established

One of the answers talks about disabling the check but that might be a security issue, but that might not matter for PlexRipper. I will need to investigate a bit more.

from plexripper.

frosit avatar frosit commented on June 20, 2024

Maybe this could help. Usually when I'm working with http requests (curl, guzzle) and I stumble upon an endpoint with an invalid certificate, such thing can be ignored by setting a parameter before you send out your request. Something like allow_insecure->true.

Good chance your http client library or whatever you use raises an exception upon an invalid certificate, which is good but I think many self hosted plex libraries may have improper certificates. So adding a setting to allow insecure requests would be logical, and allow it by default if env=dev?

If I remember correct a problem like this could also be identified by the response http status code or the type of exception so if we would have logs of that we could probably tell if it's a network thing or not. If you tell me where that code is defined and a link to the docs I could help check on that.

from plexripper.

tknmncr avatar tknmncr commented on June 20, 2024

from plexripper.

frosit avatar frosit commented on June 20, 2024

Well, I deep a quick dive into the docs of that seems to be our API client, and it does has the option to ignore insecure certificates.

on your case
However, in your case, i think you could be dealing with something weird on your network. I have been experimenting a bit and I can't seem to trigger this issue. Maybe a private network like I use could be a workaround for you.

I raised the following feature request: #278 to allow for custom server URL's to be configured manually so that I could configure wrong SSL certs. It also is very usefull in a lot of other casees to set a custom url., hence the request.

What I found in docs

When doing a bit research I think I found how what change we should make to do this, maybe we could test it a bit on a different branch and see. But I'm not sure where exacty to implement this... (yet).

It seems to be possible to specify a RemoteCertificateValidationCallback while instantiating RestClient in it's constructor. This callback would be like below to allow sslPolicyErrors.

ServicePointManager.ServerCertificateValidationCallback +=
        (sender, certificate, chain, sslPolicyErrors) => true;

Here are the docs: https://restsharp.dev/usage.html#simple-factory

So If you wanted to test it quickly you'd override client somewhere near here?

public PlexApi(ILog log, PlexApiClient client)

But I'd have to brush up on my C# first before doing things like this, I don't know how to properly implement this currently.

from plexripper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.