Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [Inadyn] Custom provider ignores "ssl" variables #1684

Open
luisbandalap opened this issue Dec 27, 2024 · 1 comment
Open

🐛 [Inadyn] Custom provider ignores "ssl" variables #1684

luisbandalap opened this issue Dec 27, 2024 · 1 comment
Labels
bug Something isn't working stale Element will be closed automatically

Comments

@luisbandalap
Copy link

luisbandalap commented Dec 27, 2024

Description

Hello,

I have a problem with the generated configuration on inadyn addon. Currently I host my own "ddns server". I configured it to use http and https ports (https uses a non trusted certificate). https communication throws a certificate error in addon as it's a non trusted certificate authority it should work if i set secure_ssl: false and as a fallback http mode should work if i set ssl: false on custom provider

But if i set a configuration like this:

providers:
  - provider: [email protected]
    custom_provider: true
    username: [redacted]
    password: [redacted]
    ssl: false
    hostname: homeassistant.custom.tld
    checkip_command: curl -s --retry 5 -4 http://my-local-ip.custom.lan/ip
    ddns_server: ddns-server.custom.lan
    ddns_path: /update?hostname=%h&myip=%i
    append_myip: false
  - provider: [email protected]
    custom_provider: true
    username: [redacted]
    password: [redacted]
    ssl: false
    hostname: homeassistant.custom.tld
    checkip_command: curl -s --retry 5 -6 http://my-local-ip.custom.lan/ip
    ddns_server: ddns-server.custom.lan
    ddns_path: /update?hostname=%h&myip=%i
    append_myip: false
verify_address: true
allow_ipv6: true
iface: enp0s18
iterations: 0
period: 10
forced_update: 600
secure_ssl: false

The obtained inadyn configuration file is this:

# Inadyn v2.0 configuration file format
verify-address = true
allow-ipv6 = true
iface = "enp0s18"
period = 10
forced-update = 600

custom [email protected] {
    username         = "[redacted]"
    password         = "[redacted]"
    hostname         = "homeassistant.custom.tld"
    checkip-command  = "curl -s --retry 5 -4 http://my-local-ip.custom.lan/ip"
    ddns-server      = "ddns-server.custom.lan"
    ddns-path        = "/update?hostname=%h&myip=%i"
}
custom [email protected] {
    username         = "[redacted]"
    password         = "[redacted]"
    hostname         = "homeassistant.custom.tld"
    checkip-command  = "curl -s --retry 5 -6 http://my-local-ip.custom.lan/ip"
    ddns-server      = "ddns-server.custom.lan"
    ddns-path        = "/update?hostname=%h&myip=%i"
}

The generated inadyn.conf is missing secure-ssl variable and ssl variables making unusable my ddns server configuration.

Generated file should be like this to work on my setup:

# Inadyn v2.0 configuration file format
verify-address = true
allow-ipv6 = true
iface = "enp0s18"
period = 10
forced-update = 600
secure-ssl = false #this is missing

custom [email protected] {
    ssl                     = false #this is missing
    username         = "[redacted]"
    password         = "[redacted]"
    hostname         = "homeassistant.custom.tld"
    checkip-command  = "curl -s --retry 5 -4 http://my-local-ip.custom.lan/ip"
    ddns-server      = "ddns-server.custom.lan"
    ddns-path        = "/update?hostname=%h&myip=%i"
}
custom [email protected] {
    ssl                     = false #this is missing
    username         = "[redacted]"
    password         = "[redacted]"
    hostname         = "homeassistant.custom.tld"
    checkip-command  = "curl -s --retry 5 -6 http://my-local-ip.custom.lan/ip"
    ddns-server      = "ddns-server.custom.lan"
    ddns-path        = "/update?hostname=%h&myip=%i"
}

I have inadyn running on other linux devices so i know this two missing variables should work if them exists on inadyn.conf

Reproduction steps

1. Go to Inadyn Addon 'Configuration'
2. Click on 'Edit YAML'
3. Set secure-ssl to false or add a custom provider with ssl = false
4. See generated inadyn.conf

