HASwitchPlate / openHASP

HomeAutomation Switchplate based on lvgl for ESP32
https://www.openhasp.com
MIT License
695 stars 179 forks source link

wireguard - allow to set hostname for the remote peer #632

Closed perexg closed 7 months ago

perexg commented 7 months ago

WireGuard-ESP32 library uses lwip_getaddrinfo() call to resolve IP/hostname string, so it should work.

veetek22 commented 7 months ago

Unfortunately it will not allow me to put hostname in the field - it says "Please match the requested format"

fvanroie commented 7 months ago

How long is the hostname? Did you shift-F5 the settings webpage to refresh?

veetek22 commented 7 months ago

yes refreshed , hostname is 13 characters long but tried putting a shorter one it gives me the same msg

perexg commented 7 months ago

It's something with your browser. I did some tests and the name can be longer than 13 characters now. Try to clean cache or really reload the page.

I did some tests and in some cases, the device may reset in an unexpected way when the wireguard configuration is changed. PR #633 removes the auto-reconfiguration code thus a manual device restart is required to apply new configuration like for wifi.

veetek22 commented 7 months ago

It's something with your browser. I did some tests and the name can be longer than 13 characters now. Try to clean cache or really reload the page.

I did some tests and in some cases, the device may reset in an unexpected way when the wireguard configuration is changed. PR #633 removes the auto-reconfiguration code thus a manual device restart is required to apply new configuration like for wifi.

Hi thank you, I have tried as suggested - cleared the cache in a browser restarted everything and unfortunately it still won't allow me to put a name in that field. I'm out of ideas at the moment unless you have any other suggestions.

image

image

perexg commented 7 months ago

VPN IP is IPv4 inside the wireguard tunnel (it's private IP). It cannot be defined by host name.

VPN IP = wireguard local IP (e.g. 192.168.2.100) - check remote endpoint configuration to match this value Remote IP = wireguard remote IP or hostname (public - outside VPN)