Panel iframe + configurator + duckdns

Hello!

I have a problem with panel iframe. I acces to my hassio from my pc (connected to the same router) by ip adress: 192.168.100.12:8123 and i want to do that way because i want to have acces even if internet is offline. So i can define panel iframe by this:

panel_iframe: 
  configurator: 
    title: Configurator 
    icon: mdi:wrench 
    url: "https://192.168.100.12:3218"

Of course that wont work when i connect to hassio from outside using duckdns domain https://mydomain.duckdns.org:8123.

How make it work both way? I mean how to make it connect to local ip when i am connected from pc connected to the same router and make it work on duckdsns domain when i am connected from outside?

I am using duckdns addon with lets encrypt and nginx. I have workaround by acces to addons by clicking Hassio->addons>open web-ui