SSLproxy/tests/testproxy/proto_validate_testset_split_4.json
Soner Tari dc34bc1ccf Add e2e tests for filtering rules
End-to-end tests now require testproxy v0.0.4, which supports the new
Reconnect command for the Pass filtering rule.

Split mode with the -n option also supports filtering rules, so the
Divert rule can enable the divert mode even with the -n option. This is
because the purpose of the -n option is to convert sslproxy into an
sslsplit, and we want to support filtering rules in sslsplit-like
sslproxy too.
2021-09-25 11:40:44 +03:00

242 lines
5.3 KiB
JSON

{
"comment": "Split mode tests for SMTP",
"configs": {
"1": {
"proto": {
"proto": "tcp"
},
"client": {
"ip": "127.0.0.1",
"port": "8189"
},
"server": {
"ip": "127.0.0.1",
"port": "9189"
}
},
"2": {
"proto": {
"proto": "ssl"
},
"client": {
"ip": "127.0.0.1",
"port": "8461"
},
"server": {
"ip": "127.0.0.1",
"port": "9461",
"crt": "server.crt",
"key": "server.key"
}
}
},
"tests": {
"1": {
"comment": "Validates 220 smtp greeting",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": "",
"comment": "The client should connect before the server can send its greeting"
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "220 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "220 smtp.example.com"
}
}
},
"2": {
"comment": "Split mode validates 199 smtp response",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "199 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "199 smtp.example.com"
},
"4": {
"testend": "server",
"cmd": "recv",
"payload": ""
}
}
},
"3": {
"comment": "Split mode validates 600 smtp response",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "600 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "600 smtp.example.com"
},
"4": {
"testend": "server",
"cmd": "recv",
"payload": ""
}
}
},
"4": {
"comment": "Validates EHLO",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "220 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "220 smtp.example.com"
},
"4": {
"testend": "client",
"cmd": "send",
"payload": "EHLO soner"
},
"5": {
"testend": "server",
"cmd": "recv",
"payload": "EHLO soner"
}
}
},
"5": {
"comment": "Does not validate EHL",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "220 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "220 smtp.example.com"
},
"4": {
"testend": "client",
"cmd": "send",
"payload": "EHL soner"
},
"5": {
"testend": "client",
"cmd": "recv",
"payload": "Connection is terminated due to protocol error\r\n"
},
"6": {
"testend": "server",
"cmd": "recv",
"payload": ""
}
}
},
"6": {
"comment": "Does not validate EHL1",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "220 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "220 smtp.example.com"
},
"4": {
"testend": "client",
"cmd": "send",
"payload": "EHL1 soner"
},
"5": {
"testend": "client",
"cmd": "recv",
"payload": "Connection is terminated due to protocol error\r\n"
},
"6": {
"testend": "server",
"cmd": "recv",
"payload": ""
}
}
},
"7": {
"comment": "Does not validate EHLO1",
"states": {
"1": {
"testend": "client",
"cmd": "send",
"payload": ""
},
"2": {
"testend": "server",
"cmd": "send",
"payload": "220 smtp.example.com"
},
"3": {
"testend": "client",
"cmd": "recv",
"payload": "220 smtp.example.com"
},
"4": {
"testend": "client",
"cmd": "send",
"payload": "EHLO1 soner"
},
"5": {
"testend": "client",
"cmd": "recv",
"payload": "Connection is terminated due to protocol error\r\n"
},
"6": {
"testend": "server",
"cmd": "recv",
"payload": ""
}
}
}
}
}