implement auto gateway Ip auto detection (#25)

Reviewed-on: #25
implemented #19
This commit was merged in pull request #25.
This commit is contained in:
2026-07-14 19:32:02 +01:00
parent 74de317ecb
commit a08cd30853
5 changed files with 119 additions and 12 deletions
+5 -1
View File
@@ -84,7 +84,7 @@ vi /etc/openuf/openuf.conf
Example Configuration
```ini
controller_ip = 192.168.1.1 # UniFi controller IP
controller_ip = # Empty: use IPv4 default gateway
lan_if = br-lan # Default Lan interface Name
ufmodel = u6-inwall # emulated model
inform_interval = 10 # inform interval
@@ -96,6 +96,10 @@ protocol_debug_level = 0 # 0=off, 1=safe response details,
```
Set `controller_ip` to a controller IPv4 address or hostname to override
autodetection. The automatic mode uses the IPv4 default-route gateway for
initial adoption; after adoption, the controller-provided inform URL is kept.
Daemon settings live in `/etc/openuf/openuf.conf`. Adoption and controller state
are persisted separately in `/etc/openuf/state.json`; do not copy that file
between devices because it contains the device authentication key.