Overview
Unlike other responders that send HTTP responses, the Drop responder abruptly closes the connection by triggering a panic withhttp.ErrAbortHandler. This is the most aggressive response strategy and provides zero feedback to the client.
Configuration
The Drop responder requires no additional parameters beyond the standard IP ranges configuration.IP ranges to drop connections from. Can be CIDR notations (e.g.,
192.168.1.0/24) or predefined service keys (e.g., openai, aws).Default: ["aws", "azurepubliccloud", "deepseek", "gcloud", "githubcopilot", "openai"]Optional list of specific IP addresses to exclude from being dropped.Default:
[]Behavior
When a client from a blocked range makes a request:- Connection is immediately aborted
- No HTTP status code is sent
- No response body is transmitted
- Client receives a connection reset or timeout
Terminated - No HTTP response sent
Examples
Implementation Details
The Drop responder is implemented inresponders/drop.go:12:
http.ErrAbortHandler mechanism to immediately abort the connection without sending a response.
Client Experience
What clients see when their connection is dropped:- curl
- Browser
- HTTP Client
Use Cases
Maximum Deterrence
Provide zero information to attackers or scrapers:Bandwidth Conservation
Save bandwidth by not sending any response data:Waste Scraper Resources
Force scrapers to wait for timeout instead of getting immediate feedback:Silent Blocking
Block without revealing that blocking is happening:Advantages
- Zero information disclosure - Client gets no feedback about why connection failed
- Minimal server resources - No response processing or data transmission
- Maximum deterrence - Frustrating for automated scrapers
- Bandwidth savings - No response data sent
Disadvantages
- Poor user experience - Legitimate users see confusing errors
- Hard to debug - Difficult to distinguish from network issues
- No logging context - Client doesn’t know they were blocked
- May trigger retries - Some clients automatically retry on connection failures
Comparison with Other Responders
- vs Block: Drop sends nothing, Block sends 403 Forbidden
- vs Custom: Drop terminates connection, Custom sends a response
- vs Tarpit: Drop is immediate, Tarpit deliberately slows responses
- vs Redirect: Drop closes connection, Redirect sends clients elsewhere
When to Use Drop
Use Drop when:- You want maximum deterrence against scrapers
- Bandwidth conservation is important
- You don’t care about providing feedback
- Debugging by blocked clients is not a concern
- Legitimate users might be affected
- You need to log why clients were blocked
- Clear error messages are important
- You’re troubleshooting configuration
Best Practices
- Be certain about ranges - Drop provides no feedback, so misconfiguration is hard to debug
- Use whitelist liberally - Protect known good IPs from being dropped
- Monitor logs - Check server logs to see what’s being dropped
- Test thoroughly - Verify you’re not dropping legitimate traffic
- Consider alternatives - Block or Custom might be better for most use cases
Testing
Test the Drop responder configuration:Related Documentation
- Block Responder - Send 403 Forbidden instead
- Custom Responder - Send custom responses
- Tarpit Responder - Slow down responses instead of dropping