aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Introduce cuts: a flow dissectorAldo Cortesi2017-04-293-0/+132
| | | | | | | | | | | | | | | | | This PR introduces the cuts addon, a flow dissector that allows you to select and operate on specific components of flows. It also adds the first consumer for cuts - the cuts.save command. Save the content of the focus to /tmp/foo: cuts.save s.content|@focus /tmp/foo Save the URL and response content-type headers for all flows currently shown to file, comma-separated, one flow per line: cuts.save s.url,q.header[content-type]|@focus /tmp/foo We also use this to replace the body save shortcut in the console flowlist.
* command: script.runAldo Cortesi2017-04-291-30/+40
| | | | Plus the flowlist binding adjustments.
* command: flow.revertAldo Cortesi2017-04-291-0/+11
| | | | Plus matching binding in flowlist.
* commands: "replay.client.file" and "replay.server.file"Aldo Cortesi2017-04-292-0/+21
|
* Rework client and server replayAldo Cortesi2017-04-293-11/+9
| | | | | | | | | - Add client.replay [flows], client.replay.stop - Add server.replay [flows], server.replay.stop - The corresponding options for file loading are only read on startup, further changes are ignored. In interactive contexts, replay is started with the commands, not through option changes. - Deprecate flow.replay, use replay.client instead
* command: flow.kill, flow.replayAldo Cortesi2017-04-291-0/+20
| | | | Plus the matching bindings in the flow list.
* commands: markingAldo Cortesi2017-04-292-0/+20
| | | | | Add "view.mark [flows] bool" and "view.mark.toggle [flows]". Use this to rebind marking keys in flowlist.
* commands: view.goAldo Cortesi2017-04-294-27/+80
| | | | | bind G to "view.go -1" bind g to "view.go 0"
* Commands, core update eventAldo Cortesi2017-04-293-14/+19
| | | | | | | | | | | | | | | This patch: - Introduces a core update() event that should be invoked whenever flows are changed outside of the normal lifecycle. - Extend view.resolve to know about @all, which matches all flows in the view. - Add a core flow.resume comand, which resumes flows and broadcasts an update event. - Define flow list bindings for: A -> flow.resume @all a -> flow.resume @focus d -> view.remove @focus z -> view.remove @all
* commands: add a command.command decoratorAldo Cortesi2017-04-282-16/+56
| | | | Use this for our built-ins and the console commands.
* Support unary flow command argumentsAldo Cortesi2017-04-281-3/+10
| | | | Use this to add a console.view.flow command and bind "enter" in flowlist.
* console: start migrating hotkeys to keymapAldo Cortesi2017-04-281-0/+5
| | | | This shifts a set of flow list keys to keymaps. Much more to come.
* command: partialsAldo Cortesi2017-04-281-0/+2
| | | | | Support partial commands in console.command, use it to keybind "i" for intercept, which prompts the user with ":set intercept=".
* commands: add the core command addon, and the command "set"Aldo Cortesi2017-04-281-0/+15
| | | | The set command sets an option using the same syntax as commandline --set.
* console: add a keymapAldo Cortesi2017-04-281-0/+6
| | | | | This sketches out a keymap system for consone, and adds the first few top-level commands and mappings.
* console: interactive command browserAldo Cortesi2017-04-281-0/+2
| | | | | Simple browser that lets users view and select commands interactively. Key binding for this is still to be sorted out.
* Test coverage ++Aldo Cortesi2017-04-274-0/+67
|
* command: save.file flowspec path -> NoneAldo Cortesi2017-04-272-2/+23
| | | | | | | | | Our first user-facing command. The following commands do the obvious things: save.file @marked /tmp/flows save.file @focus /tmp/flows save.file @hidden /tmp/flows save.file "~m get" /tmp/flows
* addons.streamfile -> addons.saveAldo Cortesi2017-04-271-14/+14
| | | | | | | Options: streamfile -> save_stream_file streamfile_filter -> save_stream_filter
* console: flow resolution commandAldo Cortesi2017-04-272-2/+43
| | | | | | | This is our first built-in command, which will be used by very many other commands. Also add a --commands option to dump all commands, analogous to --options.
* Basic outline of the command subsystemAldo Cortesi2017-04-272-26/+61
| | | | | - Add a command manager - Sketch out the type system with a few simple supported types
* Merge pull request #2265 from cortesi/addonsAldo Cortesi2017-04-274-120/+93
|\ | | | | Addons and addon testing
| * Addons and addon testingAldo Cortesi2017-04-264-120/+93
| | | | | | | | | | | | | | | | - 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.
* | Merge pull request #2269 from mhils/issue-2250Maximilian Hils2017-04-261-0/+4
|\ \ | | | | | | fix #2250, add type info to cookie module
| * | fix #2250, add type info to cookie moduleMaximilian Hils2017-04-261-0/+4
| | |
* | | Merge pull request #2258 from mhils/readfileMaximilian Hils2017-04-263-103/+98
|\ \ \ | | | | | | | | Integrate readstdin into readfile
| * | | separate reading from stdin into its own addonMaximilian Hils2017-04-261-54/+63
| | | |
| * | | integrate readstdin into readfile addonMaximilian Hils2017-04-262-83/+63
| | | |
| * | | typecheck: add support for typing.AnyMaximilian Hils2017-04-261-0/+6
| | |/ | |/|
* | | Merge pull request #2268 from mhils/issue-2257Maximilian Hils2017-04-263-62/+98
|\ \ \ | |_|/ |/| | fix #2257
| * | fix #2257Maximilian Hils2017-04-263-62/+98
| |/
* / fix #2228Maximilian Hils2017-04-262-3/+2
|/
* Merge pull request #2262 from Kriechi/reduced-coverage++Aldo Cortesi2017-04-2611-18/+16
|\ | | | | improve tests (extracted from #2011)
| * improve testsThomas Kriechbaumer2017-04-2511-18/+16
| |
* | configure(options, updated) -> configure(updated)Aldo Cortesi2017-04-266-11/+15
| | | | | | | | | | Options are now available globally on ctx, so the first argument of configure is redundant.
* | Move options into ctxAldo Cortesi2017-04-263-147/+150
| | | | | | | | | | | | | | Many addons currently save options on configure(), either as individual options or sometimes by saving the entire options object. The current options should simply be available on the ctx object, simplifying state management for addons considerably.
* | Remove watchdog, solidify script testingAldo Cortesi2017-04-265-117/+78
| | | | | | | | | | | | | | | | - Remove the watchdog dependency. We now just stat the script file every 2 seconds to check for an updated mtime. - Further solidify our script testing, and in particular make the example tests nicer. These should exemplify how we want users to test their own addon scripts. More work on addon testing to follow.
* | Revamp how addons workAldo Cortesi2017-04-2518-228/+202
|/ | | | | | | | | | | | | | | | | | | - Addons now nest, which means that addons can manage addons. This has a number of salutary effects - the scripts addon no longer has to poke into the global addons list, we no longer have to replace/remove/boot-outof parent addons when we load scripts, and this paves the way for making our top-level tools into addons themselves. - All addon calls are now wrapped in a safe execution environment where exceptions are caught, and output to stdout/stderr are intercepted and turned into logs. - We no longer support script arguments in sys.argv - creating an option properly is the only way to pass arguments. This means that all scripts are always directly controllable from interctive tooling, and that arguments are type-checked. For now, I've disabled testing of the har dump example - it needs to be moved to the new argument handling, and become a class addon. I'll address that in a separate patch.
* Fixes #2109Ujjwal Verma2017-04-091-0/+7
|
* fixes ipv6 authority form parsing in CONNECTRobert C Jensen2017-04-071-0/+1
|
* Add tests for set_focusNikhil Soni2017-03-291-0/+16
|
* addon loader: add boot_into, which replaces returning from start()Aldo Cortesi2017-03-256-12/+114
| | | | | While we're here, expand test coverage for addonmanager to 100%, and promote to individual coverage.
* addons: start -> load throughoutAldo Cortesi2017-03-257-26/+26
|
* bump h2Thomas Kriechbaumer2017-03-241-3/+11
|
* Merge pull request #2207 from nikofil/scripts-redirect-stdoutAldo Cortesi2017-03-242-6/+23
|\ | | | | scripts: redirect stdout to ctx.log.warn
| * scripts: redirect stdout to ctx.log.warnNikos Filippakis2017-03-242-6/+23
| | | | | | | | | | | | | | Redirect messages written to stdout in scripts to ctx.log.warn. (closes #1530) Signed-off-by: Nikos Filippakis <nikolaos.filippakis@cern.ch>
* | optmanager: make serialization and loading more robustAldo Cortesi2017-03-241-0/+14
|/ | | | Also handle errors in console options manager.
* move examples tests (#2199)Thomas Kriechbaumer2017-03-224-85/+115
|
* Factor out an io moduleAldo Cortesi2017-03-205-3/+3
| | | | | Include tnetstring - we've made enough changes that this no longer belongs in contrib.
* options: reraise when there's an error with a partial updateAldo Cortesi2017-03-191-2/+6
| | | | Fixes #2174