Skip to content

feat: add support for PROXY protocol v2#1

Closed
molivier wants to merge 11 commits into
FCSC-FR:mainfrom
molivier:ppv2
Closed

feat: add support for PROXY protocol v2#1
molivier wants to merge 11 commits into
FCSC-FR:mainfrom
molivier:ppv2

Conversation

@molivier

Copy link
Copy Markdown
Contributor

Add full support for PROXY protocol version 2 to enable proper client
IP forwarding from load balancers and reverse proxies.

Changes:

  • Implement PROXY protocol v2 parser and handler (src/proxy.rs)
  • Make ppv2 mode required when specified via configuration
  • Refactor proof-of-work validation for better maintainability
  • Update handler to check for local addresses with ppv2
  • Apply Clippy recommendations and code cleanup

The PROXY protocol support allows sossette to correctly identify
client IP addresses when deployed behind TCP load balancers.

Security Note: When enabling PROXY protocol, ensure it's only accepted
from trusted sources (load balancers/proxies). Misconfiguration may
expose the application to IP spoofing. Deployers are responsible for
proper network segmentation and access control to prevent leakage of
client information or unauthorized protocol injection.

@erdnaxe

erdnaxe commented Mar 18, 2026

Copy link
Copy Markdown
Collaborator

Manually rebased and merged in 422d938

@erdnaxe erdnaxe closed this Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants