tsaridas / stremio-docker

Docker files for easy stremio server and client. Images pushed to Dockerhub
https://github.com/tsaridas/stremio-docker/wiki
MIT License
67 stars 8 forks source link

get-https from localhost:11470 fails #15

Closed Premicheal closed 7 months ago

Premicheal commented 7 months ago

I am running the server on a Odroid-HC4. I am using a self-signed URL which works great on everything but my TV. The *.stremio.rocks url from my PC works on the TV. I tried your repo in the hopes that it could generate a signed cert from stremio for the HC4. However, if I specify a public or private IP, the container immediately crashes.

curl: (7) Failed to connect to localhost port 11470 after 1 ms: Couldn't connect to server

tsaridas commented 7 months ago

it might be that the server is not running yet when curl is being called. Can you edit the startup script (stremio-web-service-run.sh), increase the sleep time and build the image yourself ?

Premicheal commented 7 months ago

http://api.strem.io/api/certificateGet/ gives me { "result": null, "error": null } I think this might be the issue. I just copied the apikey and ipaddress from a request the official stremio-server image made. Am I sending wrong params in the body or something? The get-https endpoint is the only one that errors in the official image too.

tsaridas commented 7 months ago

The curl that I did works fine for me, I just tested.

http://localhost:11470/get-https?ipAddress=192.168.2.10

You don't need to specific an api key. What ip are you using ?

Premicheal commented 7 months ago

can you confirm if the response of http://api.strem.io/api/certificateGet/ is not null. I am using 192.168.1.168. Hitting it through http://192.168.1.168:11470/get-https?ipAddress=192.168.1.168 throws 'Could not get a valid HTTPS certificate' in the server logs.

tsaridas commented 7 months ago

its definitely not null. maybe try a couple of times ? The cert is the same anyway. the only difference comes when you put a public ip address and they setup an dns A record for you. I could share it but the script would keep failing so you would need to remove the curl and rebuild.

Premicheal commented 7 months ago

If you can give a cert I can definitely try that. Earlier today I was trying this too , but it worked on everythign except the tv. I think LG does not link self-signed certs.

tsaridas commented 7 months ago

I'm not happy with sharing the cert here though. find some other way and I'll try to do it. keep in mind that you would need to setup dns for your tv to be able to access the fqdn.

why don't you use plain http and access it through the ip address.

could you also try adding an empty auth key and quote the whole url with curl

curl -Lv "http://192.168.1.168/get-https?authKey=&ipAddress=192.168.1.168"
Premicheal commented 7 months ago

Many many thanks my friend. This did the trick. Now I can access it on all my local devices at 192-168-1-168.519b6502d940.stremio.rocks.