Fix DHCP client unable to get IP and config not persisting
- Fixed verifyAssignment being too strict for new clients - Fixed parseRequestedIP string conversion bug - Fixed response sent to 0.0.0.0 instead of broadcast address - Added SO_BROADCAST support for UDP socket - Fixed session persistence after page refresh (localStorage) - Added in-memory session store for auth middleware - Added config reloader so DHCP server picks up web UI changes dynamically
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"dhcp": {
|
||||
"enabled": true,
|
||||
"interface": "eth0",
|
||||
"network": "192.168.1.0",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.1.1",
|
||||
"dns_servers": ["192.168.1.1", "114.114.114.114", "8.8.8.8"],
|
||||
"ntp_servers": ["ntp.aliyun.com"],
|
||||
"broadcast_address": "192.168.1.255",
|
||||
"lease_time": 86400,
|
||||
"ip_pool_start": "192.168.1.100",
|
||||
"ip_pool_end": "192.168.1.200",
|
||||
"domain_name": "local",
|
||||
"excluded_ips": ["192.168.1.1", "192.168.1.2", "192.168.1.3"]
|
||||
},
|
||||
"dns": {
|
||||
"enabled": true,
|
||||
"listen_addr": "0.0.0.0",
|
||||
"listen_port": 53,
|
||||
"upstream": ["8.8.8.8", "1.1.1.1", "114.114.114.114"],
|
||||
"cache_size": 1000,
|
||||
"cache_ttl": 300,
|
||||
"recursion": true,
|
||||
"allow_query": ["any"],
|
||||
"dnssec_validation": false
|
||||
},
|
||||
"web": {
|
||||
"host": "0.0.0.0",
|
||||
"port": 8080,
|
||||
"session_key": "change-this-to-a-random-secret-key",
|
||||
"enable_https": false,
|
||||
"https_cert": "",
|
||||
"https_key": ""
|
||||
},
|
||||
"database": {
|
||||
"path": "data/dhcp-dns.db"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user