Commit Graph

101 Commits

Author SHA1 Message Date
Aldo Cortesi
850a50262b console: add a -l flag to set the limit on startup 2015-04-15 12:56:43 +12:00
Aldo Cortesi
f6a3bd15b3 console: All palettes now explicitly set a background colour
There's a new option --palette-transparent to turn this off if you want
to use your own terminal background.
2015-04-07 10:01:18 +12:00
Aldo Cortesi
1cb1ee411b console: palette picker for the options screen 2015-04-07 08:42:40 +12:00
Maximilian Hils
42cd942b64 web: initial attempt at header editor 2015-03-27 15:30:19 +01:00
Maximilian Hils
3650d73662 Merge remote-tracking branch 'onlywade/master'
Conflicts:
	libmproxy/console/__init__.py
	libmproxy/console/flowlist.py
2015-03-15 14:36:06 +01:00
Aldo Cortesi
0d59c2da97 Better error when invalid palette is specified 2015-03-12 22:56:47 +11:00
Wade Catron
803d631f04 Adding a server replay option to ignore host when searching for matching requests 2015-03-08 10:21:57 -07:00
Marcelo Glezer
9695377b28 first steps in scenario support 2015-01-05 18:12:38 -03:00
Maximilian Hils
c152e5da1a we do not support https2http in upstream proxy mode 2015-01-01 22:07:49 +01:00
Aldo Cortesi
d33d125214 Documentation for config files 2014-12-28 22:35:14 +13:00
Aldo Cortesi
0cc8c44c22 Minor improvements to osx binary build process
- Add --shortversion on tools to make packaging easier
- Automate tarfile generation
2014-12-28 15:07:44 +13:00
Marcelo Glezer
7e1b35bfc7 --replay_ignore_payload_params added, to filter params in form posts 2014-12-18 17:56:27 -03:00
Marcelo Glezer
14a3e0073f append file mode for saving flows merged to master 2014-12-11 15:21:33 -03:00
Aldo Cortesi
aa77a52a06 One common --version flag 2014-11-15 17:58:38 +13:00
Aldo Cortesi
23a4f159fd Remove last vestiges of argparse 2014-11-15 17:51:21 +13:00
Aldo Cortesi
7d76f3e992 Make sure all command-line arguments have a long form
... so they can be used in config files
2014-11-15 17:41:04 +13:00
Aldo Cortesi
09c503563a Enable config file parsing
We support 4 different config files:

~/.mitmproxy/common.conf:       Options that are common to all tools
~/.mitmproxy/mitmproxy.conf:    Options for mitmproxy
~/.mitmproxy/mitmdump.conf:     Options for mitmdump
~/.mitmproxy/mitmweb.conf:      Options for mitmweb

Options in the tool-specific config files over-ride options in common.conf. If
a non-common option is put in common.conf, an error will be raised if a
non-supporting tool is used.
2014-11-15 17:25:05 +13:00
Aldo Cortesi
6c1dc4522d Refactor command-line argument definition
- Argument definitions live in cmdline.py
- Parsing and initial processing lives in main.py
2014-11-15 16:29:38 +13:00
Aldo Cortesi
24c4df07e3 First-order integration of configargparser to add config file support 2014-11-15 16:14:08 +13:00
Aldo Cortesi
16654ad6a4 Fix crash while streaming
Found using fuzzing. Reproduction with pathoc, given "mitmproxy -s" and
pathod running on 9999:

get:'http://localhost:9999/p/':s'200:b\'foo\':h\'Content-Length\'=\'3\'':i58,'\x1a':r

 return flow.FlowMaster.run(self)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 111, in run
     self.tick(self.masterq, 0.01)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 613, in tick
     return controller.Master.tick(self, q, timeout)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 101, in tick
     self.handle(*msg)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/controller.py", line 118, in handle
     m(obj)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 738, in handle_responseheaders
     self.stream_large_bodies.run(f, False)
   File "/Users/aldo/mitmproxy/mitmproxy/libmproxy/flow.py", line 155, in run
     r.headers, is_request, flow.request.method, code
   File "/Users/aldo/mitmproxy/mitmproxy/netlib/http.py", line 401, in expected_http_body_size
     raise HttpError(400 if is_request else 502, "Invalid content-length header: %s" % headers["content-length"])
 netlib.http.HttpError: Invalid content-length header: ['\x1a3']
