feat: MITM transparent proxy server mode - #2
Draft
Secret297-CODER-SOURCE with Copilot wants to merge 3 commits into
Draft
feat: MITM transparent proxy server mode#2Secret297-CODER-SOURCE with Copilot wants to merge 3 commits into
Secret297-CODER-SOURCE with Copilot wants to merge 3 commits into
Conversation
- arp_spoof.py: run ARP spoofing in a background daemon thread (start_arp_spoof_thread / stop_arp_spoof_thread / is_arp_spoofing) - proxy_server.py: launch/stop mitmdump in transparent mode, log intercepted traffic to /tmp/sniff-ng-traffic.log - dependency_manager.py: auto-install netifaces Python package - console_ui.py: new "MITM-прокси (перехват трафика)" menu item with mitm_proxy_ui() that orchestrates select-targets → IP-forwarding → iptables → ARP spoof → mitmproxy start/stop Agent-Logs-Url: https://github.com/Secret297-CODER-SOURCE/Sniff-NG/sessions/ddb9bb68-e0b5-44a9-816c-9b1236bca438 Co-authored-by: Secret297-CODER-SOURCE <73541046+Secret297-CODER-SOURCE@users.noreply.github.com>
- proxy_server.py: store and close log file handle in stop_mitmproxy() - arp_spoof.py: remove duplicate _stop_event.clear() inside arp_spoof_attack - console_ui.py: extract _device_ip() helper for consistent IP extraction; log ARP restore errors via restore_errors list displayed to user Agent-Logs-Url: https://github.com/Secret297-CODER-SOURCE/Sniff-NG/sessions/ddb9bb68-e0b5-44a9-816c-9b1236bca438 Co-authored-by: Secret297-CODER-SOURCE <73541046+Secret297-CODER-SOURCE@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Secret297-CODER-SOURCE
April 11, 2026 10:45
View session
- Updated arp_spoof_attack to accept multiple target IPs. - Added functions to detect default gateway and local IP for target. - Improved device selection UI for network scanning. - Enhanced error handling and user feedback in the UI. - Updated README to reflect support for macOS and new features.
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.
Adds an end-to-end MITM interception mode so the host can act as a transparent traffic proxy — combining ARP spoofing, IP forwarding, iptables redirect, and mitmproxy into a single TUI-driven workflow.
New:
proxy_server.pyWraps
mitmdumpin transparent mode. Manages the subprocess lifecycle and log file handle cleanly.arp_spoof.py— background threadingarp_spoof_attackpreviously blocked forever (while True). Replaced with athreading.Event-based stop mechanism and new thread management API:console_ui.py— new "MITM-прокси" menu entryNew
mitm_proxy_ui()orchestrates the full attack chain in order:sysctlIP forwarding oniptablesredirect 80/443 → 8080mitmdumptransparent proxyS starts, X tears everything down (stops proxy, joins spoof thread, restores ARP tables, clears iptables, disables forwarding). ARP restore failures are surfaced to the user rather than silently swallowed.
dependency_manager.pyAdded
netifacesto the auto-install list — it was used inconsole_ui.pybut never installed automatically.