You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port Priority Optimization: Intelligent Protocol Detection Based on Port Numbers #2299
This issue tracks the port priority optimization feature where httpx attempts to intelligently guess the most likely protocol (HTTP or HTTPS) based on port numbers and global service distribution patterns.
Background
When scanning targets with mixed protocols (HTTPorHTTPS or HTTPandHTTPS), httpx needs to determine which protocol to try first. This optimization improves efficiency by making educated guesses based on:
Common HTTP ports: Ports like 80, 8080 are more likely to serve HTTP
Port ranges: Numeric ports greater than 1024 often serve HTTP
Default behavior: When no specific pattern matches, defaults to HTTPS
Implementation
The implementation includes:
A determineMostLikelySchemeOrder() function that analyzes the target host:port
Logic to prioritize HTTP for common HTTP ports and high-numbered ports
Fallback to HTTPS as the default scheme
Related PR
This issue is related to PR #2298 which implements the initial version of this optimization.
Activity