mitmproxy / mitmproxy/mitmproxy

mitmproxy allow-hosts is not working on domains only works on ip

Open
#6,279 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/triage
Dominant language
Python
Stars
45.1k
Forks
4.7k
Avg merge
21h 12m
Merged PRs (30d)
16

Description

Problem Description

In regular mode itself when we give domain name mitmweb --allow-hosts 'google.com' is not working. we give IP instead of domain mitmweb --allow-hosts '142.250.217.78' its working fine. mitmignore is working fine for both domain and ip.
Can you please help us to do the allow-host with domain.

Steps to reproduce the behavior:
  1. starting mitmweb with command mitmweb --allow-hosts '142.250.217.78' (its working)
  2. starting mitmweb with command mitmweb --allow-hosts 'google.com' (it is not working)
System Information

Mitmproxy: 9.0.1
Python: 3.11.4
OpenSSL: OpenSSL 3.1.1 30 May 2023
Platform: Windows-10-10.0.22621-SP0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the mitmweb entry point and the implementation of the --allow-hosts option, then reproduce the difference between the documented google.com and 142.250.217.78 commands. Done means domain values are filtered as expected in regular mode, while the existing IP behavior remains working.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.