aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/optmanager.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix for issue 3797Gilgamesh2020-01-241-2/+1
|
* update mypyMaximilian Hils2019-11-121-1/+3
|
* fix sequence option declaration in yaml filesMaximilian Hils2019-07-181-1/+3
|
* optmanager: tweaks and cleanupsAldo Cortesi2018-05-271-5/+5
|
* Use deferral mechanism for cfg file optionsAldo Cortesi2018-05-271-12/+10
| | | | Fixes #3162
* Adjust options when changedGrant Murphy2018-05-251-0/+1
| | | | | | | | The existing options for the console were not being updated when a new addon was added. This triggers the changed blinker signal when an option is added, and also recreates self.opts when this signal is received. Fixes #3147
* optmanager: refactor for coverage and clarityAldo Cortesi2018-05-081-9/+5
|
* options: add the concept of deferred settingsAldo Cortesi2018-05-081-16/+48
| | | | | | | | | | | We've had a perpetual sequencing problem with addon startup. Users need to be able to specify options to addons on the command-line, before addons are actually loaded. This is only exacerbated with the new async core, where load order can't be relied on. This patch introduces deferred options. Options passed with "--set" on the command line are deferred if they are unknown, and are automatically applied by the addon manager once matching addons are registered and their options are defined.
* Start moving addon options into /addonsAldo Cortesi2018-02-241-0/+7
| | | | | | | | | This takes the first few steps: - Extends taddons to make loading addon options easier - Removes dependencies in the test suite on options in addons - Tweaks command-line parser autocreation to ignore nonexistent options. This lets us load common options without over-depending on loaded addons.
* fix optmanager equality check and deepcopyMaximilian Hils2017-08-051-3/+7
|
* Merge pull request #2487 from mhils/no-option-processingMaximilian Hils2017-08-011-1/+0
|\ | | | | Remove OptManager._processed
| * remove OptManager._processedMaximilian Hils2017-07-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | Instead of having the core addon do postprocessing on body_size_limit, we add a cache to the parsing function. First, this avoids any potential issues with options and _processed getting out of sync. As anecdotal evidence, the previous implementation did not clear _processed when body_size_limit was reset to None. Second, it achieves the same end result without introducing a new concept of a "_processed" scratch space. Third, it works even if addons aren't present, and does not require workarounds as previously present in test_http2.py. refs https://github.com/mitmproxy/mitmproxy/pull/2484#pullrequestreview-53101507
* | add OptManager.itemsMaximilian Hils2017-07-291-0/+3
|/
* Squashed commit of the following:Maximilian Hils2017-07-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit edfbd41200a854f0bb7bb99f8bb70af9dbb9b8e0 Author: Matt Weidner <matt.weidner@gmail.com> Date: Tue Jul 25 01:19:53 2017 -0500 Extended view.load test to check for unhandled IOError exception. commit a523b534bc59ea97ed1fd5a3e6f78112fee19b6f Author: requires.io <support@requires.io> Date: Mon Jul 24 21:25:04 2017 +0200 [requires.io] dependency update commit c725540c6eb92c003616b649ba43bee1f14e56ac Author: Thomas Kriechbaumer <thomas@kriechbaumer.name> Date: Mon Jul 24 21:01:25 2017 +0200 update travis commit eeb6cfb4c76e60ac1813b839f589cd489c041c6c Author: Thomas Kriechbaumer <Kriechi@users.noreply.github.com> Date: Mon Jul 24 21:03:14 2017 +0200 [requires.io] dependency update on master branch (#2435) commit 51a2672c782ee8ba8c7d5c7116073feccb4d8430 Author: Maximilian Hils <git@maximilianhils.com> Date: Mon Jul 24 19:03:01 2017 +0200 require latest mypy version (refs #2452) commit 5685a4850af6edda7100cae900487955c8b7a3ab Author: Maximilian Hils <git@maximilianhils.com> Date: Fri Jul 21 11:24:42 2017 +0200 fix addon tracebacks `.tb_next` discards the first interesting frame, this shouldn't happen. commit a2da9b6c02030293f3a412d16df819868c581a29 Author: Matt Weidner <matt.weidner@gmail.com> Date: Sat Jul 22 12:30:15 2017 -0500 Added os.path.expanduser() before open() calls with user supplied paths commit 05db6e32c7957f267e97c34aa8f5a3cd6cb7dbb2 Author: Matt Weidner <matt.weidner@gmail.com> Date: Fri Jul 21 16:25:16 2017 -0500 Added support for the ~ path shortcut when loading flows from disk. for consistency. Saving flows supports using paths with the ~ shortcut. commit b7f864b6bbd221093aeb1c384dd16038f490441a Author: Matt Weidner <matt.weidner@gmail.com> Date: Fri Jul 21 16:06:38 2017 -0500 Fixed crash when loading flows from a file that does not exist
* [web] Add keys argument for dump_dict in optmanager.Matthew Shao2017-07-051-2/+3
|
* [web] Change the response format of GET /options.Matthew Shao2017-07-021-5/+4
|
* Merge pull request #2395 from MatthewShao/mitmweb-optionsMaximilian Hils2017-06-241-9/+24
|\ | | | | [WIP] Add RESTful API for mitmweb option
| * Minor Update for /options API of mitmweb.Matthew Shao2017-06-241-9/+2
| |
| * Add typesepc_to_str function to mitmproxy/utils/typechck.pyMatthew Shao2017-06-131-8/+1
| |
| * Minor Update and add test.Matthew Shao2017-06-131-2/+17
| |
| * Add GET /options RESTful API for mitmweb.Matthew Shao2017-06-121-0/+14
| |
* | config: don't crash with a config file containing only commentsAldo Cortesi2017-06-131-0/+2
|/
* console: start migrating hotkeys to keymapAldo Cortesi2017-04-281-0/+2
| | | | This shifts a set of flow list keys to keymaps. Much more to come.
* Basic outline of the command subsystemAldo Cortesi2017-04-271-2/+2
| | | | | - Add a command manager - Sketch out the type system with a few simple supported types
* Addons and addon testingAldo Cortesi2017-04-261-2/+0
| | | | | | | | - Fix some loading sequence bugs affecting command-line script invocation - Allow addons to over-ride existing options (with a warning). We need this for reloading. - Convert har_dump to new-style arguments, fix and re-instate its test suite. - Covnert miscelaneous other exmples to new-style args.
* optmanager: make serialization and loading more robustAldo Cortesi2017-03-241-10/+25
| | | | Also handle errors in console options manager.
* options: reraise when there's an error with a partial updateAldo Cortesi2017-03-191-1/+1
| | | | Fixes #2174
* optmanager: cope with bound methods in .subscribeAldo Cortesi2017-03-191-5/+14
| | | | Fixes #2122
* console options: in-place editor for simple strings and intsAldo Cortesi2017-03-191-23/+29
|
* console options: better defaults display, g/G/D keyboard shortcutsAldo Cortesi2017-03-191-2/+2
|
* options cleanupsAldo Cortesi2017-03-191-4/+2
| | | | | | - Move default client ciphers - no need to have a 10-line string default. - Add some style guidance on options help - Be consistent about reflowing options help
* console: sketch out look and feel of the new Options editorAldo Cortesi2017-03-191-4/+2
|
* Enable custom options in config filesAldo Cortesi2017-03-141-15/+30
| | | | | We also now ignore unknown options in config files by default, and print a warning if verbosity is incremented.
* Move serialization methods out of OptionsAldo Cortesi2017-03-141-77/+82
| | | | | | Attributes on options share a namespace with options themselves. It's getting too crowded on our Options object, so let's shift some obvious stuff into the module.
* Optmanager: handle unknown options in value setsAldo Cortesi2017-03-141-0/+2
|
* Show custom addon options in --options outputAldo Cortesi2017-03-141-1/+1
|
* Enable custom options for addonsAldo Cortesi2017-03-141-10/+15
| | | | | | | | - Add an options parameter to the start() event. This is to be used by addons on startup to add custom options. - Add a running() event that is called once the proxy is up and running. - With the new paradigm we can't log during master __init__, so add a tiny termstatus addon to print proxy status to terminal once we're running.
* Send change event when options are resetAldo Cortesi2017-03-091-0/+1
|
* typing.Type -> typeMaximilian Hils2017-03-081-2/+2
| | | | | `typing.Type` should have been `typing.Type[Any]`, which in turn is equivalent to `type`
* change add_option parameter orderMaximilian Hils2017-03-081-5/+5
| | | | | 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
* Carefully re-add a small number of short flagsAldo Cortesi2017-03-071-7/+24
| | | | | The mechanism for booleans attaches the short flag to whatever the opposite of the default is.
* Add type and choices to options dump commets.Aldo Cortesi2017-03-071-7/+22
|
* Options tweaksAldo Cortesi2017-03-071-10/+9
| | | | | | | - 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
* Remove less commonly used command-line optionsAldo Cortesi2017-03-071-5/+4
| | | | | | 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.
* Add the --set option to set options directlyAldo Cortesi2017-03-071-0/+39
| | | | | | | | | | | | | | | | 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
* Option spacing and coverageAldo Cortesi2017-03-071-9/+9
|
* Add --options that dumps annotated option defaultsAldo Cortesi2017-03-071-0/+20
|
* Cleanups and test coverageAldo Cortesi2017-03-071-2/+4
|
* Automate slurping up command-line optionsAldo Cortesi2017-03-071-0/+3
| | | | | Now that options are completely regular, we can automate reading them out of arguments, rather than listing them out by hand like savages.
* Options unification: string choicesAldo Cortesi2017-03-061-8/+15
|