| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
- Options are now explicitly initialized with an add_option method
- We have one canonical Options class - ditch dump.Options
|
|
|
|
|
|
| |
- Onboarding app options to onboarding*
- Console-specific options to console_*
- Web-specific options to web_*
|
| |
|
|
|
|
| |
Fixes #953
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
Use .reset() in console app to clear options.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
.subscribe lets you subscribe a function to a specified set of options.
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
| |
Use .reset() in console app to clear options.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
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.
|