Commit Graph

6301 Commits

Author SHA1 Message Date
Maximilian Hils
74f2a28e41 minor fixes 2017-03-11 14:46:33 +01:00
Ujjwal Verma
e0382fde2f Changed docs 2017-03-11 11:14:22 +05:30
Ujjwal Verma
25703f8c53 Fixed Replacement test 2017-03-09 23:33:11 +05:30
Ujjwal Verma
07a8c4987a Removed replace-from-file option.Made requested changes 2017-03-09 23:20:35 +05:30
Aldo Cortesi
98b5893855 Merge pull request #2100 from cortesi/options
Options revamp
2017-03-09 12:27:36 +13:00
Aldo Cortesi
53178f35be Send change event when options are reset 2017-03-09 08:53:36 +13:00
Aldo Cortesi
7ea171de4e Merge remote-tracking branch 'upstream/master' into options 2017-03-09 08:33:25 +13:00
Maximilian Hils
44c3c3ed86 Merge pull request #2124 from mitmproxy/opensuse-docs
Add install docs for openSUSE
2017-03-08 20:06:35 +01:00
Maximilian Hils
7bec0c73cf Merge pull request #2121 from mitmproxy/address-leftovers
fix tcp.Address leftovers
2017-03-08 20:06:11 +01:00
Thomas Kriechbaumer
69f7ad21fe Merge pull request #2090 from mitmproxy/fix-pathod-header-doc
pathoc: fix documentation for headers
2017-03-08 18:21:56 +01:00
Maximilian Hils
ca819fb923 add install docs for openSUSE 2017-03-08 17:42:19 +01:00
Maximilian Hils
ebedd2875f Merge pull request #2117 from MatthewShao/jest-dev
Add Javascript tests to Travis CI. (#2093)
2017-03-08 16:54:02 +01:00
Maximilian Hils
927b5707fe fix tcp.Address leftovers
this fixes the issue described in https://github.com/mitmproxy/mitmproxy/issues/2119#issuecomment-285067292
2017-03-08 16:18:34 +01:00
Maximilian Hils
b345f5d432 typing.Type -> type
`typing.Type` should have been `typing.Type[Any]`,
which in turn is equivalent to `type`
2017-03-08 15:17:45 +01:00
Maximilian Hils
63179d9751 core -> core_option_validation
longer, but much clearer for devs who are unfamiliar with the codebase.
2017-03-08 15:17:07 +01:00
Matthew Shao
dae7435135 Update .travis.yml 2017-03-08 13:00:09 +08:00
Matthew Shao
7ff48b8bec Add javascript tests to Travis CI. (#2093) 2017-03-08 09:57:38 +08:00
Maximilian Hils
f276c7a80d change add_option parameter order
name, type, value matches natural language ($x is a bool with a default value of $y)
and also matches the python type annotation order of name: type = value
2017-03-08 00:52:37 +01:00
Maximilian Hils
8707928b16 unify server spec parsing 2017-03-08 00:18:34 +01:00
Aldo Cortesi
f0d6237a96 Merge remote-tracking branch 'upstream/master' into options 2017-03-08 08:22:49 +13:00
Maximilian Hils
cb6240974d Merge pull request #2108 from ayamamori/patch-1
Update tcpproxy.rst
2017-03-07 14:53:27 +01:00
Maximilian Hils
88d48e38af Revert "clearly indentify git-checkout as dev version"
This temporarily reverts commit 3b4d8d6eca,
which broke the snapshot builds.
2017-03-07 14:49:52 +01:00
Maximilian Hils
bda39335b0 fix other occurences of options shortcut 2017-03-07 12:16:23 +01:00
Maximilian Hils
96b798615c Merge pull request #2106 from davidpshaw/python_3_to_master
Updated for python 3
2017-03-07 12:12:47 +01:00
Aldo Cortesi
98ec3b77fe Carefully re-add a small number of short flags
The mechanism for booleans attaches the short flag to whatever the opposite of
the default is.
2017-03-07 21:01:21 +13:00
Aldo Cortesi
aed780bf48 Change the way proxy authetication is specified
We now have one option "proxyauth". If this is "any", we accept any
credentials, if it starts with an @ it's treated as a path to an htpasswd file,
if it is of the form username:password it's a single-user credential.
2017-03-07 20:18:30 +13:00
Aldo Cortesi
b0ba765598 Add type and choices to options dump commets. 2017-03-07 19:29:08 +13:00
Yamamori Akihiro
7ca2913c1a Update tcpproxy.rst
Correction in key short cut for TCP Proxy
2017-03-07 14:15:29 +09:00
Aldo Cortesi
320d8848ab Options tweaks
- Regularise presentation and wording
- Help is mandatory for all options
- Auto-generate wording to say that sequence options can be passed multiple
times on the command-line
2017-03-07 15:23:46 +13:00
Aldo Cortesi
10db254791 Remove less commonly used command-line options
We now have --set, so only options that really deserve it get a dedicated flag.
I'm inclined to strip this back even more. Feel free to argue that YOUR
favourite option deserves special treatment here.
2017-03-07 14:46:28 +13:00
Aldo Cortesi
ac3b0d69cc Add the --set option to set options directly
The --set option is a universal flag for setting options. Some examples:

Turn on a boolean:

mitmdump --set onboarding=false

Add a value to a sequence:

mitumdupm --set setheaders=/foo/bar/voing

Zero a sequence:

mitumdupm --set setheaders
2017-03-07 14:27:50 +13:00
Aldo Cortesi
79f5883c2f Option spacing and coverage 2017-03-07 13:47:39 +13:00
Aldo Cortesi
99a6b0dbc1 Add --options that dumps annotated option defaults 2017-03-07 13:16:28 +13:00
Maximilian Hils
6a4ca68a1c Merge pull request #2101 from s4chin/add-websocket-filter-to-web
web: Add websocket filter
2017-03-06 23:34:13 +01:00
Maximilian Hils
193c707061 Merge pull request #2104 from lymanZerga11/patch-2
Fixes #2102
2017-03-06 23:33:33 +01:00
Maximilian Hils
8b79892246 Merge pull request #2105 from Kriechi/dev-version
clearly indentify git-checkout as dev version
2017-03-06 23:32:59 +01:00
David Shaw
5d82068218 Updated for python 3 2017-03-06 17:30:40 -05:00
Aldo Cortesi
d13df40753 Fix lint 2017-03-07 10:52:28 +13:00
Aldo Cortesi
3d9c2233be Flatten commandline arg structure, extract common run func for tools 2017-03-07 10:51:24 +13:00
Aldo Cortesi
b51df9a0b1 Cleanups and test coverage 2017-03-07 10:28:15 +13:00
Aldo Cortesi
2312cf6fb0 Automate slurping up command-line options
Now that options are completely regular, we can automate reading them out of
arguments, rather than listing them out by hand like savages.
2017-03-07 08:49:19 +13:00
Thomas Kriechbaumer
3b4d8d6eca clearly indentify git-checkout as dev version 2017-03-06 18:40:43 +01:00
lymanZerga11
fd5079b8a6 Update flowlist.py 2017-03-06 23:19:39 +08:00
Aldo Cortesi
edfd62e42a Replacements and setheaders are always strings
Instead of having two representations we have one canonical specification.
Fixing the editor in console is left ot a further patch.
2017-03-06 20:58:51 +13:00
Aldo Cortesi
82163a1e68 Unify mode specification
We now have:

    --mode regular (the default)
    --mode transparent
    --mode socks5
    --mode reverse:SPEC
    --mode upstream:SPEC

Where SPEC is a host specification.
2017-03-06 20:30:49 +13:00
Sachin Kelkar
fa96a1d1ef web: Add websocket filter 2017-03-06 10:20:11 +05:30
Aldo Cortesi
f5fb6972aa Options unification: certs
- Regularise to Sequence[str]
- Move conversion and checking into proxy config object
2017-03-06 15:36:52 +13:00
Aldo Cortesi
9b1f40da37 Options unification: streamfile
We now have one option to control this. If the path is prefixed with a "+" we
append, otherwise we overwrite.
2017-03-06 13:48:37 +13:00
Aldo Cortesi
71a830c836 Options unification: string choices 2017-03-06 13:20:17 +13:00
Aldo Cortesi
e70b46672c Options unification: simple string sequences 2017-03-06 11:56:11 +13:00