PaperMC / PaperMC/Waterfall

[Improvement] add event when proxy-protocol packet is received

Open
#443 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

s: Accepted type: feature
Dominant language
Shell
Stars
752
Forks
307
Avg merge
15h 48m
Merged PRs (30d)
7

Description

i see you added ConnectionInitEvent to waterfall, i would suggest an improvement
when you use Waterfall behind HAProxy, this event become quite useless as the ip the event see is the ip of the HAProxy server. So if you want to implement a connection throttler, or a macanism that prevents layer 7 flood (eg: handshake packet error flood) based on the connection IP, you can't. (not a good idea to ban your load-balancer's IP)

So, in case of proxy-protocol enabled, i think an other event should be triggered when Waterfall receive the packet from the HAProxy server with the "real connection IP". This event should allow to get the IP and to drop the associated connection (cancellable like the ConnectionInitEvent).

Thank you all for your work on this fork :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Waterfall's existing ConnectionInitEvent and the proxy-protocol packet handling. Determine how the real connection IP is exposed and how connection cancellation currently works; done means a cancellable event is triggered for the proxied connection and provides that IP.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.