IDmedia / hass-unraid

This Docker container parses and forwards all WebSocket messages from your Unraid server to Home Assistant using the MQTT protocol
115 stars 5 forks source link

Self Signed SSL with no verification support #10

Open starsoccer opened 4 months ago

starsoccer commented 4 months ago

Currently my unraid server uses SSL/TLS but with a self signed certificate. It doesnt seem like there is currently a way to make this work with the addon as there is no way to add the certificate, or simply ignore verification

PilaScat commented 3 months ago

same here

xebmin commented 3 months ago

Hello, This can be easily bypassed using unraid connect url. It works like a charm !!!

louispires commented 2 months ago

Hello, This can be easily bypassed using unraid connect url. It works like a charm !!!

I tried this but still ran into some issues, with ssl set to True, I get the following error: websockets.exceptions.InvalidURI: https://10-0-0-250.abc123.myunraid.net:444/login isn't a valid URI: scheme isn't ws or wss

With it set to False, I get this error: websockets.exceptions.InvalidStatusCode: server rejected WebSocket connection: HTTP 400

Neither one seems to work for me...

My server is ONLY accessible via HTTPS and on port 444

louispires commented 2 months ago

nvm on the above, got it working after I debugged it and the following config worked:

unraid:
  - name: brute
    host: 10-0-0-250.abc123.myunraid.net
    port: 444
    ssl: True
    username: root
    password: PASSWORD
    scan_interval: 30

mqtt:
  host: 10.0.0.247
  port: 1883
  username: USERNAME
  password: PASSWORD
starsoccer commented 2 months ago

Hello, This can be easily bypassed using unraid connect url. It works like a charm !!!

Thats assuming you use unraid connect which I do not, and I assume lots of others dont as well

maxshcherbina commented 2 months ago

I dont understand this limitation. If both my unraid and my self signed home assistant are on the same local network, will hass-unraid not work?

IDmedia commented 2 months ago

I dont understand this limitation. If both my unraid and my self signed home assistant are on the same local network, will hass-unraid not work?

Most likely because the certificate isn't trused. I'll see if I can look into it, but I don't use self signed certs. For now use http or a trusted certificate and it should work as intended.

starsoccer commented 2 months ago

I dont understand this limitation. If both my unraid and my self signed home assistant are on the same local network, will hass-unraid not work?

Most likely because the certificate isn't trused. I'll see if I can look into it, but I don't use self signed certs. For now use http or a trusted certificate and it should work as intended.

I mean the ideal way to support this is to allow a custom certificate to be passed in and then simply trust that certificate. An alternative and less ideal option is to just disable verification with an ENV variable so that its possible to atleast use this as right now its not for anyone with a custom cert.

stayupthetree commented 1 month ago

nvm on the above, got it working after I debugged it and the following config worked:

unraid:
  - name: brute
    host: 10-0-0-250.abc123.myunraid.net
    port: 444
    ssl: True
    username: root
    password: PASSWORD
    scan_interval: 30

mqtt:
  host: 10.0.0.247
  port: 1883
  username: USERNAME
  password: PASSWORD

You are the real MVP, this is the ONLY way I could get it to work. I dont understand why my LAN IP wouldnt