diff options
-rw-r--r-- | .travis.yml | 7 | ||||
-rw-r--r-- | README.mkd | 2 | ||||
-rw-r--r-- | doc-src/transparent/osx.html | 12 | ||||
-rw-r--r-- | libmproxy/proxy.py | 4 | ||||
-rw-r--r-- | requirements.txt | 15 |
5 files changed, 37 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index 5f4a3602..c1084319 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,13 @@ python: - "2.7" # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: + - "pip install coveralls --use-mirrors" + - "pip install nose-cov --use-mirrors" - "pip install -r requirements.txt --use-mirrors" - "pip install --upgrade git+https://github.com/mitmproxy/netlib.git" - "pip install --upgrade git+https://github.com/mitmproxy/pathod.git" # command to run tests, e.g. python setup.py test -script: nosetests
\ No newline at end of file +script: + - "nosetests --with-cov --cov-report term-missing" +after_success: + - coveralls
\ No newline at end of file @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/mitmproxy/mitmproxy.png)](https://travis-ci.org/mitmproxy/mitmproxy) [![Coverage Status](https://coveralls.io/repos/mitmproxy/mitmproxy/badge.png)](https://coveralls.io/r/mitmproxy/mitmproxy) + __mitmproxy__ is an interactive, SSL-capable man-in-the-middle proxy for HTTP with a console interface. diff --git a/doc-src/transparent/osx.html b/doc-src/transparent/osx.html index 77eea63b..205e4c76 100644 --- a/doc-src/transparent/osx.html +++ b/doc-src/transparent/osx.html @@ -67,3 +67,15 @@ rdr on en2 inet proto tcp to any port 443 -> 127.0.0.1 port 8080 </ol> + +Note that the **rdr** rules in the pf.conf given above only apply to inbound +traffic. This means that they will NOT redirect traffic coming from the box +running pf itself. We can't distinguish between an outbound connection from a +non-mitmproxy app, and an outbound connection from mitmproxy itself - if you +want to intercept your OSX traffic, you should use an external host to run +mitmproxy. None the less, pf is flexible to cater for a range of creative +possibilities, like intercepting traffic emanating from VMs. See the +**pf.conf** man page for more. + + + diff --git a/libmproxy/proxy.py b/libmproxy/proxy.py index 75a54192..790ae18a 100644 --- a/libmproxy/proxy.py +++ b/libmproxy/proxy.py @@ -258,13 +258,13 @@ class ProxyHandler(tcp.BaseHandler): else: response = response_reply self.send_response(response) - if request and http.request_connection_close(request.httpversion, request.headers): + if request and http.connection_close(request.httpversion, request.headers): return # We could keep the client connection when the server # connection needs to go away. However, we want to mimic # behaviour as closely as possible to the client, so we # disconnect. - if http.response_connection_close(response.httpversion, response.headers): + if http.connection_close(response.httpversion, response.headers): return except (IOError, ProxyError, http.HttpError, tcp.NetLibError), e: if hasattr(e, "code"): diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..3ecd8ed4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,15 @@ +Flask>=0.9 +Jinja2>=2.7 +MarkupSafe>=0.18 +PIL>=1.1.7 +Werkzeug>=0.8.3 +lxml>=3.2.1 +netlib>=0.9.2 +nose>=1.3.0 +pathod>=0.9.2 +pyOpenSSL>=0.13 +pyasn1>=0.1.7 +requests>=1.2.2 +urwid>=1.1.1 +wsgiref>=0.1.2 +jsbeautifier>=1.4.0
\ No newline at end of file |