Addon Logs

Starting...
/etc/cont-init.d/00-banner.sh: executing

�[34m-----------------------------------------------------------�[0m
�[34m Add-on: Inadyn�[0m
�[34m Inadyn is a small and simple Dynamic DNS, DDNS, client with HTTPS support. A large number of dynamic dns providers are supported (https://github.com/troglobit/inadyn#supported-providers). For those that are not, you can use a custom provider as per this project's documentation (https://github.com/nalipaz/hassio-addons/blob/master/README.md)�[0m
�[34m-----------------------------------------------------------�[0m
�[34m Add-on version: 2.12.0-2�[0m
�[32m You are running the latest version of this add-on.�[0m
�[34m System: Home Assistant OS 14.1  (amd64 / qemux86-64)�[0m
�[34m Home Assistant Core: 2024.12.5�[0m
�[34m Home Assistant Supervisor: 2024.12.0�[0m
�[34m-----------------------------------------------------------�[0m
�[34m Please, share the above information when looking for help�[0m
�[34m or support in, e.g., GitHub, forums�[0m
�[34m-----------------------------------------------------------�[0m
�[32m Provided by: https://github.com/alexbelgium/hassio-addons �[0m
�[34m-----------------------------------------------------------�[0m
/etc/cont-init.d/00-global_var.sh: executing
�[34mallow_ipv6='true'�[0m
�[34mforced_update='600'�[0m
�[34miface='enp0s18'�[0m
�[34miterations='0'�[0m
�[34mperiod='10'�[0m
[22:25:52] WARNING: �[33m[
  {
    "provider": "[email protected]",
    "custom_provider": true,
    "username": "[redacted]",
    "password": "[redacted]",
    "ssl": false,
    "hostname": "homeassistant.custom.tld",
    "checkip_command": "curl -s --retry 5 -4 http://my-local-ip.custom.lan/ip",
    "ddns_server": "ddns-server.custom.lan",
    "ddns_path": "/update?hostname=%h{MESSAGE}myip=%i",
    "append_myip": false
  },
  {
    "provider": "[email protected]",
    "custom_provider": true,
    "username": "[redacted]",
    "password": "[redacted]",
    "ssl": false,
    "hostname": "homeassistant.nubecita.tez",
    "checkip_command": "curl -s --retry 5 -6 http://my-local-ip.custom.lan/ip",
    "ddns_server": "ddns-server.custom.lan",
    "ddns_path": "/update?hostname=%h{MESSAGE}myip=%i",
    "append_myip": false
  }
] is an array, skipping�[0m
�[34msecure_ssl='false'�[0m
�[34mverify_address='true'�[0m
/etc/cont-init.d/01-config_yaml.sh: executing
/etc/cont-init.d/01-custom_script.sh: executing
�[32mExecute /config/*-inadyn/inadyn.sh if existing�[0m
�[32mWiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation�[0m
curl: (23) Failure writing output to destination
�[0;31mError�[0m : /etc/cont-init.d/01-custom_script.sh exiting 23
/etc/cont-init.d/99-run.sh: executing
inadyn[211]: In-a-dyn version 2.12.0 -- Dynamic DNS update client.
inadyn[211]: Update forced for alias homeassistant.custom.tld, new IP# xxxx:xxxx:a188:adfc::a49
inadyn[211]: Update forced for alias homeassistant.custom.tld, new IP# xxx.xx.1.250
inadyn[211]: The certificate does not have a known issuer.
inadyn[211]: The certificate is not trusted.
inadyn[211]: SSL handshake with ddns-server.custom.lan failed: Error in the certificate.
inadyn[211]: The certificate does not have a known issuer.
inadyn[211]: The certificate is not trusted.
inadyn[211]: SSL handshake with ddns-server.custom.lan failed: Error in the certificate.

Architecture

amd64

OS

Virtual Machine

@luisbandalap luisbandalap added the bug Something isn't working label Dec 27, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Element will be closed automatically label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Element will be closed automatically
Projects
None yet
Development

No branches or pull requests

1 participant