<commit_before>tamper
======

HTTP proxy that tampers with traffic in supposedly-harmless ways, for testing<commit_msg>Began documentation.<commit_after>tamper
====

HTTP proxy that tampers with traffic in supposedly-harmless ways, for testing.

To specify which filters you want to apply, use the `Tamper-Req-Filters` and
`Tamper-Resp-Filters` request headers. The value of each is a JSON blob specifying
which filters are allowed or which are disallowed. If both `"allow"` and `"disallow"`
are provided, only `"allow"` will be used.

Examples:

Allow 'ShuffleHeaderOrder' and 'RandomizeHeaderCase':

    Tamper-Resp-Filters: {"allow":["ShuffleHeaderOrder","RandomizeHeaderCase"]}

Allow all filters except 'DuplicateHeaders':

    Tamper-Resp-Filters: {"disallow":["DuplicateHeaders"]}

Allow all filters:

    Tamper-Resp-Filters: {"disallow":[]}


Response Filters
====

These filters can be applied to the response before returning it to the client.

ShuffleHeaderOrder
----

Randomly rearranges the order of the headers returned by the server.
{'fraction_non_alphanumeric': 0.09914204003813155, 'fraction_numerical': 0.0, 'mean_word_length': 5.21301775147929, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2027802', 'n_tokens_mistral': 307, 'n_tokens_neox': 295, 'n_words': 115}