Skip to content

Add automatic shutdown mechanism for safer remote mitm6 usage#46

Open
quahac wants to merge 2 commits intodirkjanm:masterfrom
quahac:master
Open

Add automatic shutdown mechanism for safer remote mitm6 usage#46
quahac wants to merge 2 commits intodirkjanm:masterfrom
quahac:master

Conversation

@quahac
Copy link

@quahac quahac commented Dec 5, 2025

This PR introduces an automatic shutdown mechanism for safer use of mitm6, especially in remote or unattended environments.

New functionality:

If no DNS domain filter is provided using --domain, mitm6 will automatically shut down after 15 minutes to prevent unintended impact on the entire network.

A new --timer parameter has been added to configure a custom shutdown time (in minutes), which overrides the default 15-minute timer.

# Default behavior: shuts down after 15 minutes if no domain filter is set
mitm6

# Custom shutdown time (e.g., 5 minutes or longer then 15 minutes) 
mitm6 --timer 5

# Domain filter provided: timer is not applied unless specified
mitm6 --domain example.com

This change adds a safety layer for scenarios where mitm6 may be left running remotely or forgotten, reducing accidental broad network impact.

Introduced a safety mechanism that automatically stops mitm6 after 15 minutes when no DNS domain filters are provided. This prevents unintended broad network impact during default runs. The auto-shutdown is disabled if a custom --timer value is specified, allowing controlled long-running sessions.
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