170 lines
No EOL
3.8 KiB
YAML
170 lines
No EOL
3.8 KiB
YAML
x-response-rules: &httpResponseRules
|
|
rules:
|
|
- pattern: ".*\\.(?i)exe"
|
|
matcher: Path
|
|
- pattern: "^application/octet-stream$"
|
|
target: Accept
|
|
matcher: Header
|
|
response: ./assets/fakeFiles/sample.exe
|
|
- pattern: "^image/jpeg$"
|
|
target: Accept
|
|
matcher: Header
|
|
response: ./assets/fakeFiles/default.jpg
|
|
- pattern: ".*\\.(?i)(jpg|jpeg)"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.jpg
|
|
- pattern: "^image/png$"
|
|
target: Accept
|
|
matcher: Header
|
|
response: ./assets/fakeFiles/default.png
|
|
- pattern: ".*\\.(?i)png"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.png
|
|
- pattern: ".*\\.(?i)gif"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.gif
|
|
- pattern: ".*\\.(?i)ico"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.ico
|
|
- pattern: "^text/plain$"
|
|
target: Accept
|
|
matcher: Header
|
|
response: ./assets/fakeFiles/default.txt
|
|
- pattern: ".*\\.(?i)txt"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.txt
|
|
- pattern: "^text/html$"
|
|
target: Accept
|
|
matcher: Header
|
|
response: ./assets/fakeFiles/default.html
|
|
- pattern: ".*"
|
|
matcher: Path
|
|
response: ./assets/fakeFiles/default.html
|
|
|
|
x-http-handlers: &httpHandlers
|
|
endpoints:
|
|
plainHttp:
|
|
handler: http_mock
|
|
tls: false
|
|
options:
|
|
<<: *httpResponseRules
|
|
https:
|
|
handler: http_mock
|
|
tls: true
|
|
options:
|
|
<<: *httpResponseRules
|
|
|
|
data:
|
|
pcap: /var/lib/inetmock/data/pcap
|
|
audit: /var/lib/inetmock/data/audit
|
|
|
|
api:
|
|
listen: unix:///var/run/inetmock.sock
|
|
|
|
tls:
|
|
curve: P256
|
|
minTLSVersion: TLS10
|
|
includeInsecureCipherSuites: false
|
|
validity:
|
|
ca:
|
|
notBeforeRelative: 17520h
|
|
notAfterRelative: 17520h
|
|
server:
|
|
NotBeforeRelative: 168h
|
|
NotAfterRelative: 168h
|
|
rootCaCert:
|
|
publicKeyPath: ./assets/demoCA/ca.pem
|
|
privateKeyPath: ./assets/demoCA/ca.key
|
|
certCachePath: /tmp/inetmock/
|
|
|
|
listeners:
|
|
udp_53:
|
|
name: ''
|
|
protocol: udp
|
|
listenAddress: ''
|
|
port: 1053
|
|
endpoints:
|
|
plainDns:
|
|
handler: dns_mock
|
|
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
|
|
tcp_80:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 80
|
|
<<: *httpHandlers
|
|
tcp_443:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 443
|
|
<<: *httpHandlers
|
|
tcp_853:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 853
|
|
endpoints:
|
|
DoT:
|
|
handler: dns_mock
|
|
tls: true
|
|
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
|
|
tcp_3128:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 3128
|
|
endpoints:
|
|
proxyPlain:
|
|
handler: http_proxy
|
|
options:
|
|
target:
|
|
ipAddress: 127.0.0.1
|
|
port: 80
|
|
proxyTls:
|
|
handler: http_proxy
|
|
tls: true
|
|
options:
|
|
target:
|
|
ipAddress: 127.0.0.1
|
|
port: 443
|
|
tcp_8080:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 8080
|
|
<<: *httpHandlers
|
|
tcp_8443:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 8443
|
|
<<: *httpHandlers
|
|
tcp_9110:
|
|
name: ''
|
|
protocol: tcp
|
|
listenAddress: ''
|
|
port: 9110
|
|
endpoints:
|
|
metrics:
|
|
handler: metrics_exporter
|
|
options:
|
|
route: /metrics |