api/config-container.yaml

120 lines
2.9 KiB
YAML
Raw Normal View History

x-response-rules: &httpResponseRules
rules:
- pattern: ".*\\.(?i)exe"
2021-01-27 10:29:10 +00:00
matcher: Path
- pattern: "^application/octet-stream$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/sample.exe
2021-01-27 10:29:10 +00:00
- pattern: "^image/jpeg$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.jpg
- pattern: ".*\\.(?i)(jpg|jpeg)"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.jpg
2021-01-27 10:29:10 +00:00
- pattern: "^image/png$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.png
- pattern: ".*\\.(?i)png"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.png
- pattern: ".*\\.(?i)gif"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.gif
- pattern: ".*\\.(?i)ico"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.ico
2021-01-27 10:29:10 +00:00
- pattern: "^text/plain$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.txt
- pattern: ".*\\.(?i)txt"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.txt
2021-01-27 10:29:10 +00:00
- pattern: "^text/html$"
target: Accept
matcher: Header
response: /var/lib/inetmock/fakeFiles/default.html
- pattern: ".*"
2021-01-27 10:29:10 +00:00
matcher: Path
response: /var/lib/inetmock/fakeFiles/default.html
api:
listen: unix:///var/run/inetmock/inetmock.sock
tls:
curve: P256
minTLSVersion: SSL3
includeInsecureCipherSuites: false
validity:
ca:
notBeforeRelative: 17520h
notAfterRelative: 17520h
server:
NotBeforeRelative: 168h
NotAfterRelative: 168h
rootCaCert:
publicKeyPath: /var/lib/inetmock/ca/ca.pem
privateKeyPath: /var/lib/inetmock/ca/ca.key
certCachePath: /var/lib/inetmock/certs
endpoints:
plainHttp:
handler: http_mock
listenAddress: 0.0.0.0
ports:
- 80
- 8080
options:
<<: *httpResponseRules
2021-01-27 10:29:10 +00:00
https:
handler: http_mock
listenAddress: 0.0.0.0
ports:
2021-01-27 10:29:10 +00:00
- 443
- 8443
options:
2021-01-27 10:29:10 +00:00
tls: true
<<: *httpResponseRules
proxy:
handler: http_proxy
listenAddress: 0.0.0.0
ports:
2021-01-27 10:29:10 +00:00
- 3128
options:
target:
ipAddress: 127.0.0.1
port: 80
plainDns:
handler: dns_mock
listenAddress: 0.0.0.0
ports:
- 53
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:
- 853
options:
target:
ipAddress: 127.0.0.1
2021-01-27 10:29:10 +00:00
port: 53
metrics:
handler: metrics_exporter
listenAddress: 0.0.0.0
ports:
- 9110
options:
route: /metrics