advanced: add IGMP Proxy (multicast/IPTV) support - #139
Open
ispyisail wants to merge 1 commit into
Open
Conversation
Folds IGMP proxying into the existing Advanced page rather than a standalone plugin package (discussion #69), using the standard igmpproxy feed package (net/igmpproxy, openwrt/packages) -- selected across every target profile, core-listed in gargoyle-profiles so it's always available. Backend (advanced.sh): enumerates real IPv4 interfaces as upstream/ downstream candidates (igmpproxy has no IPv6 support, so dhcpv6/*6 protocols are filtered out), resolving each interface's firewall zone via `fw4 -q network` since igmpproxy's own generated rules are keyed off zone, not interface name. Surfaces live running-state via ubus service list, matching the pattern doh.sh already uses for its own proxy status. Frontend (advanced.js): a full enable/upstream/downstream/altnet/ quickleave form. Saves by wholesale-rewriting the igmpproxy phyint sections (same approach doh.js takes for its resolver list -- simpler and safer than diffing existing sections in place). Upstream source subnets get a dedicated CIDR validator rather than reusing validateIP(), because validateIP() rejects 0.0.0.0 as a reserved/invalid host address -- but 0.0.0.0/0 ("any source") is the correct default value for this field and a completely valid network address. Opt-in by default: igmpproxy's own postinst enables the service unconditionally, which gargoyle-init now explicitly overrides (matching the existing pattern for miniupnpd/qos_gargoyle/webmon_gargoyle) so a fresh install never silently runs a multicast proxy nobody configured. Covered by vnet phase 50 (7 cases): package availability, opt-in default, enable/disable via the Advanced-page save path, phyint section generation for upstream+multiple downstream interfaces, and altnet CIDR validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds IGMP proxying (RFC discussion #69), folded into the existing Advanced page rather than a standalone plugin package, per the design already agreed there. Uses the standard
igmpproxyfeed package (net/igmpproxy, openwrt/packages) -- selected across every target profile, and core-listed ingargoyle-profilesso it's always available.advanced.sh): enumerates real IPv4 interfaces as upstream/downstream candidates (igmpproxy has no IPv6 support, sodhcpv6/*6protocols are filtered out), resolving each interface's firewall zone viafw4 -q networksince igmpproxy's own generated rules are keyed off zone, not interface name. Surfaces live running-state viaubus service list, matching the patterndoh.shalready uses for its own proxy status.advanced.js): a full enable / upstream / downstream / altnet / quickleave form. Saves by wholesale-rewriting the igmpproxyphyintsections -- same approachdoh.jstakes for its resolver list, simpler and safer than diffing existing sections in place. Upstream source subnets get a dedicated CIDR validator rather than reusingvalidateIP(), becausevalidateIP()rejects0.0.0.0as a reserved/invalid host address -- but0.0.0.0/0("any source") is the correct default value for this field and a completely valid network address.gargoyle-initnow explicitly overrides (matching the existing pattern for miniupnpd/qos_gargoyle/webmon_gargoyle) so a fresh install never silently runs a multicast proxy nobody configured.Test plan
<%~ Igmp* %>inadvanced.shhas a matching string, everyadvancedStr.Igmp*used inadvanced.jsis definednode --checkclean onadvanced.jsand the i18n file