From 38ebc8159008ca6b92c4de62e8228493d9b57673 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 30 Jun 2012 11:24:41 +1200 Subject: [PATCH] Add error when -T is passed on an unsupported platform. --- libmproxy/proxy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 392714ffd..af4a83ec6 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -425,6 +425,8 @@ def process_proxy_options(parser, options): parser.errror("Can't set both reverse proxy and transparent proxy.") if options.transparent_proxy: + if not platform.resolver: + parser.error("Transparent mode not supported on this platform.") trans = dict( resolver = platform.resolver, sslports = TRANSPARENT_SSL_PORTS