Skip to content

Commit 6bb565f

Browse files
author
yongzhi.yang
committed
Test yml.
1 parent f7a42d5 commit 6bb565f

File tree

4 files changed

+164
-0
lines changed

4 files changed

+164
-0
lines changed

examples/dmall/both.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Network and HTTP screwer.
2+
description: Slow network to mobile levels, and add 1s delay to all messages
3+
loglevel: 1
4+
5+
proxy:
6+
- name: http_proxy
7+
config:
8+
host: 0.0.0.0
9+
port: 8527
10+
protocol: http
11+
proxy_host: 192.168.8.228
12+
proxy_port: 8527
13+
proxy_protocol: http
14+
- name: tcp_proxy
15+
config:
16+
host: 0.0.0.0 # Local address to bind to and accept connections. May be an IP/hostname
17+
port: 9527 # Local port to bind to
18+
proxy_host: 192.168.8.228 # Proxy server port
19+
proxy_port: 9527 # Proxied server port
20+
nagles_algorithm: true # Use Nagles algorithm?
21+
packet_size: 64 # Size of each contiguous network packet to proxy
22+
middleware:
23+
- name: logger
24+
config:
25+
hex_output: false
26+
- name: delay
27+
config:
28+
request_delay: 2000
29+
response_delay: 1500
30+
## Network Shaper - Layer 4 Tamperer.
31+
#
32+
# Uses Comcast (github.com/tylertreat/comcast) to shape and interfere with network traffic,
33+
# including bandwidth, latency, packet loss and jitter on specified ports, IPs and protocols.
34+
#
35+
# NOTE: This plugin requires root/sudo access to run
36+
#
37+
- name: network_shape
38+
config:
39+
latency: 1000 # Latency to add in ms
40+
target_bw: 20 # Bandwidth in kbits/s
41+
packet_loss: 30 # Packet loss, as a %
42+
target_ips: # Target ipv4 IP addresses/CIDRs
43+
- "0.0.0.0/0"
44+
target_ips6: # Target ipv6 IP addresses
45+
- "::1/128"
46+
target_ports: # Target destination ports
47+
#- "8527"
48+
# - "5001" # - "1:65535" # Ranges also valid
49+
- "1:65535"
50+
target_protos: # Target protocols
51+
- "tcp"
52+
- "udp"
53+
- "icmp"

examples/dmall/middleware.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Network and HTTP screwer.
2+
description: Slow network to mobile levels, and add 1s delay to all messages
3+
loglevel: 1
4+
5+
middleware:
6+
- name: logger
7+
config:
8+
hex_output: false
9+
- name: delay
10+
config:
11+
request_delay: 500
12+
response_delay: 500
13+
## Network Shaper - Layer 4 Tamperer.
14+
#
15+
# Uses Comcast (github.com/tylertreat/comcast) to shape and interfere with network traffic,
16+
# including bandwidth, latency, packet loss and jitter on specified ports, IPs and protocols.
17+
#
18+
# NOTE: This plugin requires root/sudo access to run
19+
#
20+
- name: network_shape
21+
config:
22+
latency: 800 # Latency to add in ms
23+
target_bw: 3 # Bandwidth in kbits/s
24+
packet_loss: 30 # Packet loss, as a %
25+
target_ips: # Target ipv4 IP addresses/CIDRs
26+
- "0.0.0.0/0"
27+
# - "10.12.194.192"
28+
target_ips6: # Target ipv6 IP addresses
29+
- "::1/128"
30+
target_ports: # Target destination ports
31+
# - "1025:65535"
32+
- "5001,8527"
33+
target_protos: # Target protocols
34+
- "tcp"
35+
- "udp"
36+
- "icmp"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Network and HTTP screwer.
2+
description: Slow network to mobile levels, and add 1s delay to all messages
3+
loglevel: 1
4+
5+
middleware:
6+
- name: logger
7+
config:
8+
hex_output: false
9+
- name: delay
10+
config:
11+
request_delay: 500
12+
response_delay: 500
13+
## Network Shaper - Layer 4 Tamperer.
14+
#
15+
# Uses Comcast (github.com/tylertreat/comcast) to shape and interfere with network traffic,
16+
# including bandwidth, latency, packet loss and jitter on specified ports, IPs and protocols.
17+
#
18+
# NOTE: This plugin requires root/sudo access to run
19+
#
20+
- name: network_shape
21+
config:
22+
latency: 800 # Latency to add in ms
23+
target_bw: 3 # Bandwidth in kbits/s
24+
packet_loss: 30 # Packet loss, as a %
25+
target_ips: # Target ipv4 IP addresses/CIDRs
26+
- "10.12.194.192"
27+
target_ips6: # Target ipv6 IP addresses
28+
- "::1/128"
29+
target_ports: # Target destination ports
30+
# - "1025:65535"
31+
- "5001,8527"
32+
target_protos: # Target protocols
33+
- "icmp"
34+
- name: network_shape_test
35+
config:
36+
latency: 1500
37+
target_bw: 30
38+
packet_loss: 80
39+
target_ips:
40+
- "0.0.0.0/0"
41+
target_ips6:
42+
- "::1/128"
43+
target_ports:
44+
- "5001,8527"
45+
target_protos:
46+
- "tcp"

examples/dmall/proxy.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Network and HTTP screwer.
2+
description: Slow network to mobile levels, and add 1s delay to all messages
3+
loglevel: 1
4+
5+
proxy:
6+
- name: http_proxy
7+
config:
8+
host: 0.0.0.0
9+
port: 8527
10+
protocol: http
11+
proxy_host: 192.168.8.228
12+
proxy_port: 8527
13+
proxy_protocol: http
14+
- name: tcp_proxy
15+
config:
16+
host: 0.0.0.0 # Local address to bind to and accept connections. May be an IP/hostname
17+
port: 9527 # Local port to bind to
18+
proxy_host: 192.168.8.228 # Proxy server port
19+
proxy_port: 9527 # Proxied server port
20+
nagles_algorithm: true # Use Nagles algorithm?
21+
packet_size: 64 # Size of each contiguous network packet to proxy
22+
middleware:
23+
- name: logger
24+
config:
25+
hex_output: false
26+
- name: delay
27+
config:
28+
request_delay: 2000
29+
response_delay: 1500

0 commit comments

Comments
 (0)