jhuckaby / performa-satellite

Remote data collector for Performa.
Other
15 stars 2 forks source link

When using self signed certificate and https forced, error is shown on satellite #9

Closed Ruok2bu closed 1 month ago

Ruok2bu commented 1 month ago

Im using a self signed certificate and when satellite sends data, i get this error:

Warning: Performa Satellite Error: Failed to call home: Error: Error: self-signed certificate

Can you add exception so that it can still send even if the certificate is self signed?

jhuckaby commented 1 month ago

Fixed in v1.1.6.

Updated docs: https://github.com/jhuckaby/performa-satellite#configuration

To connect with HTTPS and allow self-signed certs, first upgrade all your satellite installations to v1.1.6, then add the proto and socket_opts properties to your config.json file:

{
    "enabled": true,
    "host": "performa.local:5511",
    "secret_key": "CHANGE_ME",
    "group": "",
    "proto": "https:",
    "socket_opts": {
        "rejectUnauthorized": false
    }
}
Ruok2bu commented 1 month ago

Oh and im not sure if its by design or a typo, but "proto": "https", doesnt work. "proto": "https:", works though. (addition of colon)

jhuckaby commented 1 month ago

Oh darn! Thank you, that's just a typo by me. Will fix. Yes, https: with a colon is the correct syntax, as that's the "standard" format for the protocol. https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol