aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/optmanager.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Options unification: simple string sequencesAldo Cortesi2017-03-061-0/+9
|
* Options unification: sizesAldo Cortesi2017-03-061-2/+11
| | | | | | | | | | | Start dealing with corner cases: - Sizes are always stored in options as strings - Add a new core addon that's responsible for verifying settings that don't belong to an addon - Add a _processed scratch space on the Options object for processed core values to be stored in. This is pretty dirty, but less dirty than re-parsing values every time. We'll come up with something better down the track.
* Start unifying options and the command-line: intsAldo Cortesi2017-03-051-1/+10
| | | | | | Moves all integer options apart from a few tricky ones like verbosity over to auto generation. Also add a metavar argument to parser generation to support this.
* Start unifying options and the command-line: booleansAldo Cortesi2017-03-051-5/+34
| | | | | | | | | | | | | | | | This commit: - Adds a help field to options - Adds a function to generate parser definitions from options - Uses this to migrate all boolean flags over to the new system - Makes all booleans consistently follow the --foo/--not-foo convention There are a number of things left to be done here: - Argparse doesn't give us a nice way to format --foo --not-foo help. Click does, and moving to click is a goal down the track. - For now, we remove all short aliases. I want to re-evaluate these systematically once we have the new structure in place.
* Revamp optionsAldo Cortesi2017-03-051-60/+87
| | | | | - Options are now explicitly initialized with an add_option method - We have one canonical Options class - ditch dump.Options
* Consolidate option namesAldo Cortesi2017-01-301-2/+10
| | | | | | - Onboarding app options to onboarding* - Console-specific options to console_* - Web-specific options to web_*
* console: add saving of config fileAldo Cortesi2016-12-121-1/+1
|
* options: add a merge method to assimilate optionsAldo Cortesi2016-12-081-0/+15
| | | | Fixes #953
* Minor tweaksAldo Cortesi2016-12-081-6/+7
|
* Replace configargparse with argparse, enable new options loadingAldo Cortesi2016-12-081-0/+1
| | | | | | This commit ditches configargparse and enables the new config file format. The default location is ~/.mitmproxy/config.yaml. Unifying all of the various Options objects will follow in the next patch.
* Add YAML serialization of optionsAldo Cortesi2016-12-081-4/+0
| | | | | This uses ruamel.yaml. The library seems well-supported, and can do in-place modification of config files that retains user comments and file structure.
* options: defaults are a class attributeAldo Cortesi2016-12-081-9/+4
|
* Options - avoid mutation, API cleanup, has_changedAldo Cortesi2016-12-081-0/+1
| | | | | | | | | - Always return a deepcopy of options to avoid accidental mutation of options state. - Remove .get(opt, default). This is an inappropriate API for Options - trying to retrieve an option that doesn't exist should always be an error. - Add the has_changed method that checks if an option differs from the default, use it in mitmproxy console.
* options: save defaults, add .reset() to restore defaultsAldo Cortesi2016-12-081-5/+14
| | | | Use .reset() in console app to clear options.
* Add YAML serialization of optionsAldo Cortesi2016-12-081-0/+70
| | | | | This uses ruamel.yaml. The library seems well-supported, and can do in-place modification of config files that retains user comments and file structure.
* options: defaults are a class attributeAldo Cortesi2016-12-081-10/+18
|
* Add OptManager.subscribe, use it to clean up palettes in consoleAldo Cortesi2016-12-081-0/+23
| | | | .subscribe lets you subscribe a function to a specified set of options.
* Options - avoid mutation, API cleanup, has_changedAldo Cortesi2016-12-081-4/+12
| | | | | | | | | - Always return a deepcopy of options to avoid accidental mutation of options state. - Remove .get(opt, default). This is an inappropriate API for Options - trying to retrieve an option that doesn't exist should always be an error. - Add the has_changed method that checks if an option differs from the default, use it in mitmproxy console.
* options: save defaults, add .reset() to restore defaultsAldo Cortesi2016-12-081-0/+20
| | | | Use .reset() in console app to clear options.
* typecheck options, fix current inconsistenciesMaximilian Hils2016-10-251-1/+12
|
* remove empty lines at beginning of fileThomas Kriechbaumer2016-10-171-1/+0
|
* python3: clean up super and __future__Aldo Cortesi2016-10-171-2/+1
|
* python3: clean up class bracketsAldo Cortesi2016-10-171-1/+1
|
* Zap object base classAldo Cortesi2016-10-171-1/+1
|
* fix #1465, fix ssl_insecureMaximilian Hils2016-08-021-2/+8
|
* Addon iface: .configure(options) -> .configure(options, updated)Aldo Cortesi2016-07-231-9/+9
|
* mitproxy.options -> mitmproxy.optmanager, mitmproxy.flow.options -> ↵Aldo Cortesi2016-07-201-0/+108
mitmproxy.options It might be slightly more felicitous to move optmanager into netlib at some point, especially if we can also use it in pathod. This also consolidates our constants in mitmproxy.options, removing some duplicates.