index.md 1.1 KB

HttpHound

Welcome to HttpHound documentation!

HttpHound is a Python framework for testing HTTP reverse proxies, with a specific focus on HAProxy.

Features

  • Tests defined as Python classes
  • Automatic backend spawning
  • Reverse proxy config generation from templates
  • Comprehensive validation (status, headers, body)
  • Backend request inspection
  • Async/await support

Quick Links

Example

from httphound.main import BaseProxyTest, ProxyConfig
from pathlib import Path

class MyTest(BaseProxyTest):
    def __init__(self):
        super().__init__()
        self.description = "Basic test"
        self.expected_status = 200
        self.proxy_config = ProxyConfig(
            binary_path=Path.home() / "bin/haproxy"
        )
    
    async def run_test(self):
        await self.make_request()
        return True

Installation

pip install httphound

Running Tests

httphound example_tests/