favonia / cloudflare-ddns

🌟 A small, feature-rich, and robust Cloudflare DDNS updater
Apache License 2.0
747 stars 32 forks source link

Feature request: flags to accept self-signed certificates for an Uptime Kuma server #741

Closed adriamontoto closed 2 months ago

adriamontoto commented 4 months ago

Issue Description When attempting to send HTTP(S) requests to Uptime Kuma, users may encounter the error message: "😞 Failed to send HTTP(S) request to Uptime Kuma: tls: failed to verify certificate: x509: certificate signed by unknown authority." This issue arises due to the certificate verification process during HTTPS communication.

Proposal I suggest implementing a new flag or mechanism within Uptime Kuma that allows users to bypass the "certificate signed by unknown authority" error. This would provide flexibility to use self signed certificates for developing/home server environments.

Examples: In uptime kuma there is an option to ignore TLS/SSL error for HTTPS websites. image

favonia commented 4 months ago

@adriiamontoto Thanks for the suggestion. I'm not sure how to recognize self-signed certificates without turning off other also useful checking in Go (and without re-implementing the HTTP stack)---I guess I need help. In the meanwhile, there are two possible ways to solve this, and the first one is highly recommended:

  1. Use https://letsencrypt.org/ to generate verifiable certificates for your server.
  2. Put your certificates at one of these locations. (The official Docker image combines and puts all the trusted certificates at /etc/ssl/certs/ca-certificates.crt.)
adriamontoto commented 4 months ago

Thank you for your quick response, I would go with option number 2!

favonia commented 4 months ago

@adriiamontoto Let me know if you need help, and I still strongly recommend option 1. :-)

favonia commented 2 months ago

@adriiamontoto I am closing this issue because there's nothing for me to do now. Please re-open it if you have other suggestions.