mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-05-12 17:48:49 +08:00
add --ignore ui indication
This commit is contained in:
@@ -10,6 +10,10 @@ CONF_BASENAME = "mitmproxy"
|
||||
CONF_DIR = "~/.mitmproxy"
|
||||
|
||||
|
||||
def parse_host_pattern(patterns):
|
||||
return [re.compile(p, re.IGNORECASE) for p in patterns]
|
||||
|
||||
|
||||
class ProxyConfig:
|
||||
def __init__(self, confdir=CONF_DIR, ca_file=None, clientcerts=None,
|
||||
no_upstream_cert=False, body_size_limit=None,
|
||||
@@ -41,7 +45,7 @@ class ProxyConfig:
|
||||
self.get_upstream_server = get_upstream_server
|
||||
self.http_form_in = http_form_in
|
||||
self.http_form_out = http_form_out
|
||||
self.ignore = [re.compile(i, re.IGNORECASE) for i in ignore]
|
||||
self.ignore = parse_host_pattern(ignore)
|
||||
self.authenticator = authenticator
|
||||
self.confdir = os.path.expanduser(confdir)
|
||||
self.ca_file = ca_file or os.path.join(self.confdir, CONF_BASENAME + "-ca.pem")
|
||||
|
||||
Reference in New Issue
Block a user