Expand documentation and add daemon CLI improvements#3
Open
jackhart wants to merge 1 commit into
Open
Conversation
… docs Bug fixes in simple.py: - Fix VifManager.add() treating mcast_index=0 as None (`if not` -> `if is None`) - Fix DELETE /vifs path parameter mismatch (interface_name vs interface_name_or_index) - Fix MfcManager.add() crashing on new dynamic routes (ValueError from list.index) - Fix MfcManager.match() accessing wrong attributes on MRoute vs MFCEntry objects - Fix ControlMessageHandler accessing .oifs on MRoute (should be .to) - Fix POST /mfc return using string key on int-keyed dict - Add proper HTTP error responses (404, 400, 409) instead of bare Python exceptions - Remove dead code (_ttls_list function) - Fix static_mfc() dict key check (use `in` instead of `.get()` truthiness) Bug fixes in config.py: - Add CIDR notation support for multicast groups (e.g., 239.1.0.0/24) - Add MRoute.matches_group() for wildcard/prefix matching - Add config file existence check (raise FileNotFoundError) - Add route interface validation against configured phyints - Fix _str_to_list returning empty strings from trailing commas Bug fixes in utils.py: - Fix DaemonContext PID file writing (bytes(int) -> str(int)) - Fix PID file cleanup on exit (unlink instead of just close) - Add proper signal handler registration (SIGTERM) - Add stdin/stdout/stderr redirect to /dev/null - Use os._exit() in fork to avoid flushing parent buffers Other fixes: - Fix hardcoded path in test_simple.py (use Path(__file__).parent) - Update __main__.py: add --daemon flag, fix --port type, rename default host - Comprehensive README with configuration reference, REST API docs, examples https://claude.ai/code/session_011SHzjaNfRzKskvoWur8xD9
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
This PR significantly expands the project documentation and improves the daemon CLI interface. The README has been restructured to provide comprehensive guidance on configuration, usage, and architecture, while the CLI has been enhanced with better argument handling and daemon mode support.
Key Changes
Documentation (README.md)
CLI Improvements (main.py)
--daemonflag to run as a background daemon (double-fork)--hostfrom172.20.0.2to0.0.0.0for broader accessibilitytype=intto--portargument for proper type validationdaemonattribute todaemon_mainfor clarityConfiguration Parser (config.py)
MRoute.matches_group()method to support CIDR prefix matching_parse_group_address()to support both single addresses and CIDR networksload_config()Notable Implementation Details
239.1.0.0/24) for wildcard group matchingsource = 0.0.0.0are dynamic (installed on-demand) while explicit source IPs are static (pre-installed)--daemonflag uses aDaemonContextfor proper double-fork daemonizationhttps://claude.ai/code/session_011SHzjaNfRzKskvoWur8xD9