Https and plugins

I am facing some trouble trying to configure other module on
the main problem for me is related to https certificates and how they are handled.

I make an example:

duckdns configured with https certificates
dnsmasq configured for handling dns queries

Sometimes my dsl provider does not give to me a public ip but a masked one. When this happens appdaemon does not work correctly. I set it up with my FQN. I set it up also in dnsmasq.
That means that docker does not query my dnsmasq instance but asks on the net for the ip.

This causes also appdaemon to continuously logging high times of operation.

If I configure appdaemon for connecting to the ip address it fails because it does not recognize my certificate

I reverted from https to http for having appdaemon to work.

Question now is:

  • how can I make appdaemon happy while having https?

My idea is to make something like:

  • http in my lan
  • https for external accessing when my dsl provider is so kind to give me a public ip address.

I saw in the hassio plugins a lot of proxies but I am not confident with them.
Someone can give some advice about what download and configure?

thank you