testproxy 0.0.5

Tool for end-to-end testing of proxy servers
{
  "comment": "Tests for HTTP method validation",
  "configs": {
    "1": {
      "proto": {
        "proto": "tcp"
      },
      "client": {
        "ip": "127.0.0.1",
        "port": "8180"
      },
      "server": {
        "ip": "127.0.0.1",
        "port": "9180"
      }
    },
    "2": {
      "proto": {
        "proto": "ssl"
      },
      "client": {
        "ip": "127.0.0.1",
        "port": "8443"
      },
      "server": {
        "ip": "127.0.0.1",
        "port": "9443",
        "crt": "server.crt",
        "key": "server.key"
      }
    }
  },
  "tests": {
    "1": {
      "comment": "Validates GET",
      "states": {
        "1": {
          "testend": "client",
          "cmd": "send",
          "payload": "GET / HTTP/1.1\r\nHost: comixwall.org\r\n\r\n"
        },
        "2": {
          "testend": "server",
          "cmd": "recv",
          "payload": "GET / HTTP/1.1\r\nHost: comixwall.org\r\nConnection: close\r\n\r\n"
        }
      }
    },
    "2": {
      "comment": "Does not validate GE as a method",
      "states": {
        "1": {
          "testend": "client",
          "cmd": "send",
          "payload": "GE / HTTP/1.1\r\nHost: comixwall.org\r\n\r\n"
        },
        "2": {
          "testend": "server",
          "cmd": "recv",
          "payload": "",
          "comment": "SSLproxy should not validate method GE, so should not send any data"
        }
      }
    },
    "3": {
      "comment": "Does not validate GE1 as a method",
      "states": {
        "1": {
          "testend": "client",
          "cmd": "send",
          "payload": "GE1 / HTTP/1.1\r\nHost: comixwall.org\r\n\r\n"
        },
        "2": {
          "testend": "server",
          "cmd": "recv",
          "payload": ""
        }
      }
    },
    "4": {
      "comment": "Does not validate GET1 as a method",
      "states": {
        "1": {
          "testend": "client",
          "cmd": "send",
          "payload": "GET1 / HTTP/1.1\r\nHost: comixwall.org\r\n\r\n"
        },
        "2": {
          "testend": "server",
          "cmd": "recv",
          "payload": ""
        }
      }
    }
  }
}