2020-05-03 08:15:24 +00:00
|
|
|
x-response-rules: &httpResponseRules
|
|
|
|
rules:
|
|
|
|
- pattern: ".*\\.(?i)exe"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
|
|
|
- pattern: "^application/octet-stream$"
|
|
|
|
target: Accept
|
|
|
|
matcher: Header
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/sample.exe
|
2020-12-26 13:11:49 +00:00
|
|
|
- pattern: "^image/jpeg$"
|
|
|
|
target: Accept
|
|
|
|
matcher: Header
|
|
|
|
response: ./assets/fakeFiles/default.jpg
|
2020-05-03 08:15:24 +00:00
|
|
|
- pattern: ".*\\.(?i)(jpg|jpeg)"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.jpg
|
2020-12-26 13:11:49 +00:00
|
|
|
- pattern: "^image/png$"
|
|
|
|
target: Accept
|
|
|
|
matcher: Header
|
|
|
|
response: ./assets/fakeFiles/default.png
|
2020-05-03 08:15:24 +00:00
|
|
|
- pattern: ".*\\.(?i)png"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.png
|
|
|
|
- pattern: ".*\\.(?i)gif"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.gif
|
|
|
|
- pattern: ".*\\.(?i)ico"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.ico
|
2020-12-26 13:11:49 +00:00
|
|
|
- pattern: "^text/plain$"
|
|
|
|
target: Accept
|
|
|
|
matcher: Header
|
|
|
|
response: ./assets/fakeFiles/default.txt
|
2020-05-03 08:15:24 +00:00
|
|
|
- pattern: ".*\\.(?i)txt"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.txt
|
2020-12-26 13:11:49 +00:00
|
|
|
- pattern: "^text/html$"
|
|
|
|
target: Accept
|
|
|
|
matcher: Header
|
|
|
|
response: ./assets/fakeFiles/default.html
|
2020-05-03 08:15:24 +00:00
|
|
|
- pattern: ".*"
|
2020-12-26 13:11:49 +00:00
|
|
|
matcher: Path
|
2020-05-03 08:15:24 +00:00
|
|
|
response: ./assets/fakeFiles/default.html
|
|
|
|
|
|
|
|
api:
|
|
|
|
listen: unix:///var/run/inetmock.sock
|
|
|
|
|
|
|
|
tls:
|
2020-06-24 10:25:34 +00:00
|
|
|
curve: P256
|
|
|
|
minTLSVersion: SSL3
|
|
|
|
includeInsecureCipherSuites: false
|
2020-05-03 08:15:24 +00:00
|
|
|
validity:
|
|
|
|
ca:
|
|
|
|
notBeforeRelative: 17520h
|
|
|
|
notAfterRelative: 17520h
|
|
|
|
server:
|
|
|
|
NotBeforeRelative: 168h
|
|
|
|
NotAfterRelative: 168h
|
|
|
|
rootCaCert:
|
2020-06-15 10:04:08 +00:00
|
|
|
publicKeyPath: ./assets/demoCA/ca.pem
|
|
|
|
privateKeyPath: ./assets/demoCA/ca.key
|
2020-05-03 08:15:24 +00:00
|
|
|
certCachePath: /tmp/inetmock/
|
|
|
|
|
|
|
|
endpoints:
|
|
|
|
plainHttp:
|
|
|
|
handler: http_mock
|
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
2020-12-26 13:11:49 +00:00
|
|
|
- 80
|
|
|
|
- 8080
|
2020-05-03 08:15:24 +00:00
|
|
|
options:
|
|
|
|
<<: *httpResponseRules
|
2021-01-26 17:42:07 +00:00
|
|
|
https:
|
|
|
|
handler: http_mock
|
2020-05-03 08:15:24 +00:00
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
2021-01-26 17:42:07 +00:00
|
|
|
- 443
|
|
|
|
- 8443
|
2020-05-03 08:15:24 +00:00
|
|
|
options:
|
2021-01-26 17:42:07 +00:00
|
|
|
tls: true
|
|
|
|
<<: *httpResponseRules
|
|
|
|
proxy:
|
|
|
|
handler: http_proxy
|
2020-05-03 08:15:24 +00:00
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
2021-01-26 17:42:07 +00:00
|
|
|
- 3128
|
2020-05-03 08:15:24 +00:00
|
|
|
options:
|
|
|
|
target:
|
|
|
|
ipAddress: 127.0.0.1
|
|
|
|
port: 80
|
|
|
|
plainDns:
|
|
|
|
handler: dns_mock
|
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
2020-12-26 13:11:49 +00:00
|
|
|
- 53
|
2020-05-03 08:15:24 +00:00
|
|
|
options:
|
|
|
|
rules:
|
|
|
|
- pattern: ".*\\.google\\.com"
|
|
|
|
response: 1.1.1.1
|
|
|
|
- pattern: ".*\\.reddit\\.com"
|
|
|
|
response: 2.2.2.2
|
|
|
|
fallback:
|
|
|
|
strategy: incremental
|
|
|
|
args:
|
|
|
|
startIP: 10.0.10.0
|
|
|
|
dnsOverTlsDowngrade:
|
|
|
|
handler: tls_interceptor
|
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
2020-12-26 13:11:49 +00:00
|
|
|
- 853
|
2020-05-03 08:15:24 +00:00
|
|
|
options:
|
|
|
|
target:
|
|
|
|
ipAddress: 127.0.0.1
|
2020-10-02 09:56:48 +00:00
|
|
|
port: 53
|
|
|
|
metrics:
|
|
|
|
handler: metrics_exporter
|
|
|
|
listenAddress: 0.0.0.0
|
|
|
|
ports:
|
|
|
|
- 9110
|
|
|
|
options:
|
|
|
|
route: /metrics
|