h2non/toxy

Incoming / outgoing traffic poisoning

h2non opened this issue · 2 comments

h2non commented

Poisons are currently executed in the incoming traffic phase. It would be great to attach poisons that will be executed only when the proxy receives the response from the target server, allowing the poisons to determine when should be executed or not based on the server response.

Actually this feature can be achieve currently via the useResponse() middleware, but a convenient wrapper around it, adding a DSL for toxy, would be better and simple for the API consumers.

The API may look like this:

proxy.outgoingPoison(poison)
proxy.useOutgoingPoison(poison)
  .withRule(rule)

Tasks

  • Add featured test
  • Support filter via HTTP API outgoing and incoming poisons
  • Rename poisons ID in HTTP API to include the poison phase
  • Remove rules by phase
  • Add proper documentation
  • Add poisons phases explanation with proper graph
  • Add API docs
  • Add examples
h2non commented

Related to #26

h2non commented

Hello 0.3.0! Now available in npm