Skip to content

Addmore functionality#5

Merged
umerfarok merged 3 commits intomainfrom
addmore-functionality
Feb 1, 2026
Merged

Addmore functionality#5
umerfarok merged 3 commits intomainfrom
addmore-functionality

Conversation

@umerfarok
Copy link
Owner

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- Refactored launcher.py to include OS-specific imports and logging for Windows, macOS, and Linux.
- Added LinuxNetworkMonitor class for Linux-specific network functionalities, including interface management and device control.
- Introduced MacOSNetworkMonitor class for macOS-specific network functionalities, including interface management and device control.
- Updated monitor.py to utilize platform-specific network monitor classes for better modularity and maintainability.
- Improved error handling and logging throughout the codebase for better debugging and user feedback.
- Added new dependencies for macOS and Linux in requirements.txt to support platform-specific features.
…, installation scripts, documentation, and CI workflow.
@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
netmoniter Building Building Preview, Comment Feb 1, 2026 11:25pm

@umerfarok umerfarok merged commit 3443648 into main Feb 1, 2026
4 of 5 checks passed
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 580f416924

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +718 to +721
for iface in self.get_interfaces():
iface_ip = iface.get('ip', '')
if iface_ip and iface_ip.rsplit('.', 1)[0] == gateway_ip.rsplit('.', 1)[0]:
return iface.get('name')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Match gateway subnet without assuming /24 on Windows

The Windows default-interface selection compares only the first three octets (rsplit('.', 1)), which implicitly assumes a /24. On networks with larger subnets (e.g., 10.0.0.0/16 or 172.16.0.0/12), the gateway and host IP can differ in the last octet block, so this comparison fails and the code falls back to a potentially unrelated interface (or None). That breaks later operations that rely on the default interface (e.g., ARP scanning) even though a valid interface exists.

Useful? React with 👍 / 👎.

Comment on lines +128 to +132
with open(rule_file, "w") as f:
f.write(f"table <limited_devices> {{ {ip} }}\n")
f.write(f"queue limit_q on en0 bandwidth {limit_kbps}Kb/s\n")
f.write("block return out quick on en0 from any to <limited_devices> queue limit_q\n")
f.write("block return in quick on en0 from <limited_devices> to any queue limit_q\n")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid hardcoding en0 in macOS pf rules

The pf rules are hardcoded to en0, but many Macs use en1 (or another device) for Wi‑Fi. When the active interface is not en0, both the bandwidth limit and block rules won’t match any traffic, so the requested action silently has no effect. This shows up immediately for users on Wi‑Fi-only systems or with USB/Thunderbolt adapters.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant