# openwrt-wol-forwarder **Repository Path**: phpdragon/openwrt-wol-forwarder ## Basic Information - **Project Name**: openwrt-wol-forwarder - **Description**: WOL Forwarder 是一个专为 OpenWrt/ImmortalWrt 路由器设计的 Wake-on-LAN 数据包转发器,支持跨子网唤醒功能。本仓库提供了完整的 OpenWrt feed 集成支持。 - **Primary Language**: C - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-07 - **Last Updated**: 2026-09-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # WOL Forwarder - Wake-on-LAN Packet Forwarder for OpenWrt A lightweight daemon for OpenWrt/ImmortalWrt routers that listens for Wake-on-LAN magic packets on one network interface and forwards them to another, enabling cross-subnet wake-up functionality. ## Features - Cross-subnet WOL: Forward WOL packets between different network interfaces/subnets - MAC Whitelist: Only forward packets for allowed MAC addresses - Rich Logging: Multi-level logging with color-coded output - Non-blocking I/O: Efficient polling-based packet processing - OpenWrt Integration: Full UCI configuration support and init.d script - Color Output: Beautiful terminal output with color-coded log levels - Statistics: Real-time packet statistics and success rate tracking ## Installation ### From OpenWrt Feed Add the feed to your OpenWrt build system: ```bash echo "src-git wol-forwarder https://github.com/yourusername/wol-forwarder.git" >> feeds.conf.default ./scripts/feeds update wol-forwarder ./scripts/feeds install wol-forwarder make package/wol-forwarder/compile V=s opkg install bin/packages/*/base/wol-forwarder_*.ipk ``` ## Manual Installation Transfer the IPK file to your router and install: ```bash opkg install wol-forwarder_*.ipk ``` ## Configuration ### UCI Configuration Edit /etc/config/wol-forwarder: ```text config wol-forwarder 'config' option wan_interface 'wan' # Interface to listen for WOL packets option lan_interface 'br-lan' # Interface to forward WOL packets option log_level 'info' # error|warn|info|detail|debug option mac_whitelist_enabled '0' # 0=disabled, 1=enabled option whitelist_macs '' # Space-separated MAC addresses ``` ### Command-line Usage ```text /usr/sbin/wol-forwarder -w -l [options] ``` Options: - -q: Quiet mode (errors only) - -v: Verbose mode (info level) - -d: Debug mode - -m : Add MAC address to whitelist - -h: Show help ### Service Management ```bash /etc/init.d/wol-forwarder start /etc/init.d/wol-forwarder stop /etc/init.d/wol-forwarder restart /etc/init.d/wol-forwarder enable /etc/init.d/wol-forwarder disable ``` ### Building from Source ```bash git clone https://github.com/yourusername/wol-forwarder.git package/wol-forwarder # make package/wol-forwarder/clean V=s make package/wol-forwarder/compile V=s ``` ## License Apache-2.0