2014-10-26 17:58:36 +13:00
Maximilian Hils
e114858438 add generic tcp proxying, fix #374 2014-10-18 18:29:35 +02:00
Maximilian Hils
52b29d4926 remove default_ca 2014-10-18 15:26:10 +02:00
Maximilian Hils
7c56a3bb01 Add SOCKS5 mode, fix #305 2014-10-09 01:59:02 +02:00
Marcelo Glezer
81f5636389 --replay-ignore-content & --replay-ignore-param ported from branch 0.10 2014-10-03 07:29:44 -03:00
Aldo Cortesi
6812d304a1 Basic web service and options 2014-09-14 12:22:28 +12:00
Aldo Cortesi
17868f61a9 Remove external app option, make tick timeout explicit 2014-09-14 11:46:01 +12:00
Maximilian Hils
d06b4bfa4e remove proxy mode abstraction: always be clear which mode we are in 2014-09-08 14:32:42 +02:00
Maximilian Hils
b6c8a22b67 coverage++ 2014-09-06 12:23:05 +02:00
Maximilian Hils
bb2ce689a9 adjust to netlib changes 2014-08-17 23:06:25 +02:00
Maximilian Hils
ecf8081ba6 implement passthrough mode, fixes #175 2014-08-09 03:03:21 +02:00
Maximilian Hils
4b4a18a2e4 add --stream options, various fixes 2014-07-21 21:06:55 +02:00
Maximilian Hils
5fed5753b4 fix command line help 2014-07-06 02:15:54 +02:00
Aldo Cortesi
1dba379ae9 Fix proxy options 2014-04-12 17:57:19 +12:00
Maximilian Hils
a66913d4a3 forward proxy -> upstream proxy 2014-03-14 00:02:00 +01:00
Maximilian Hils
4e17b00ce8 order command line options, add disting proxy option group 2014-03-13 23:43:26 +01:00
Maximilian Hils
843b2e28bc adjust command line docs, fix log typo 2014-03-13 23:25:13 +01:00
Maximilian Hils
1bfc164692 adjust tests, fix option handling 2014-03-13 01:22:12 +01:00
Maximilian Hils
7e86744226 add -d switch to mitmdump to compensate for old verbosity functionality 2014-03-12 22:39:23 +01:00
Maximilian Hils
aefb30ea60 restrict -e to mitmproxy only (not mitmdump) 2014-03-12 22:13:00 +01:00
Maximilian Hils
c1fff51b1b always use relative imports, fix status bar bug 2014-03-10 22:36:47 +01:00
Maximilian Hils
9cc10630c8 update docs, fix #215 2014-03-10 17:01:30 +01:00
Maximilian Hils
fe58c1c6eb add advanced proxying options, add SSL-terminating capability to mitmproxy 2014-03-10 05:11:51 +01:00
Maximilian Hils
5598a8de82 finish proxy.py split up 2014-03-09 21:51:24 +01:00
Aldo Cortesi
f373ac5b6c Improve explicit certificate specification
- Support cert/key in the same PEM file
- Rationalize arguments, expand tests, clean up a bit
2014-03-02 17:27:24 +13:00
Aldo Cortesi
2df321e71b Use the mitm.it domain for the app, turn it on by default. 2014-01-27 14:37:29 +13:00
Aldo Cortesi
7ddc941116 Silence pyflakes
And pick up one bug as a consequence.
2014-01-19 18:16:24 +13:00
Aldo Cortesi
42d4a2fae9 Script refactoring: move script command parsing into script module. 2014-01-12 23:02:29 +13:00
Aldo Cortesi
3aa4b6603c Fix app in mitmproxy console, update to bootstrap 3. 2014-01-03 15:29:32 +13:00
Maximilian Hils
a509a9037b Merge branch 'master' into 0.10 2013-12-08 14:14:57 +01:00
Aldo Cortesi
3a1d85ab18 Merge pull request #134 from mhils/scripts_improvements
Support multiple scripts and script arguments. refs #76
2013-12-08 01:14:12 -08:00