-
Notifications
You must be signed in to change notification settings - Fork 31
/
config.yml
130 lines (120 loc) · 4.25 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
## Test configuration name. Used for reporting.
name: Network and HTTP screwer.
## Test Description. Used for reporting
description: Slow network to mobile levels, and add 1s delay to all messages
## Specify log output level
##
## Log Levels supported:
## Trace (0), Debug (1), Info (2, Default), Warn (3), Error (4), Fatal (5)
loglevel: 1
## Configure a proxy that will handle your requests, and forward
## to proxied host.
##
## Currently supports `tcp_proxy` and `http_proxy`.
proxy:
# Configures a TCP proxy
#
# NOTE: TLS is currently not supported
- name: tcp_proxy
config:
host: 0.0.0.0 # Local address to bind to and accept connections. May be an IP/hostname
port: 8080 # Local port to bind to
proxy_host: 0.0.0.0 # Proxy server port
proxy_port: 2000 # Proxied server port
nagles_algorithm: true # Use Nagles algorithm?
packet_size: 64 # Size of each contiguous network packet to proxy
## HTTP Proxy: Configures an HTTP Proxy
##
## NOTE: SSL is currently not supported
- name: http_proxy
config:
host: 0.0.0.0
port: 8181
protocol: http
proxy_host: 0.0.0.0
proxy_port: 8282
proxy_protocol: http
## Middleware
##
## Middleware are plugins that are given the opportunity to intervene
## before a request is dispatched to the proxied system (PRE_DISPATCH event)
## and afterwards (POST_DISPATCH event). They are given a reference to
## the current context (HTTP Context or []bytes) and can mutate them.
##
## Middleware are executed in the order specified in this config.
##
middleware:
## HTTP Tamperer - Messes with Layer 7.
##
## Useful for messing with the HTTP protocol
##
- name: http_tamperer
config:
request:
method: "GET" # Override request method
headers:
x_my_request: "foo" # Override request header
content_type: "application/x-www-form-urlencoded"
content_length: "5"
cookies: # Custom request cookies
- name: "fooreq"
value: "blahaoeuaoeu"
domain: "localhost"
path: "/foopath"
secure: true
rawexpires: "Sat, 12 Sep 2015 09:19:48 UTC"
maxage: 200
httponly: true
body: "wow, new body!" # Override request body
response:
status: 201 # Override HTTP Status code
headers: # Override response headers
content_length: "27"
x_foo_bar: "baz"
body: "my new body" # Override response body
cookies: # Custom response cookies
- name: "foo"
value: "blahaoeuaoeu"
domain: "localhost"
path: "/foopath"
secure: true
rawexpires: "Sat, 12 Sep 2015 09:19:48 UTC"
maxage: 200
httponly: true
## Request Logger - use this to see what's going in/out of the Proxy.
##
##
- name: logger
config:
hex_output: false # Display output as Hex instead of a string
## HTTP/TCP Response delay
##
## Simple middleware that delays an HTTP response up to `delay` seconds
##
- name: delay
config:
request_delay: 100 # Delay in ms to apply to request
response_delay: 500 # Delay in ms to apply to response
## Network Shaper - Layer 4 Tamperer.
##
## Uses Comcast (github.com/tylertreat/comcast) to shape and interfere with network traffic,
## including bandwidth, latency, packet loss and jitter on specified ports, IPs and protocols.
##
## NOTE: This plugin requires root/sudo access to run
##
- name: network_shape
config:
latency: 250 # Latency to add in ms
target_bw: 750 # Bandwidth in kbits/s
packet_loss: 0.5 # Packet loss, as a %
target_ips: # Target ipv4 IP addresses/CIDRs
- "0.0.0.0/0"
target_ips6: # Target ipv6 IP addresses
- "::1/128"
target_ports: # Target destination ports
- "80"
- "1:65535" # Ranges also valid
target_protos: # Target protocols
- "tcp"
- "udp"
- "icmp"