lamarios / clipious

Invidious client for android
GNU Affero General Public License v3.0
962 stars 32 forks source link

Invialid Invidious server #120

Closed anoo2niem closed 1 year ago

anoo2niem commented 1 year ago

Hello,

I really like the app, and really want to use it with my private instance. Regarding my issue #96, i've tried several ways to fix it. I thought maybe dash isn't working because my private instance was not using ssl.

Since i've configured my private instance witrh a self signed ssl certificate, but i'm running in another issue now.

My private instance has a self signed certificate with the domain name https://youtube.home, which is trusted by my phone. See picture; with browser, i can reach my instance thru https://youtube.home with trusted ssl. Screenshot_20230414_124057_Brave

When i try to add my instance in clipious (https://youtube.home), i get the error 'Invalid Invidious server'.

I'm ussing caddy with a reverse proxy for the ssl certificate, as described in the invidious docs; https://docs.invidious.io/caddy/ Screenshot_20230414_123404

lamarios commented 1 year ago

Can you give me the output of

https://<your server url>/api/v1/stats

anoo2niem commented 1 year ago

{"software":{"name":"invidious","version":"2023.04.01-8db2a938","branch":"master"}}

lamarios commented 1 year ago

Yeah it's matching the expected response. Looks like the app has issues connecting to the server. Is the ssl certificate added at a phone level or is it just in your browser?

anoo2niem commented 1 year ago

It is added at phone level, ca certificate added in settings of the phone.

lamarios commented 1 year ago

I'm. Not sure how that would work and I'm also not sure if the certificate is the issue. I'll try to add a feature to ignore ssl certificate issues and see if that fixes it for you.

I also need to add a way to retrieve errors because like that it's very hard for me to figure out what's going on haha

lamarios commented 1 year ago

Can you try this https://cloud.ftpix.com/s/GLCRnrjpAcCYL39

sha1 hash:

8b96ffd2c8d9abf80bcc441b239ff367b348cc75

and see if it works ? On this special build I remove the ssl cert verification on all http requests, that would help to narrow down the problem.

anoo2niem commented 1 year ago

The issue as described here, is solved by using the apk u provided me. Clipious does find my private instance now. Screenshot_20230414_150526 (1)

The issue i had before did come again tho, no thumbnails and videos can't be played. Trying to fix it as i did before by adding domain: youtube.home and setting https_only: true in config.yml, gave me this output with https://youtube.home/api/v1/videos/SurUidVDQf4:

{"type":"video","title":"Don't Watch This Video... (On a Pixel)","videoId":"SurUidVDQf4","videoThumbnails":[{"quality":"maxres","url":"https://youtube.home:3000/vi/SurUidVDQf4/maxres.jpg","width":1280,"height":720},{"quality":"maxresdefault","url":"https://youtube.home:3000/vi/SurUidVDQf4/maxresdefault.jpg","width":1280,"height":720},{"quality":"sddefault","url":"https://youtube.home:3000/vi/SurUidVDQf4/sddefault.jpg","width":640,"height":480},

I've tried changing the port 3000 to 80 & 443, but then my whole instance doesn't work anymore, since my caddy server is listening on these ports and mapping it to 127.0.0.1:3000 (invidious instance) as a reverse proxy...

I'm a little stuck at the moment, if u have any suggestions, please let me know.

Thank u for taking the time to provide me with this modified apk.

anoo2niem commented 1 year ago

Nevermind, i forgot to set external_port: 433 in config.yml.

After setting this entry, the output of https://youtube.home/api/v1/videos/SurUidVDQf4, is as it should be;

{"type":"video","title":"Don't Watch This Video... (On a Pixel)","videoId":"SurUidVDQf4","videoThumbnails":[{"quality":"maxres","url":"https://youtube.home/vi/SurUidVDQf4/maxres.jpg","width":1280,"height":720},{"quality":"maxresdefault","url":"https://youtube.home/vi/SurUidVDQf4/maxresdefault.jpg","width":1280,"height":720},{"quality":"sddefault","url":"https://youtube.home/vi/SurUidVDQf4/sddefault.jpg","width":640,"height":480},{"quality":"high","url":"https://youtube.home/vi/SurUidVDQf4/hqdefault.jpg","width":480,"height":360},{"quality":"medium","url":"https://youtube.home/vi/SurUidVDQf4/mqdefault.jpg","width":320,"height":180},{"quality":"default","url":"https://youtube.home/vi/SurUidVDQf4/default.jpg","width":120,"height":90},{"quality":"start","url":"https://youtube.home/vi/SurUidVDQf4/1.jpg","width":120,"height":90},{"quality":"middle","url":"https://youtube.home/vi/SurUidVDQf4/2.jpg","width":120,"height":90},

So everything works as before, but with ssl, unfortunatly #96 remains true even with ssl enabled :(

lamarios commented 1 year ago

OK. I'll add an option to skip ssl verification in one of my next releases.

lamarios commented 1 year ago

just to summarize, if it's the same as the issue mentionned above, you can play videos but not Dash and live streams ?

anoo2niem commented 1 year ago

just to summarize, if it's the same as the issue mentionned above, you can play videos but not Dash and live streams ?

Exactly

lamarios commented 1 year ago

OK. So I'll leave this one closed.

The toggle to accept self signed certs has been added in the last version.