From e6e98675928560116d01e9a920b1a770092c4d23 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Wed, 11 Feb 2026 12:12:34 +0100 Subject: [PATCH] fix(interceptor): Fix WPAD DHCP option detection - Check dhcp_option before dhcp_option_force - Fix PAC URL extraction using grep -oE Co-Authored-By: Claude Opus 4.5 --- .../root/usr/libexec/rpcd/luci.interceptor | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/package/secubox/luci-app-interceptor/root/usr/libexec/rpcd/luci.interceptor b/package/secubox/luci-app-interceptor/root/usr/libexec/rpcd/luci.interceptor index 2635ebe3..9ce88cbc 100644 --- a/package/secubox/luci-app-interceptor/root/usr/libexec/rpcd/luci.interceptor +++ b/package/secubox/luci-app-interceptor/root/usr/libexec/rpcd/luci.interceptor @@ -20,11 +20,12 @@ get_wpad_status() { # Check PAC file [ -f /www/wpad.dat ] && enabled=1 - # Check DHCP option 252 - local dhcp_opt=$(uci -q get dhcp.lan.dhcp_option_force) + # Check DHCP option 252 (check both dhcp_option and dhcp_option_force) + local dhcp_opt=$(uci -q get dhcp.lan.dhcp_option) + [ -z "$dhcp_opt" ] && dhcp_opt=$(uci -q get dhcp.lan.dhcp_option_force) if echo "$dhcp_opt" | grep -q "252"; then dhcp_configured=1 - pac_url=$(echo "$dhcp_opt" | sed 's/252,//') + pac_url=$(echo "$dhcp_opt" | grep -oE 'http://[^ ]+wpad[^ ]*' | head -1) fi # Check WPAD enforcement