Skip to content

feat: add macOS compatibility for networking and fix requirements - #5

Closed
Shxdy10 wants to merge 1 commit into
Rishi-Bhati:mainfrom
Shxdy10:main
Closed

feat: add macOS compatibility for networking and fix requirements#5
Shxdy10 wants to merge 1 commit into
Rishi-Bhati:mainfrom
Shxdy10:main

Conversation

@Shxdy10

@Shxdy10 Shxdy10 commented May 5, 2026

Copy link
Copy Markdown

Overview

This Pull Request introduces full compatibility for macOS (Darwin) systems. Previously, the tool was restricted to Linux environments due to its reliance on the iproute2 suite and the /proc filesystem.

Key Changes

Platform-Aware Utilities: Updated core/platform_utils.py to identify the Darwin kernel and bypass Linux-specific process probing that caused crashes on startup.

BSD Networking Support: Re-implemented get_active_interfaces in core/interface.py to use ifconfig and netstat. This allows the tool to correctly identify active hardware interfaces (e.g., en0) on macOS.

Darwin Routing Logic: Updated core/router.py to use the BSD route command for interface binding. This serves as a functional alternative to Linux Network Namespaces (ip netns), forcing application traffic through the specified gateway.

Dependency Fix: Resolved a version conflict in requirements.txt specifically regarding the click library to ensure a stable environment across platforms.

Testing Environment

Hardware: MacBook Air (Apple Silicon M5)

OS: macOS 15+

Verification:

Confirmed routing table modifications using netstat -nr.

Verified that Linux-specific code remains isolated in else blocks to prevent regressions for existing users.

@Rishi-Bhati Rishi-Bhati closed this May 6, 2026
@Rishi-Bhati

Copy link
Copy Markdown
Owner

closed

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.

2 participants